1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

examples/dtls-sock: add public key verification

This commit is contained in:
Leandro Lanzieri 2023-11-04 17:41:10 +01:00
parent 868d8390f4
commit f2b6d28551
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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 = {