code wiki / (root) / nx_x509_chain_verify_test.nx

nx_x509_chain_verify_test.nx

buildroot/runtime/nx_x509_chain_verify_test.nx

10990 B216 linesdepth 14pulls 67 transitivereach 0 importersview sourcekind gate/prooftopic x509
docsdependenciesstructsconstsfunctions

about

nx_x509_chain_verify_test.nx -- KAT for the X.509 chain walker. Builds a synthetic 2-cert chain: leaf: tbs="sample", sig_alg=ECDSA-P256+SHA-256, sig=DER RFC 6979, issuer DN="CN=Root" root: subject DN="CN=Root", pubkey_alg=id-ecPublicKey+prime256v1, pubkey=RFC 6979 §A.2.5 uncompressed chain_verify([leaf, root]) should: 1. DN match: leaf.issuer (17 bytes) == root.subject (17 bytes) 2. Sig verify: leaf's outer sig under root's pubkey (composes nx_x509_verify_under_issuer + nx_x509_verify_ecdsa_p256 which we already proved end-to-end against the RFC 6979 vector) expect_exit: 0 license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_x509.nx nx_x509_dn_match.nx nx_x509_verify_under_issuer.nx nx_x509_chain_verify.nx nx_x509_chain_verify_test.nx

imports: nx_syscalls.nxnx_x509.nxnx_x509_dn_match.nxnx_x509_verify_under_issuer.nxnx_x509_chain_verify.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

30func write_root_dn(buf: *u8, off: i64) -> i64
41func zero_cert(cert: *X509Cert) -> i64
56func main() -> i64