Merge pull request #653 from alex/ssl-cipher-bindings

Ssl cipher bindings
diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py
index 038ea54..ca3e96c 100644
--- a/cryptography/hazmat/bindings/openssl/ssl.py
+++ b/cryptography/hazmat/bindings/openssl/ssl.py
@@ -140,6 +140,8 @@
 } SSL;
 
 static const int TLSEXT_NAMETYPE_host_name;
+
+typedef ... SSL_CIPHER;
 """
 
 FUNCTIONS = """
@@ -212,6 +214,11 @@
 
 /*  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 @@
 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.
  */