From 22745ebf3e2d5bef8e089d8fb6111ff8654129ca Mon Sep 17 00:00:00 2001 From: Richard Plangger Date: Tue, 29 Nov 2016 17:52:59 +0100 Subject: 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 --- src/_cffi_src/openssl/evp.py | 1 + src/_cffi_src/openssl/objects.py | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'src/_cffi_src') diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py index 477d035f..a5032d1f 100644 --- a/src/_cffi_src/openssl/evp.py +++ b/src/_cffi_src/openssl/evp.py @@ -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 *); diff --git a/src/_cffi_src/openssl/objects.py b/src/_cffi_src/openssl/objects.py index 6551d757..19ff4c17 100644 --- a/src/_cffi_src/openssl/objects.py +++ b/src/_cffi_src/openssl/objects.py @@ -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 = """ -- cgit v1.2.3