summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-01-24 16:51:36 +0100
committerLinus Nordberg <linus@nordberg.se>2013-01-24 16:53:21 +0100
commit823ea9ba4a39998e3fe210e99e8e59d342fccfda (patch)
tree3198b82e5d9eb1e5657f9d3cf922a04b7b55f197 /lib
parent9b24cd55e1c62e092ab9437774a1a51368309809 (diff)
Don't verify server certificate if we're using PSK.
Diffstat (limited to 'lib')
-rw-r--r--lib/event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/event.c b/lib/event.c
index 3ebc5a7..78a9156 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -246,8 +246,9 @@ 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)
+ 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 (tls_verify_cert (conn) != RSE_OK)
{
rs_debug (("%s: server cert verification failed\n", __func__));