Skip to content

Trusted cert cache and verify callbacks#353

Draft
bigbrett wants to merge 4 commits intowolfSSL:mainfrom
bigbrett:trusted-cert-cache
Draft

Trusted cert cache and verify callbacks#353
bigbrett wants to merge 4 commits intowolfSSL:mainfrom
bigbrett:trusted-cert-cache

Conversation

@bigbrett
Copy link
Copy Markdown
Contributor

@bigbrett bigbrett commented May 5, 2026

Introduces two new features:

  1. Adds a "Trusted cert cache" maintained by the server for each client that "remembers" certificates (intermediate and leaf) after they are verified as trusted in a cert chain verification operation (based on the SHA256 over the cert). Any time the cert is subsequently encountered in a chain verification operation, the public key verification is short-circuited, and the cert is automatically registered as trusted. This feature exists to enhance performance in scenarios where the same cert chain is expected to be encountered multiple times (think wolfBoot cert chain auth for a time-critical boot).
  2. Adds the ability for the user to inject a verify callback into the certificate manager for cert chain verification. This allows the chain verification to be further exteneded or overriden by the user (domain name/SAN validation, etc.). Note that callbacks will NOT be invoked on cached/trusted certs, as this short circuits the entire verification process for that cert.

Copilot AI review requested due to automatic review settings May 5, 2026 16:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


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

Comment thread src/wh_server_cert.c
Comment thread src/wh_server_cert.c Outdated
Comment thread wolfhsm/wh_server_cert_cache.h Outdated
Comment thread src/wh_server_cert.c
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #353

Scan targets checked: wolfhsm-core-bugs, wolfhsm-src

Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread src/wh_server_cert.c Outdated
Comment thread src/wh_server_cert.c
Comment thread src/wh_server_cert.c
Comment thread src/wh_server_cert.c Outdated
Comment thread src/wh_server_cert.c
Comment thread src/wh_server_cert.c
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #353

Scan targets checked: wolfhsm-core-bugs, wolfhsm-src

No new issues found in the changed files. ✅

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