Skip to content

Commit

Permalink
examples/dtls-sock: add public key verification
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrolanzieri committed Mar 19, 2024
1 parent 868d839 commit f2b6d28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/dtls-sock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions examples/dtls-sock/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit f2b6d28

Please sign in to comment.