<p></p>

<h4>Description</h4>
<p>When trying to build <code>examples/dtls-sock</code> with the ECC cyphersuit, the build fails. I am not sure if this is a <code>tinydtls</code> (configuration) problem or a <code>Kconfig</code> problem.</p>

<h4>Steps to reproduce the issue</h4>
<p>Add the following <code>app.config</code> to the <code>examples/dtls-sock</code> directory:</p>
<pre lang="Kconfig"><code>CONFIG_KCONFIG_USEPKG_TINYDTLS=y
CONFIG_DTLS_ECC=y
CONFIG_DTLS_PSK=n
</code></pre>
<p>and try to build</p>
<div class="highlight highlight-source-shell"><pre>make -C examples/dtls-sock/ flash -j</pre></div>

<h4>Expected results</h4>
<p>The application should build.</p>

<h4>Actual results</h4>
<p>The build fails due to the <code>IS_ACTIVE(CONFIG_DTLS_PSK)</code> branch in <code>dtls-client.c</code> being taken at one point:</p>
<pre><code>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);
      |                                             ^~~~~~~~~~~~~~

</code></pre>

<h4>Versions</h4>
<p>Current master (99e614b6d2d4155a736b744). I tested this on <code>native</code>. Compilation and functionality worked in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/RIOT-OS/RIOT/commit/57533a76fdab9a948b528b549ffff8553f858f99/hovercard" href="https://github.com/RIOT-OS/RIOT/commit/57533a76fdab9a948b528b549ffff8553f858f99"><tt>57533a7</tt></a>, where the app was first introduced, but <code>tinydtls</code> did not use Kconfig at that point. Did not bisect further.</p>



<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/issues/16873">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHS6BOJHX5ZRBU6JN3UDA6DRANCNFSM5ENZLYVA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABE7WYFHJALNZ4NN3MUDY53UDA6DRA5CNFSM5ENZLYVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4O5Z5HTA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/issues/16873",
"url": "https://github.com/RIOT-OS/RIOT/issues/16873",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>