Add Connection.get_session and have the Session object actually wrap an SSL_SESSION* (though there is actually not yet any way to tell that that is the case)
diff --git a/OpenSSL/ssl/session.h b/OpenSSL/ssl/session.h
index 98cee80..4e8de11 100644
--- a/OpenSSL/ssl/session.h
+++ b/OpenSSL/ssl/session.h
@@ -16,10 +16,12 @@
typedef struct {
PyObject_HEAD
+ SSL_SESSION *session;
} ssl_SessionObj;
extern PyTypeObject ssl_Session_Type;
extern int init_ssl_session(PyObject *);
+extern ssl_SessionObj *ssl_Session_from_SSL_SESSION(SSL_SESSION *native_session);
#endif