Repository navigation
Implemention of C509 - #11716
Implemention of C509#11716SparkiDev wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
🟡 Changes recommended
RSA policy enforcement and several documented API behaviors do not match the implementation.
4 open findings
What changed in this PR
Adds C509 certificate decoding, DER reconstruction, key extraction, and signature verification to wolfCrypt.
Changes:
- Implements type-2 and optional type-3 C509 support.
- Adds Autotools, CMake, Zephyr, and Visual Studio integration.
- Adds API documentation, tests, and CI coverage.
| File | Description |
|---|---|
wolfcrypt/src/c509.c |
Implements C509 parsing and verification. |
wolfssl/wolfcrypt/c509.h |
Defines the public C509 API. |
wolfcrypt/test/test.c |
Adds comprehensive C509 tests. |
wolfcrypt/test/test.h |
Declares the C509 test entry point. |
configure.ac |
Adds Autotools feature options. |
CMakeLists.txt |
Adds CMake feature options. |
cmake/functions.cmake |
Adds the source to CMake builds. |
cmake/options.h.in |
Exports C509 feature macros. |
src/include.am |
Adds the implementation to Autotools builds. |
wolfssl/wolfcrypt/include.am |
Installs the public header. |
zephyr/CMakeLists.txt |
Adds the source to Zephyr builds. |
wolfssl.vcxproj |
Adds the source to Visual Studio. |
wolfssl-VS2022.vcxproj |
Adds the source to VS 2022. |
doc/dox_comments/header_files/c509.h |
Documents the public API. |
doc/ALGORITHM_DEFINES.md |
Documents C509 configuration macros. |
ChangeLog.md |
Records the new feature. |
.github/workflows/cmake.yml |
Tests CMake configurations. |
.github/workflows/no-malloc.yml |
Tests no-allocation configurations. |
.github/configs/os-check-linux.json |
Adds Linux configuration coverage. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
60e96bf to
d485ce8
Compare
|
rebased to latest master |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11716
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .github/configs/os-check-linux.json, .github/workflows/cmake.yml, .github/workflows/no-malloc.yml, CMakeLists.txt, ChangeLog.md, cmake/functions.cmake, cmake/options.h.in, configure.ac, doc/ALGORITHM_DEFINES.md, doc/dox_comments/header_files/c509.h, src/include.am, wolfcrypt/test/test.h, wolfssl-VS2022.vcxproj, wolfssl.vcxproj, wolfssl/wolfcrypt/include.am, zephyr/CMakeLists.txt
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Max
philljj
left a comment
There was a problem hiding this comment.
merge conflict, fenrir items
There was a problem hiding this comment.
🟡 Changes recommended
C509 verification still permits 2048-bit RSA issuer keys with 128-bit TLS hardening enabled, falling below the required 3072-bit minimum and requested security strength.
1 open issue
4 resolved since last review
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11716
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .github/configs/os-check-linux.json, .github/workflows/cmake.yml, .github/workflows/no-malloc.yml, CMakeLists.txt, ChangeLog.md, cmake/functions.cmake, cmake/options.h.in, configure.ac, doc/ALGORITHM_DEFINES.md, doc/dox_comments/header_files/c509.h, src/include.am, wolfcrypt/test/test.h, wolfssl-VS2022.vcxproj, wolfssl.vcxproj, wolfssl/wolfcrypt/include.am, zephyr/CMakeLists.txt
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive CBOR parsing, signed-DER reconstruction, and multi-algorithm verification require specialist review and independent interoperability and malformed-input validation beyond the supplied API/build integration evidence.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11716
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .github/configs/os-check-linux.json, .github/workflows/cmake.yml, .github/workflows/no-malloc.yml, CMakeLists.txt, ChangeLog.md, cmake/functions.cmake, cmake/options.h.in, configure.ac, doc/ALGORITHM_DEFINES.md, doc/dox_comments/header_files/c509.h, src/include.am, wolfcrypt/test/test.h, wolfssl-VS2022.vcxproj, wolfssl.vcxproj, wolfssl/wolfcrypt/include.am, zephyr/CMakeLists.txt
Coverage: 0 of 1 in-scope changed file(s) opened by the reviewer; not opened: wolfssl/wolfcrypt/c509.h
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
CBOR Encoded X.509 Certificates Decodes and verifies. Supports ECDSA, RSA, Ed25519 and Ed448 Supports Type 2 - natively signed Supports Type 3 - CBOR re-encoded X.509
|
Moved code into wolfCOSE: |



Description
CBOR Encoded X.509 Certificates
Decodes and verifies.
Supports ECDSA, RSA, Ed25519 and Ed448
Supports Type 2 - natively signed
Supports Type 3 - CBOR re-encoded X.509
Testing
./configure --enable-c509
./configure --enable-c509 --disable-c509-type3