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

Martine Lenders notifications at github.com
Tue Sep 21 10:22:16 CEST 2021


<!--
====================================
IF YOUR ISSUE IS RELATED TO SECURITY
====================================
please submit it to the security mailing-list security at riot-os.org.

If your issue is a question related to the usage of RIOT, please submit it to
our forum at https://forum.riot-os.org.
-->

#### Description
When trying to build `examples/dtls-sock` with the ECC cyphersuit, the build fails. I am not sure if this is a `tinydtls` (configuration) problem or a `Kconfig` problem.
<!--
Example: Cannot build gnrc_networking application for samr21-xpro board.
-->

#### Steps to reproduce the issue
Add the following `app.config` to the `examples/dtls-sock` directory:

```Kconfig
CONFIG_KCONFIG_USEPKG_TINYDTLS=y
CONFIG_DTLS_ECC=y
CONFIG_DTLS_PSK=n
```

and try to build

```sh
make -C examples/dtls-sock/ flash -j
```

<!--
Try to describe as precisely as possible here the steps required to reproduce
the issue. Here you can also describe your hardware configuration, the network
setup, etc.
-->

#### Expected results
The application should build.
<!--
Example: The gnrc_networking application builds on samr21-xpro.
-->

#### Actual results
The build fails due to the `IS_ACTIVE(CONFIG_DTLS_PSK)` branch in `dtls-client.c` being taken at one point:

```
examples/dtls-sock/dtls-client.c: In function ‘client_send’:
examples/dtls-sock/dtls-client.c:169:24: error: ‘credential1’ undeclared (first use in this function); did you mean ‘credential0’?
  169 |     res = credman_add(&credential1);
      |                        ^~~~~~~~~~~
      |                        credential0
dtls-sock/dtls-client.c:169:24: note: each undeclared identifier is reported only once for each function it appears in
dtls-sock/dtls-client.c:183:45: error: ‘_client_psk_cb’ undeclared (first use in this function)
  183 |     sock_dtls_set_client_psk_cb(&dtls_sock, _client_psk_cb);
      |                                             ^~~~~~~~~~~~~~

```
<!--
Please paste or specifically describe the actual output.
-->

#### Versions
Current master (99e614b6d2d4155a736b744). I tested this on `native`. Compilation and functionality worked in 57533a76fdab9a948b528b549fff, where the app was first introduced, but `tinydtls` did not use Kconfig at that point. Did not bisect further.
<!--
Operating system: Mac OSX, Linux, Vagrant VM
Build environment: GCC, CLang versions (you can run the following command from
the RIOT base directory: make print-versions).
-->

<!-- Thanks for contributing! -->


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210921/3d11d807/attachment.htm>


More information about the notifications mailing list