From 02209c6045d8a5702f30c7401dfe6755208edef1 Mon Sep 17 00:00:00 2001 From: cyli Date: Sat, 19 Oct 2013 23:19:10 -0700 Subject: Unfortunate hack to make replacing some callback signature in the function definitions work --- cryptography/hazmat/backends/openssl/ssl.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cryptography/hazmat/backends/openssl/ssl.py b/cryptography/hazmat/backends/openssl/ssl.py index 3a100f18..dee5edc5 100644 --- a/cryptography/hazmat/backends/openssl/ssl.py +++ b/cryptography/hazmat/backends/openssl/ssl.py @@ -13,6 +13,14 @@ INCLUDES = """ #include + +/* This is a gross hack - if it is not here, as well as in the TYPES section, + * because it is needed to replace some function signatures in the FUNCTIONS + * section, and may be needed by PyOpenSSL + */ +typedef int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx); +typedef void info_callback(const SSL *ssl, int where, int ret); +typedef int tlsext_servername_callback(const SSL *ssl, int *alert, void *arg); """ TYPES = """ -- cgit v1.2.3