diff --git a/examples/dtls-sock/Makefile b/examples/dtls-sock/Makefile index 19c63b3f630a..10b264d84268 100644 --- a/examples/dtls-sock/Makefile +++ b/examples/dtls-sock/Makefile @@ -20,6 +20,10 @@ USEPKG += tinydtls # Pull in sock APIs USEMODULE += sock_dtls +# When using asymmetric cryptography, e.g. ecc, +# this verifies the public key against a known set. +# It does not affect symmetric crypto e.g. PSK. +USEMODULE += sock_dtls_verify_public_key USEMODULE += sock_udp # extra utilities for endpoint printing diff --git a/examples/dtls-sock/dtls-client.c b/examples/dtls-sock/dtls-client.c index 011e419a8da1..030e01ab6a7c 100644 --- a/examples/dtls-sock/dtls-client.c +++ b/examples/dtls-sock/dtls-client.c @@ -41,6 +41,7 @@ #ifdef CONFIG_DTLS_ECC static const ecdsa_public_key_t other_pubkeys0[] = { { .x = ecdsa_pub_key0_x, .y = ecdsa_pub_key0_y }, + { .x = ecdsa_pub_key1_x, .y = ecdsa_pub_key1_y }, }; static const credman_credential_t credential0 = {