nx_x509_csr_emit.nx
buildroot/runtime/nx_x509_csr_emit.nx
about
nx_x509_csr_emit.nx -- PKCS#10 CSR emitter for Ed25519 (RFC 2986 + RFC 8410).
Closes the CSR-emit gap for ACME finalize step. Composes:
nx_asn1_emit.nx -- DER encoder helpers
nx_ed25519_signature.nx -- ed25519_sign_full over TBS bytes
PKCS#10 CertificationRequest structure (RFC 2986 §4.2):
CertificationRequest ::= SEQUENCE {
certificationRequestInfo CertificationRequestInfo,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
CertificationRequestInfo ::= SEQUENCE {
version INTEGER (0 for PKCS#10 v1.0),
subject Name,
subjectPKInfo SubjectPublicKeyInfo,
attributes [0] IMPLICIT Attributes
}
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING
}
Per RFC 8410 §4, Ed25519 SubjectPublicKeyInfo has:
- algorithm.algorithm = id-Ed25519 (1.3.101.112)
- algorithm.parameters absent (no NULL placeholder)
- subjectPublicKey = 32-byte raw public key
And RFC 8410 §6: the signatureAlgorithm in the outer CSR is
identical (id-Ed25519, no parameters).
Per cardinal feedback-no-third-party-trust-native-or-nothing:
substrate's own CSR emitter; no openssl req, no certbot-builtin.
nx_capability_claims:
needs: [asn1_der_encode, ed25519_sign]
provides: [pkcs10_csr_eddsa_emit, subject_pubkey_info_ed25519]
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_asn1_emit.nxnx_ed25519_signature.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 53 | const NXCSR_OK: i64 = 0 |
| 54 | const NXCSR_OOM_BUFFER: i64 = 1 |
| 55 | const NXCSR_BAD_KEY_LEN: i64 = 2 |
| 56 | const NXCSR_BAD_SUBJECT: i64 = 3 |
| 57 | const NXCSR_SIGN_ERR: i64 = 4 |
| 58 | const NXCSR_BAD_ARG: i64 = 5 |
| 59 | const NXCSR_VERDICT_N: i64 = 6 |
functions
| 61 | func nxcsr_verdict_is_valid(v: i64) -> i64 |
| 67 | func nxcsr_verdict_name(v: i64) -> *u8 |
| 85 | func nx_csr_oid_ed25519(out: *u8) -> i64 |
| 92 | func nx_csr_oid_common_name(out: *u8) -> i64 called by 1: nx_csr_emit_subject_cn |
| 110 | func nx_csr_emit_subject_pubkey_info( called by 1: nx_x509_csr_emit_ed25519 calls 4: nx_csr_oid_ed25519nxae_put_oidnxae_put_tlvnxae_put_bit_string |
| 159 | func nx_csr_emit_subject_cn( called by 1: nx_x509_csr_emit_ed25519 calls 4: nx_csr_oid_common_namenxae_put_oidnxae_put_utf8nxae_put_tlv |
| 221 | func nx_x509_csr_emit_ed25519( |