Wrap tls_t.get_{server,peer}_id methods in tls_socket_t
This commit is contained in:
@@ -378,6 +378,18 @@ METHOD(tls_socket_t, get_fd, int,
|
|||||||
return this->fd;
|
return this->fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
METHOD(tls_socket_t, get_server_id, identification_t*,
|
||||||
|
private_tls_socket_t *this)
|
||||||
|
{
|
||||||
|
return this->tls->get_server_id(this->tls);
|
||||||
|
}
|
||||||
|
|
||||||
|
METHOD(tls_socket_t, get_peer_id, identification_t*,
|
||||||
|
private_tls_socket_t *this)
|
||||||
|
{
|
||||||
|
return this->tls->get_peer_id(this->tls);
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(tls_socket_t, destroy, void,
|
METHOD(tls_socket_t, destroy, void,
|
||||||
private_tls_socket_t *this)
|
private_tls_socket_t *this)
|
||||||
{
|
{
|
||||||
@@ -403,6 +415,8 @@ tls_socket_t *tls_socket_create(bool is_server, identification_t *server,
|
|||||||
.write = _write_,
|
.write = _write_,
|
||||||
.splice = _splice,
|
.splice = _splice,
|
||||||
.get_fd = _get_fd,
|
.get_fd = _get_fd,
|
||||||
|
.get_server_id = _get_server_id,
|
||||||
|
.get_peer_id = _get_peer_id,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
},
|
},
|
||||||
.app = {
|
.app = {
|
||||||
|
|||||||
@@ -76,6 +76,20 @@ struct tls_socket_t {
|
|||||||
*/
|
*/
|
||||||
int (*get_fd)(tls_socket_t *this);
|
int (*get_fd)(tls_socket_t *this);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the server identity.
|
||||||
|
*
|
||||||
|
* @return server identity
|
||||||
|
*/
|
||||||
|
identification_t* (*get_server_id)(tls_socket_t *this);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the peer identity.
|
||||||
|
*
|
||||||
|
* @return peer identity
|
||||||
|
*/
|
||||||
|
identification_t* (*get_peer_id)(tls_socket_t *this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a tls_socket_t.
|
* Destroy a tls_socket_t.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user