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)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap write_root_dn zero_cert nx_x509_chain_verify nx_u384_scratch_save nx_u384_scratch_init sys_mmap ↻ nx_x509_dn_match nx_u384_scratch_restore nx_x509_sig_alg_identify sys_mmap ↻ asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length sys_now_ms sys_mmap ↻ sys_clock_gettime_mono _cv_verify_memo _cv_der_len nx_x509_verify_under_issue nx_x509_sig_alg_identify ↻ nx_x509_sig_alg_is_support nx_x509_pubkey_alg_identif sys_mmap ↻ asn1_expect_tag ↻ oid_is_ed25519 oid_is_rsa_encryption oid_is_id_ec_public_key oid_is_prime256v1 oid_is_secp384r1 nx_x509_pubkey_alg_is_supp u256_alloc nx_scratch nx_scratch_init nx_scratch_oom sys_mmap ↻ nx_x509_pubkey_extract_ec_

structs

none

consts

none

functions

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