From 69e8bb2e8d61a8e7b2a889eaae9722a4e5ed51c6 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 24 Aug 2010 11:34:43 +0200 Subject: Pass NULL peer identity to omit TLS peer authentication, added eap-ttls.request_peer_auth option --- src/libtls/tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libtls/tls.c') diff --git a/src/libtls/tls.c b/src/libtls/tls.c index 142897e59..32e31c66d 100644 --- a/src/libtls/tls.c +++ b/src/libtls/tls.c @@ -268,7 +268,7 @@ METHOD(tls_t, destroy, void, this->fragmentation->destroy(this->fragmentation); this->crypto->destroy(this->crypto); this->handshake->destroy(this->handshake); - this->peer->destroy(this->peer); + DESTROY_IF(this->peer); this->server->destroy(this->server); DESTROY_IF(this->application); this->alert->destroy(this->alert); @@ -309,7 +309,7 @@ tls_t *tls_create(bool is_server, identification_t *server, .is_server = is_server, .version = TLS_1_2, .server = server->clone(server), - .peer = peer->clone(peer), + .peer = peer ? peer->clone(peer) : NULL, .application = application, .purpose = purpose, ); -- cgit v1.2.3