mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-07 18:12:55 +03:00
By defining the CA file or Root CAs in the client, the server's certificate can be validated by the options in coap_dtls_pki_t parameter even if the client does not define a certificate. [The server must be configured not to require a Client Cert] examples/client.c: Add in the support to the coap-client to allow any of Root CA, CA and Cert to be defined to set up PKI checking. src/coap_gnutls.c: src/coap_openssl.c: Remove the checks in the OpenSSL and GnuTLS underlying support that previously used to enforce that both CA and Cert had to be set in the client. Correct some of the PKI setup error messages to relect whether the failure is on the client or the server. include/coap2/coap_dtls.h: src/coap_gnutls.c: src/coap_notls.c: src/coap_openssl.c: src/coap_tinydtls.c: Convert COAP_DTLS_ROLE_SERVER and COAP_DTLS_ROLE_CLIENT to enum coap_dtls_role_t and use as appropriate to differentiate between the roles in the different DTLS libraries