aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpttls/pt_tls_dispatcher.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-03-07 14:10:50 +0100
committerMartin Willi <martin@revosec.ch>2013-03-07 14:10:50 +0100
commit7d70a14779b2dc897bc46559e6475a9bd01b2be6 (patch)
tree746bdedefd60fae4e6b010e5415919cff4140e32 /src/libpttls/pt_tls_dispatcher.c
parent9d9042d6d95b0ecb292d77e7d8350fcd28e1aa27 (diff)
parent1db6bf2f3f8fe0240a63dbd7c79323140daa622e (diff)
downloadstrongswan-7d70a14779b2dc897bc46559e6475a9bd01b2be6.tar.bz2
strongswan-7d70a14779b2dc897bc46559e6475a9bd01b2be6.tar.xz
Merge branch 'pt-tls'
Diffstat (limited to 'src/libpttls/pt_tls_dispatcher.c')
-rw-r--r--src/libpttls/pt_tls_dispatcher.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libpttls/pt_tls_dispatcher.c b/src/libpttls/pt_tls_dispatcher.c
index 813580cd0..469951616 100644
--- a/src/libpttls/pt_tls_dispatcher.c
+++ b/src/libpttls/pt_tls_dispatcher.c
@@ -42,6 +42,11 @@ struct private_pt_tls_dispatcher_t {
int fd;
/**
+ * Client authentication requirements
+ */
+ pt_tls_auth_t auth;
+
+ /**
* Server identity
*/
identification_t *server;
@@ -141,7 +146,7 @@ METHOD(pt_tls_dispatcher_t, dispatch, void,
close(fd);
continue;
}
- connection = pt_tls_server_create(this->server, fd, tnccs);
+ connection = pt_tls_server_create(this->server, fd, this->auth, tnccs);
if (!connection)
{
close(fd);
@@ -171,7 +176,7 @@ METHOD(pt_tls_dispatcher_t, destroy, void,
* See header
*/
pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address,
- identification_t *id)
+ identification_t *id, pt_tls_auth_t auth)
{
private_pt_tls_dispatcher_t *this;
@@ -184,6 +189,7 @@ pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address,
/* we currently don't authenticate the peer, use %any identity */
.peer = identification_create_from_encoding(ID_ANY, chunk_empty),
.fd = -1,
+ .auth = auth,
);
if (!open_socket(this, address))