aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 12:31:49 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 12:31:49 -0600
commit2f15224a3fecceb40b4336773e2c88d4c0902ca1 (patch)
treee8a4a160661d3f9277d47feeb9d50f10f8587d8a
parent4cfb1495ffc7ca0c8f872c768fd3e2154396c9fb (diff)
parent0b648b3939c2cf7598b8b349b61cb84d19a0ca97 (diff)
downloadcryptography-2f15224a3fecceb40b4336773e2c88d4c0902ca1.tar.gz
cryptography-2f15224a3fecceb40b4336773e2c88d4c0902ca1.tar.bz2
cryptography-2f15224a3fecceb40b4336773e2c88d4c0902ca1.zip
Merge pull request #653 from alex/ssl-cipher-bindings
Ssl cipher bindings
-rw-r--r--cryptography/hazmat/bindings/openssl/ssl.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py
index 038ea54b..ca3e96c8 100644
--- a/cryptography/hazmat/bindings/openssl/ssl.py
+++ b/cryptography/hazmat/bindings/openssl/ssl.py
@@ -140,6 +140,8 @@ typedef struct {
} SSL;
static const int TLSEXT_NAMETYPE_host_name;
+
+typedef ... SSL_CIPHER;
"""
FUNCTIONS = """
@@ -212,6 +214,11 @@ X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *);
/* SSL_SESSION */
void SSL_SESSION_free(SSL_SESSION *);
+
+/* Information about actually used cipher */
+const char *SSL_CIPHER_get_name(const SSL_CIPHER *);
+int SSL_CIPHER_get_bits(const SSL_CIPHER *, int *);
+char *SSL_CIPHER_get_version(const SSL_CIPHER *);
"""
MACROS = """
@@ -281,6 +288,8 @@ const SSL_METHOD *SSLv23_client_method(void);
SSL_CTX *SSL_CTX_new(SSL_METHOD *);
long SSL_CTX_get_timeout(const SSL_CTX *);
+const SSL_CIPHER *SSL_get_current_cipher(const SSL *);
+
/* SNI APIs were introduced in OpenSSL 1.0.0. To continue to support
* earlier versions some special handling of these is necessary.
*/