mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-08 18:32:53 +03:00
coap_openssl.c: Support clients alternating betweek PKI and PSK
This commit is contained in:
1 parent
c4e651ae70
commit
f669cf5e24
1 file changed
+5
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user