coap_openssl.c: Support clients alternating betweek PKI and PSK

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-06-01 15:16:19 +01:00
1 parent c4e651ae70
commit f669cf5e24
1 file changed
+5
+5
View File
@@ -3309,6 +3309,11 @@ coap_dtls_context_set_pki(coap_context_t *ctx,
#else /* ! COAP_SERVER_SUPPORT */
(void)role;
#endif /* ! COAP_SERVER_SUPPORT */
#if COAP_CLIENT_SUPPORT
if (role == COAP_DTLS_ROLE_CLIENT) {
context->psk_pki_enabled &= ~IS_PSK;
}
#endif /* COAP_CLIENT_SUPPORT */
if (!context->dtls.ssl) {
/* This is set up to handle new incoming sessions to a server */