diff options
Diffstat (limited to 'lib/event.c')
-rw-r--r-- | lib/event.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/event.c b/lib/event.c index 138fa72..6b7ba48 100644 --- a/lib/event.c +++ b/lib/event.c @@ -244,11 +244,12 @@ int event_on_connect (struct rs_connection *conn, struct rs_message *msg) { assert (!conn->is_connecting); + 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->realm->transport_cred->type != RS_CRED_TLS_PSK) + && conn->active_peer->transport_cred->type != RS_CRED_TLS_PSK) if (tls_verify_cert (conn) != RSE_OK) { rs_debug (("%s: server cert verification failed\n", __func__)); |