coap_openssl.c: Fix coding error in coap_dtls_context_set_pki()

This commit is contained in:
Jon Shallow committed 2018-02-12 10:14:01 +00:00
1 parent 752da7179b
commit c4840b7ce1
1 file changed
+4 -3
+4 -3
View File
@@ -546,9 +546,10 @@ int coap_dtls_context_set_pki( coap_context_t *ctx,
}
}
if (!setup_callback) return 0;
if (!setup_callback(context->dtls.ctx, setup_data)) return 0;
if (!setup_callback(context->tls.ctx, setup_data)) return 0;;
if (setup_callback) {
if (!setup_callback(context->dtls.ctx, setup_data)) return 0;
if (!setup_callback(context->tls.ctx, setup_data)) return 0;;
}
if (!context->dtls.ssl) {
context->dtls.ssl = SSL_new(context->dtls.ctx);
if (!context->dtls.ssl)