aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-16 17:26:28 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-16 17:26:28 -0400
commit9fa31c6353af3ab32edd6f6988725886d0e2aa4c (patch)
treed08b102dc365729858bdc712728dbcbb473c4925
parentcdb87dc34605a44ee398e8fb08598b8dbdd14bf2 (diff)
parent1ebba9f420fa1f30ae8217ed901172a0cdc27689 (diff)
downloadcryptography-9fa31c6353af3ab32edd6f6988725886d0e2aa4c.tar.gz
cryptography-9fa31c6353af3ab32edd6f6988725886d0e2aa4c.tar.bz2
cryptography-9fa31c6353af3ab32edd6f6988725886d0e2aa4c.zip
Merge pull request #933 from mrjefftang/expose-evp-ec
Expose EVP_PKEY_EC and EVP_PKEY_assign_EC_KEY
-rw-r--r--cryptography/hazmat/bindings/openssl/evp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cryptography/hazmat/bindings/openssl/evp.py b/cryptography/hazmat/bindings/openssl/evp.py
index 88cf5c34..963537c8 100644
--- a/cryptography/hazmat/bindings/openssl/evp.py
+++ b/cryptography/hazmat/bindings/openssl/evp.py
@@ -37,6 +37,7 @@ typedef struct evp_pkey_st {
typedef ... EVP_PKEY_CTX;
static const int EVP_PKEY_RSA;
static const int EVP_PKEY_DSA;
+static const int EVP_PKEY_EC;
static const int EVP_MAX_MD_SIZE;
static const int EVP_CTRL_GCM_SET_IVLEN;
static const int EVP_CTRL_GCM_GET_TAG;
@@ -122,6 +123,7 @@ MACROS = """
void OpenSSL_add_all_algorithms(void);
int EVP_PKEY_assign_RSA(EVP_PKEY *, RSA *);
int EVP_PKEY_assign_DSA(EVP_PKEY *, DSA *);
+int EVP_PKEY_assign_EC_KEY(EVP_PKEY *, EC_KEY *);
int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *);
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *, int, int, void *);
@@ -211,6 +213,10 @@ int (*Cryptography_EVP_PKEY_encrypt)(EVP_PKEY_CTX *, unsigned char *, size_t *,
int (*Cryptography_EVP_PKEY_decrypt)(EVP_PKEY_CTX *, unsigned char *, size_t *,
const unsigned char *, size_t) = NULL;
#endif
+#ifdef OPENSSL_NO_EC
+int (*EVP_PKEY_assign_EC_KEY)(EVP_PKEY *, EC_KEY *) = NULL;
+#endif
+
"""
CONDITIONAL_NAMES = {
@@ -236,5 +242,8 @@ CONDITIONAL_NAMES = {
"Cryptography_EVP_PKEY_decrypt",
"EVP_PKEY_decrypt_init",
"EVP_PKEY_CTX_set_signature_md",
+ ],
+ "Cryptography_HAS_EC": [
+ "EVP_PKEY_assign_EC_KEY",
]
}