nx_mtls_pkcs12_ecdsa.nx
buildroot/runtime/nx_mtls_pkcs12_ecdsa.nx
about
nx_mtls_pkcs12_ecdsa.nx -- ECDSA-P256 .p12 driver (the browser-interop-safe provisioning, rung R5c).
Reads the OPAQUE-bound EC identity (priv scalar + self-signed ECDSA cert) emitted by nx_mtls_ecdsa, builds
the EC PKCS#8 (RFC 5915 ECPrivateKey inside a OneAsymmetricKey with the prime256v1 AlgorithmIdentifier),
and wraps it via the key-type-agnostic nx_mtls_emit_pkcs12_from (the proven PBES2 + PKCS#12-KDF/HMAC + PFX
container). DECOUPLED via /tmp files because the x509-build hub (cert/key gen) and the pkcs12 container
(hmac/pbkdf2/sha256) have clashing SHA-256 closures and cannot co-import. Output: a .p12 Chrome/Edge/Firefox
+ the Windows cert store all import. Validated end-to-end by openssl + python (dev-time). license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_mtls_pkcs12.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const K_MAGIC_4096: i64 = 4096 |
| 12 | const K_MAGIC_8192: i64 = 8192 |
functions
| 15 | func ecp_oid_ecpubkey(o: *u8) -> i64 { o[0]=0x2a as u8;o[1]=0x86 as u8;o[2]=0x48 as u8;o[3]=0xce as u8;o[4]=0x3d as u8;o[5]=0x02 as u8;o[6]=0x01 as u8; return 7 } called by 1: main |
| 16 | func ecp_oid_p256(o: *u8) -> i64 { o[0]=0x2a as u8;o[1]=0x86 as u8;o[2]=0x48 as u8;o[3]=0xce as u8;o[4]=0x3d as u8;o[5]=0x03 as u8;o[6]=0x01 as u8;o[7]=0x07 as u8; return 8 } called by 1: main |
| 18 | func ecp_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 24 | func ecp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 25 | func ecp_putn(v: i64) -> i64 { let t: *u8 = sys_mmap(24); var m: i64 = v; var k: i64 = 0; if m==0 { t[0]=48 as u8; k=1 } while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8 = sys_mmap(24); var i: i64=0; while i<k { o[i]=t[k-1-i]; i=i+1 } sys_write(1,o,k); return 0 } |
| 27 | func main() -> i64 |