Skip to content

[not-for-merging] COSE OpenSSL#162

Closed
maxtropets wants to merge 19 commits intomicrosoft:mainfrom
maxtropets:f/cose-openssl-for-native-ports
Closed

[not-for-merging] COSE OpenSSL#162
maxtropets wants to merge 19 commits intomicrosoft:mainfrom
maxtropets:f/cose-openssl-for-native-ports

Conversation

@maxtropets
Copy link
Copy Markdown

No description provided.

Jstatia and others added 19 commits January 19, 2026 10:38
…odularity

This commit implements a comprehensive three-layer native FFI architecture:

**Layer 1: Rust FFI (C ABI)**
- Base FFI crate (cose_sign1_validation_ffi) with opaque handles
- Per-pack FFI crates: certificates, MST, AKV, trust (placeholder)
- Status codes, panic catching, thread-local error messages
- ABI versioning support

**Layer 2: C Projection**
- Modular headers per pack (cose_sign1.h, cose_certificates.h, cose_mst.h, cose_azure_key_vault.h)
- CMake build system with conditional pack linking
- Per-pack options structs (certificate_trust_options, mst_trust_options, akv_trust_options)
- Smoke test validating builder + pack registration

**Layer 3: C++ Projection**
- Modern C++17 RAII wrappers (validator.hpp, certificates.hpp, mst.hpp, azure_key_vault.hpp)
- Exception-based error handling with cose::cose_error
- Fluent builder pattern with method chaining
- Non-copyable, movable resource handles
- Automatic cleanup via destructors
- Smoke test validating all packs with default and custom options

**Architecture Highlights:**
- Per-pack modularity at ALL layers (Rust FFI, C, C++)
- Consumers include/link only packs they need
- CMake defines COSE_HAS_<PACK>_PACK when packs are available
- Zero-cost C++ abstractions over C API
- Comprehensive documentation (ARCHITECTURE.md, FFI_PROJECTIONS_PROGRESS.md)

**Testing:**
- All smoke tests passing (C and C++)
- Requires Rust FFI DLLs in PATH
- 272 Rust tests passing
- Ready for integration testing with real COSE messages

Milestone M2 (C ABI validation parity) substantially complete.
- Add built-in Rust post-signature validator for V1 indirect signature formats

- Add integration tests (kept under tests/) to preserve production-only coverage gates

- Improve Rust llvm-cov stability on Windows and suppress known noisy warning

- Teach native coverage scripts to find VS-bundled CMake and ASAN runtime DLLs
Replace optional ml-dsa usage with pqcrypto-mldsa (PQClean-based) behind the existing pqc-mldsa feature. Update signing-key verification + tests accordingly, and ensure the ASAN coverage pipeline also builds the pqcrypto/PQClean code under ASAN.
Document pqcrypto-mldsa (PQClean) behind pqc-mldsa, note ASAN pipeline behavior for Rust-built C deps, and describe the built-in indirect-signature post-signature validator formats.
Update native/docs/README.md to direct readers to the Rust documentation surfaces as the source of truth, while keeping quick links for vcpkg/CMake consumption and the C/C++ projection guides.
Convert file-path references across native/**/*.md into clickable Markdown links to improve navigation (docs, guides, scripts, and example sources).
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.

2 participants