cffi bindings additions for pypy's _hashlib module (#3291)

* add cffi bindings to objects.py and evp.py (required for pypy's _hashlib implementation)

* ah, that comes from copying it from the man page

* dont use #define ..., delcare it as static cont long <name>
This commit is contained in:
Richard Plangger 2016-11-29 17:52:59 +01:00 committed by Paul Kehrer
parent 3a3cf1e4fd
commit 22745ebf3e
2 changed files with 10 additions and 0 deletions

View file

@ -156,6 +156,7 @@ int EVP_PKEY_assign_EC_KEY(EVP_PKEY *, EC_KEY *);
EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *);
int EVP_PKEY_set1_EC_KEY(EVP_PKEY *, EC_KEY *);
int EVP_MD_CTX_block_size(const EVP_MD_CTX *);
int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *);
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *, int, int, void *);

View file

@ -9,6 +9,14 @@ INCLUDES = """
"""
TYPES = """
typedef struct {
int type;
int alias;
const char *name;
const char *data;
} OBJ_NAME;
static const long OBJ_NAME_TYPE_MD_METH;
"""
FUNCTIONS = """
@ -24,6 +32,7 @@ int OBJ_obj2txt(char *, int, const ASN1_OBJECT *, int);
int OBJ_cmp(const ASN1_OBJECT *, const ASN1_OBJECT *);
ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *);
int OBJ_create(const char *, const char *, const char *);
void OBJ_NAME_do_all(int, void (*) (const OBJ_NAME *, void *), void *);
"""
MACROS = """