summaryrefslogtreecommitdiff
path: root/lib/event.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-01-24 17:32:18 +0100
committerLinus Nordberg <linus@nordberg.se>2013-01-24 17:32:18 +0100
commit9cf549b20eb0ae56afac8c3ddff8725c8c1380db (patch)
treed029ca1feddd30b84ea28b0baa4478af8b3561fc /lib/event.c
parentabd279561b8fc63e9a8ae7c8cab5135df77bb816 (diff)
Do the test for PSK properly.
Fixes 823ea9ba.
Diffstat (limited to 'lib/event.c')
-rw-r--r--lib/event.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/event.c b/lib/event.c
index 78a9156..e51616a 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -246,9 +246,7 @@ event_on_connect (struct rs_connection *conn, struct rs_packet *pkt)
assert (!conn->is_connecting);
#if defined (RS_ENABLE_TLS)
- if ((conn->realm->type == RS_CONN_TYPE_TLS
- || conn->realm->type == RS_CONN_TYPE_DTLS)
- && conn->realm->transport_cred->type != RS_CRED_TLS_PSK)
+ if (conn_type_tls(conn) && !conn_cred_psk(conn))
if (tls_verify_cert (conn) != RSE_OK)
{
rs_debug (("%s: server cert verification failed\n", __func__));