Skip to content

coap_openhitls.c: prefer SAN before CN for certificate names#2075

Merged
mrdeep1 merged 1 commit into
obgm:developfrom
tlhc:feat-san
Jun 29, 2026
Merged

coap_openhitls.c: prefer SAN before CN for certificate names#2075
mrdeep1 merged 1 commit into
obgm:developfrom
tlhc:feat-san

Conversation

@tlhc

@tlhc tlhc commented Jun 29, 2026

Copy link
Copy Markdown

Add prefer SAN before CN for certificate names

Copilot AI review requested due to automatic review settings June 29, 2026 07:46
@tlhc tlhc changed the title openHiTLS: prefer SAN before CN for certificate names coap_openhitls.c: prefer SAN before CN for certificate names Jun 29, 2026
@tlhc tlhc changed the title coap_openhitls.c: prefer SAN before CN for certificate names coap_openhitls.c: prefer SAN before CN for certificate names Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the openHiTLS TLS backend to prefer certificate Subject Alternative Name (SAN) DNS entries over the Subject Common Name (CN) when deriving the peer “name” used for callback validation and SNI mismatch checks, aligning behavior with modern certificate validation expectations.

Changes:

  • Add openHiTLS helper logic to extract DNS SAN first and fall back to CN when SAN is unavailable.
  • Extend TLS backend test script with SAN-preferred and CN-fallback PKI test cases and certificate generation.
  • Update the pinned openHiTLS commit reference used by CI.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/coap_openhitls.c Implements SAN-first name extraction (with CN fallback) for openHiTLS certificate name handling.
examples/tls_backend_testcases.sh Adds PKI cert generation and test cases covering SAN preference and CN fallback.
.github/workflows/main.yml Updates the pinned openHiTLS commit used during CI builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/coap_openhitls.c
@mrdeep1

mrdeep1 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

LGTM

@mrdeep1 mrdeep1 merged commit 2bea51a into obgm:develop Jun 29, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants