mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-01 02:27:09 +03:00
coap_openssl.c: Support clients alternating betweek PKI and PSK
This commit is contained in:
1 parent
1096aeedf8
commit
966f73999f
1 file changed
+5
@@ -3289,6 +3289,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