Extract client identity and authentication type from SASL authentication

This commit is contained in:
Andreas Steffen
2013-08-15 23:34:22 +02:00
parent 6d6100c2bc
commit 97b1d39de5
7 changed files with 76 additions and 9 deletions
+8
View File
@@ -525,6 +525,13 @@ METHOD(tls_t, get_server_id, identification_t*,
return this->server;
}
METHOD(tls_t, set_peer_id, void,
private_tnccs_11_t *this, identification_t *id)
{
DESTROY_IF(this->peer);
this->peer = id->clone(id);
}
METHOD(tls_t, get_peer_id, identification_t*,
private_tnccs_11_t *this)
{
@@ -611,6 +618,7 @@ tnccs_t* tnccs_11_create(bool is_server,
.build = _build,
.is_server = _is_server,
.get_server_id = _get_server_id,
.set_peer_id = _set_peer_id,
.get_peer_id = _get_peer_id,
.get_purpose = _get_purpose,
.is_complete = _is_complete,
+8
View File
@@ -834,6 +834,13 @@ METHOD(tls_t, get_server_id, identification_t*,
return this->server;
}
METHOD(tls_t, set_peer_id, void,
private_tnccs_20_t *this, identification_t *id)
{
DESTROY_IF(this->peer);
this->peer = id->clone(id);
}
METHOD(tls_t, get_peer_id, identification_t*,
private_tnccs_20_t *this)
{
@@ -922,6 +929,7 @@ tnccs_t* tnccs_20_create(bool is_server,
.build = _build,
.is_server = _is_server,
.get_server_id = _get_server_id,
.set_peer_id = _set_peer_id,
.get_peer_id = _get_peer_id,
.get_purpose = _get_purpose,
.is_complete = _is_complete,
@@ -135,6 +135,17 @@ METHOD(tls_t, get_server_id, identification_t*,
return this->server;
}
METHOD(tls_t, set_peer_id, void,
private_tnccs_dynamic_t *this, identification_t *id)
{
DESTROY_IF(this->peer);
this->peer = id->clone(id);
if (this->tls)
{
this->tls->set_peer_id(this->tls, id);
}
}
METHOD(tls_t, get_peer_id, identification_t*,
private_tnccs_dynamic_t *this)
{
@@ -208,6 +219,7 @@ tnccs_t* tnccs_dynamic_create(bool is_server,
.build = _build,
.is_server = _is_server,
.get_server_id = _get_server_id,
.set_peer_id = _set_peer_id,
.get_peer_id = _get_peer_id,
.get_purpose = _get_purpose,
.is_complete = _is_complete,