aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/err.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2016-04-08 23:19:22 +0200
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-04-08 17:19:22 -0400
commit97511e5b8d8169096b48ff73ecce7d973129cf87 (patch)
treed1d585a57f2b96ab6b98007d0e6b41d30b8e3e60 /src/_cffi_src/openssl/err.py
parentd824f6005a8520e3b98fb349a899c33f300b7a08 (diff)
downloadcryptography-97511e5b8d8169096b48ff73ecce7d973129cf87.tar.gz
cryptography-97511e5b8d8169096b48ff73ecce7d973129cf87.tar.bz2
cryptography-97511e5b8d8169096b48ff73ecce7d973129cf87.zip
Add more bindings to OpenSSL, to be used by the Python _ssl module. (#2868)
* Add more bindings to OpenSSL, all are used by the Python _ssl module. * Add a conditional: SSL_CTX_clear_options() does not exist before 0.9.8m * 80 cols * Condionally define the TLSEXT error codes. * Address review comments * Remove all parameter names
Diffstat (limited to 'src/_cffi_src/openssl/err.py')
-rw-r--r--src/_cffi_src/openssl/err.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py
index d0211c34..4c7870aa 100644
--- a/src/_cffi_src/openssl/err.py
+++ b/src/_cffi_src/openssl/err.py
@@ -13,6 +13,7 @@ static const int Cryptography_HAS_REMOVE_THREAD_STATE;
static const int Cryptography_HAS_098H_ERROR_CODES;
static const int Cryptography_HAS_098C_CAMELLIA_CODES;
static const int Cryptography_HAS_EC_CODES;
+static const int Cryptography_HAS_TLSEXT_ERROR_CODES;
static const int Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR;
struct ERR_string_data_st {
@@ -28,6 +29,8 @@ static const int ERR_LIB_PEM;
static const int ERR_LIB_ASN1;
static const int ERR_LIB_RSA;
static const int ERR_LIB_PKCS12;
+static const int ERR_LIB_SSL;
+static const int ERR_LIB_X509;
static const int ASN1_F_ASN1_ENUMERATED_TO_BN;
static const int ASN1_F_ASN1_EX_C2I;
@@ -224,6 +227,15 @@ static const int RSA_R_BLOCK_TYPE_IS_NOT_02;
static const int RSA_R_PKCS_DECODING_ERROR;
static const int RSA_R_OAEP_DECODING_ERROR;
static const int RSA_F_RSA_SIGN;
+
+static const int SSL_TLSEXT_ERR_OK;
+static const int SSL_TLSEXT_ERR_ALERT_WARNING;
+static const int SSL_TLSEXT_ERR_ALERT_FATAL;
+static const int SSL_TLSEXT_ERR_NOACK;
+
+static const int SSL_AD_INTERNAL_ERROR;
+static const int SSL_AD_ACCESS_DENIED;
+static const int SSL_AD_HANDSHAKE_FAILURE;
"""
FUNCTIONS = """
@@ -319,6 +331,16 @@ static const int EC_R_UNKNOWN_GROUP = 0;
static const int EC_F_EC_GROUP_NEW_BY_CURVE_NAME = 0;
#endif
+#ifdef SSL_TLSEXT_ERR_OK
+static const int Cryptography_HAS_TLSEXT_ERROR_CODES = 1;
+#else
+static const int Cryptography_HAS_TLSEXT_ERROR_CODES = 0;
+static const int SSL_TLSEXT_ERR_OK = 0;
+static const int SSL_TLSEXT_ERR_ALERT_WARNING = 0;
+static const int SSL_TLSEXT_ERR_ALERT_FATAL = 0;
+static const int SSL_TLSEXT_ERR_NOACK = 0;
+#endif
+
#ifdef RSA_R_PKCS_DECODING_ERROR
static const long Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR = 1;
#else