diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-01-24 17:32:18 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-02-18 16:39:16 +0100 |
commit | 10fce2b693e8483d9cc7c024c1a2cd66e8fbef27 (patch) | |
tree | 3a4b3665e79779f9a060e9a27f20f18448c67ccf | |
parent | 214a29955b9c7a8eafc90997ee29f86a284e3a12 (diff) |
Do the test for PSK properly.
Fixes 823ea9ba.
Conflicts:
lib/event.c
-rw-r--r-- | lib/event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/event.c b/lib/event.c index 6b7ba48..ff64348 100644 --- a/lib/event.c +++ b/lib/event.c @@ -247,9 +247,7 @@ event_on_connect (struct rs_connection *conn, struct rs_message *msg) assert (conn->active_peer); #if defined (RS_ENABLE_TLS) - if ((conn->realm->type == RS_CONN_TYPE_TLS - || conn->realm->type == RS_CONN_TYPE_DTLS) - && conn->active_peer->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__)); |