aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorRichard Plangger <planrich@users.noreply.github.com>2016-11-29 17:52:59 +0100
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-30 00:52:59 +0800
commit22745ebf3e2d5bef8e089d8fb6111ff8654129ca (patch)
tree6fc5278e21fd90a8bbb73516633e5ee39e8bb756 /src/_cffi_src
parent3a3cf1e4fdd163cc03c047f354ee51f016144eb0 (diff)
downloadcryptography-22745ebf3e2d5bef8e089d8fb6111ff8654129ca.tar.gz
cryptography-22745ebf3e2d5bef8e089d8fb6111ff8654129ca.tar.bz2
cryptography-22745ebf3e2d5bef8e089d8fb6111ff8654129ca.zip
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>
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/evp.py1
-rw-r--r--src/_cffi_src/openssl/objects.py9
2 files changed, 10 insertions, 0 deletions
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 = """