[riot-notifications] [RIOT-OS/RIOT] Kconfig/tinydtls: Unable to compile `examples/dtls-sock` with `CONFIG_DTLS_ECC` enabled (#16873)

Leandro Lanzieri notifications at github.com
Tue Sep 21 11:33:40 CEST 2021


I think PSK and ECC are mutually exclusive in that application, as you point out with dtls-client.c. It even seems to be the case in https://github.com/RIOT-OS/RIOT/commit/57533a76fdab9a948b528b549ffff8553f858f99, as it has:
```C

#ifdef DTLS_ECC
static const ecdsa_public_key_t other_pubkeys[] = {
    { .x = ecdsa_pub_key_x, .y = ecdsa_pub_key_y },
};

static const credman_credential_t credential = {
    .type = CREDMAN_TYPE_ECDSA,
    .tag = SOCK_DTLS_CLIENT_TAG,
    .params = {
        .ecdsa = {
            .private_key = ecdsa_priv_key,
            .public_key = {
                .x = ecdsa_pub_key_x,
                .y = ecdsa_pub_key_y,
            },
            .client_keys = (ecdsa_public_key_t *)other_pubkeys,
            .client_keys_size = ARRAY_SIZE(other_pubkeys),
        }
    },
};

#else /* ifdef DTLS_PSK */
static const uint8_t psk_id_0[] = PSK_DEFAULT_IDENTITY;
static const uint8_t psk_key_0[] = PSK_DEFAULT_KEY;

static const credman_credential_t credential = {
    .type = CREDMAN_TYPE_PSK,
    .tag = SOCK_DTLS_CLIENT_TAG,
    .params = {
        .psk = {
            .key = { .s = psk_key_0, .len = sizeof(psk_key_0) - 1, },
            .id = { .s = psk_id_0, .len = sizeof(psk_id_0) - 1, },
        }
    },
};
#endif
```
I don't think it's related to the Kconfig option, but to the application itself.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/16873#issuecomment-923805148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210921/4d507120/attachment-0001.htm>


More information about the notifications mailing list