diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-01-24 16:51:36 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-01-24 16:51:36 +0100 |
commit | 0fb4331cd350ad8921dbbbcef31ceaa38a92a3b6 (patch) | |
tree | 16f7c08d4210b432c151ac79786825f7e56a6d9d /lib/event.c | |
parent | a11aab1d9b4ecd4e8c31a5002af142b1828a4016 (diff) |
Don't verify server certificate if we're using PSK.
Diffstat (limited to 'lib/event.c')
-rw-r--r-- | lib/event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/event.c b/lib/event.c index f768273..138fa72 100644 --- a/lib/event.c +++ b/lib/event.c @@ -246,8 +246,9 @@ event_on_connect (struct rs_connection *conn, struct rs_message *msg) 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__)); |