aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyli <cyli@twistedmatrix.com>2013-10-19 21:36:23 -0700
committercyli <cyli@twistedmatrix.com>2013-12-20 13:39:43 -0800
commiteb373f5b2c4b81a9a90504468a6d39c9b50e7fd6 (patch)
treeaf6754ff7d9a9ebfe7bfe7660b5ef1f823aa9aaa
parentb87f7b55d8322358c9dfa73d29d744c14c44237b (diff)
downloadcryptography-eb373f5b2c4b81a9a90504468a6d39c9b50e7fd6.tar.gz
cryptography-eb373f5b2c4b81a9a90504468a6d39c9b50e7fd6.tar.bz2
cryptography-eb373f5b2c4b81a9a90504468a6d39c9b50e7fd6.zip
Delete some repeated functions, and move the OPENSSL_malloc definition to crypto bindings, since it seems to be in crypto.h
-rw-r--r--cryptography/hazmat/backends/openssl/crypto.py2
-rw-r--r--cryptography/hazmat/backends/openssl/ssl.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/cryptography/hazmat/backends/openssl/crypto.py b/cryptography/hazmat/backends/openssl/crypto.py
index 773d9b14..2f1dfe11 100644
--- a/cryptography/hazmat/backends/openssl/crypto.py
+++ b/cryptography/hazmat/backends/openssl/crypto.py
@@ -34,6 +34,8 @@ void CRYPTO_malloc_debug_init();
#define CRYPTO_MEM_CHECK_OFF ...
#define CRYPTO_MEM_CHECK_ENABLE ...
#define CRYPTO_MEM_CHECK_DISABLE ...
+
+#define OPENSSL_malloc ...
"""
CUSTOMIZATIONS = """
diff --git a/cryptography/hazmat/backends/openssl/ssl.py b/cryptography/hazmat/backends/openssl/ssl.py
index e1dccf4c..b42407ad 100644
--- a/cryptography/hazmat/backends/openssl/ssl.py
+++ b/cryptography/hazmat/backends/openssl/ssl.py
@@ -121,12 +121,10 @@ typedef int tlsext_servername_callback(const SSL *ssl, int *alert, void *arg);
"""
FUNCTIONS = """
-void *OPENSSL_malloc(int);
void OPENSSL_free(void *);
int SSL_library_init();
/* methods */
-
const SSL_METHOD *SSLv3_method();
const SSL_METHOD *SSLv3_server_method();
const SSL_METHOD *SSLv3_client_method();
@@ -180,8 +178,6 @@ int SSL_total_renegotiations(const SSL *);
int SSL_get_error(const SSL *, int);
int SSL_do_handshake(SSL *);
int SSL_shutdown(SSL *);
-void SSL_set_shutdown(SSL *, int);
-int SSL_get_shutdown(const SSL *);
struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *);
const char *SSL_get_cipher_list(const SSL *, int);
struct stack_st_X509_NAME *SSL_get_client_CA_list(const SSL *);