This one can be used later to get a SSL object from connection. It will
return NULL if connection is not established over SSL.
*/
int ssl_sock_register_msg_callback(ssl_sock_msg_callback_func func);
+SSL *ssl_sock_get_ssl_object(struct connection *conn);
+
#endif /* USE_OPENSSL */
#endif /* _PROTO_SSL_SOCK_H */
}
}
+SSL *ssl_sock_get_ssl_object(struct connection *conn)
+{
+ if (!ssl_sock_is_ssl(conn))
+ return NULL;
+
+ return ((struct ssl_sock_ctx *)(conn->xprt_ctx))->ssl;
+}
+
/*
* This function gives the detail of the SSL error. It is used only
* if the debug mode and the verbose mode are activated. It dump all