diff options
Diffstat (limited to 'cryptography/hazmat/bindings/openssl/evp.py')
| -rw-r--r-- | cryptography/hazmat/bindings/openssl/evp.py | 18 | 
1 files changed, 15 insertions, 3 deletions
| diff --git a/cryptography/hazmat/bindings/openssl/evp.py b/cryptography/hazmat/bindings/openssl/evp.py index 4d0fb7fc..da54f89d 100644 --- a/cryptography/hazmat/bindings/openssl/evp.py +++ b/cryptography/hazmat/bindings/openssl/evp.py @@ -29,9 +29,9 @@ typedef struct evp_pkey_st {  } EVP_PKEY;  static const int EVP_PKEY_RSA;  static const int EVP_PKEY_DSA; -static const int EVP_CTRL_GCM_SET_IVLEN; -static const int EVP_CTRL_GCM_GET_TAG; -static const int EVP_CTRL_GCM_SET_TAG; +static const int Cryptography_EVP_CTRL_GCM_SET_IVLEN; +static const int Cryptography_EVP_CTRL_GCM_GET_TAG; +static const int Cryptography_EVP_CTRL_GCM_SET_TAG;  """  FUNCTIONS = """ @@ -95,3 +95,15 @@ int EVP_PKEY_assign_DSA(EVP_PKEY *, DSA *);  int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *);  int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *, int, int, void *);  """ + +CUSTOMIZATIONS = """ +#ifdef EVP_CTRL_GCM_SET_TAG +const int Cryptography_EVP_CTRL_GCM_GET_TAG = EVP_CTRL_GCM_GET_TAG; +const int Cryptography_EVP_CTRL_GCM_SET_TAG = EVP_CTRL_GCM_SET_TAG; +const int Cryptography_EVP_CTRL_GCM_SET_IVLEN = EVP_CTRL_GCM_SET_IVLEN; +#else +const int Cryptography_EVP_CTRL_GCM_GET_TAG = -1; +const int Cryptography_EVP_CTRL_GCM_SET_TAG = -1; +const int Cryptography_EVP_CTRL_GCM_SET_IVLEN = -1; +#endif +""" | 
