aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-01 07:54:05 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-01 07:56:19 -0600
commit9a426a5003b324cfd77a33bcbe81d9763ea4ba95 (patch)
tree938c4874ee1399125ce57b42e03511dcb00b1f06 /src
parent6d3a07f4fb3094c6868514fcae1cec24c647d2a6 (diff)
downloadcryptography-9a426a5003b324cfd77a33bcbe81d9763ea4ba95.tar.gz
cryptography-9a426a5003b324cfd77a33bcbe81d9763ea4ba95.tar.bz2
cryptography-9a426a5003b324cfd77a33bcbe81d9763ea4ba95.zip
fix a warning in cffi
cffi doesn't want to guess the type, so we'll deopaque the enum and strip the values out of the lib if EC is unavailable
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/openssl/ec.py6
-rw-r--r--src/cryptography/hazmat/bindings/openssl/_conditional.py3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/_cffi_src/openssl/ec.py b/src/_cffi_src/openssl/ec.py
index 10c87c33..6a0aa720 100644
--- a/src/_cffi_src/openssl/ec.py
+++ b/src/_cffi_src/openssl/ec.py
@@ -29,7 +29,11 @@ typedef struct {
int nid;
const char *comment;
} EC_builtin_curve;
-typedef enum { ... } point_conversion_form_t;
+typedef enum {
+ POINT_CONVERSION_COMPRESSED = 2,
+ POINT_CONVERSION_UNCOMPRESSED = 4,
+ POINT_CONVERSION_HYBRID = 6
+} point_conversion_form_t;
"""
FUNCTIONS = """
diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
index f0ad1d5e..80a6dda3 100644
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
@@ -141,6 +141,9 @@ CONDITIONAL_NAMES = {
"i2o_ECPublicKey",
"o2i_ECPublicKey",
"SSL_CTX_set_tmp_ecdh",
+ "POINT_CONVERSION_COMPRESSED",
+ "POINT_CONVERSION_UNCOMPRESSED",
+ "POINT_CONVERSION_HYBRID",
],
"Cryptography_HAS_EC_1_0_1": [