mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-29 01:31:19 +02:00
MINOR: ssl: add a new function ssl_sock_get_ssl_object()
This one can be used later to get a SSL object from connection. It will return NULL if connection is not established over SSL.
This commit is contained in:
parent
9ac9809cb9
commit
eb607fe6a1
@ -109,6 +109,8 @@ void ssl_async_fd_free(int fd);
|
|||||||
*/
|
*/
|
||||||
int ssl_sock_register_msg_callback(ssl_sock_msg_callback_func func);
|
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 /* USE_OPENSSL */
|
||||||
#endif /* _PROTO_SSL_SOCK_H */
|
#endif /* _PROTO_SSL_SOCK_H */
|
||||||
|
|
||||||
|
@ -695,6 +695,14 @@ static void ssl_sock_unregister_msg_callbacks(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
* 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
|
* if the debug mode and the verbose mode are activated. It dump all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user