fix: require valid OpenSSL client certificate for websocket server connections - #1436
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens BACnet/SC websocket server security in the platform-specific libwebsockets ports by requiring clients to present a valid OpenSSL client certificate during TLS handshake.
Changes:
- Enable libwebsockets’ “require valid OpenSSL client cert” server option for Linux.
- Enable the same requirement for BSD/macOS.
- Enable the same requirement for Win32.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ports/win32/websocket-srv.c | Require valid OpenSSL client certificate for incoming websocket server connections. |
| ports/linux/websocket-srv.c | Require valid OpenSSL client certificate for incoming websocket server connections. |
| ports/bsd/websocket-srv.c | Require valid OpenSSL client certificate for incoming websocket server connections. |
| info.server_ssl_private_key_mem_len = key_size; | ||
| info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; | ||
| info.options |= LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND; | ||
| info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; |
| info.server_ssl_private_key_mem_len = key_size; | ||
| info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; | ||
| info.options |= LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND; | ||
| info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; |
| info.server_ssl_private_key_mem_len = (unsigned int)key_size; | ||
| info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; | ||
| info.options |= LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND; | ||
| info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; |
| info.server_ssl_private_key_mem_len = key_size; | ||
| info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; | ||
| info.options |= LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND; | ||
| info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; |
skarg
added a commit
that referenced
this pull request
Aug 4, 2026
* doc: add CVE-2026-64675 to GHSA-mmg6-p4pr-cj6h advisory entry The published advisory for GHSA-mmg6-p4pr-cj6h (pre-auth OOB read in xy_color_decode) was assigned CVE-2026-64675, but the SECURITY.md entry was missing the CVE link. Add it to match the published record. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * doc: add 9 draft advisory entries to SECURITY.md Add entries for all draft GHSA advisories visible after authentication: - GHSA-f23j-5f4w-cxhj: Command object action list resize heap use-after-free write (1.7.0-rc2, PR #1461) - GHSA-rxvq-3mhq-474x: Cross-peer disclosure caused by a BVLC length mismatch (1.4.6/1.5.2/1.6.1/1.7.0, PR #1451) - GHSA-9qx8-hr5x-r35c: Silent decode failure in bacnet_octet_string_decode() (1.4.6/1.5.2/1.6.1/1.7.0, PR #1440) - GHSA-gv7j-28x8-cr37: AtomicWriteFile access-method mismatch leading to RAMFS heap OOB read (1.4.6/1.5.2/1.6.1/1.7.0, PR #1439) - GHSA-gj7v-fwjp-7x8q: Router route-table Tx_Buffer overflow (1.4.6/1.5.2/1.6.1/1.7.0, PR #1438) - GHSA-hg85-pmm3-jfcf: Structured View subordinate-list[0] unbounded resize DoS (1.6.1/1.7.0, PR #1437) - GHSA-92q2-p4vr-fvmp: BACnet/SC hub never requires a client cert (1.4.6/1.5.2/1.6.1/1.7.0, PR #1436) - GHSA-gr74-333w-7wg8: Trailing MORE bit BACnet/SC header option OOB read/write (1.4.6/1.5.2/1.6.1/1.7.0, PR #1435) - GHSA-jgm4-2wg9-jwfg: BACnet/SC node accepts self-signed hub cert MITM (1.4.6/1.5.2/1.6.1/1.7.0, PR #1434) None of these drafts have CVE IDs assigned yet. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
skarg
added a commit
that referenced
this pull request
Aug 11, 2026
skarg
added a commit
that referenced
this pull request
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.