coap_ws.c: Fix coap_ws_is_supported() check for GnuTLS

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2023-04-13 10:13:54 +01:00
1 parent 8ccde068ad
commit 5c11bc5f00
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -2971,7 +2971,7 @@ main(int argc, char **argv) {
break;
case 'w':
if (!coap_ws_is_supported() || !cmdline_ws(optarg)) {
fprintf(stderr, "WebSckets not enabled in libcoap\n");
fprintf(stderr, "WebSockets not enabled in libcoap\n");
exit(1);
}
enable_ws = 1;
+3 -3
View File
@@ -36,12 +36,12 @@
int
coap_ws_is_supported(void) {
#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) || defined(HAVE_MBEDTLS)
#if defined(HAVE_OPENSSL) || defined(HAVE_LIBGNUTLS) || defined(HAVE_MBEDTLS)
/* Have SHA1 hash support */
return coap_tcp_is_supported();
#else /* !HAVE_OPENSSL && !HAVE_GNUTLS && !HAVE_MBEDTLS */
#else /* !HAVE_OPENSSL && !HAVE_LIBGNUTLS && !HAVE_MBEDTLS */
return 0;
#endif /* !HAVE_OPENSSL && !HAVE_GNUTLS && !HAVE_MBEDTLS */
#endif /* !HAVE_OPENSSL && !HAVE_LIBGNUTLS && !HAVE_MBEDTLS */
}
int