Inspect CSR (RFC 2986 report, requested extensions, proof of possession)
inspect_csrDecode a PKCS#10 certificate request to read its subject, public key, attributes and requested extensions, and verify its proof-of-possession signature before issuing a certificate.
Instructions
Read-only RFC 2986 report of ONE PKCS#10 certification request: subject (RFC 4514 + RDNs), public key (kind, bits, curve / modulus), every attribute, the extensions requested through extensionRequest decoded as a certificate's would be (rawExtensions:true keeps them undecoded), whether a challengePassword is present (never its text), the signature algorithm, and — by default (verify, one Web Crypto verification) — the proof of possession: signature.valid tells whether the request was signed by the key it carries, with reasons[] (PKI_REASON_SIGNATURE_NOT_CHECKED for SHA-1 without allowSha1:true). That is NOT trust: no CA signed a CSR, and a CA is free to ignore every extension it asks for. Pair with create_certificate (subjectPublicKey = the request) to issue from it. Token-frugal: verbosity:'summary' (subject, key kind, extension kinds, signatureValid), fields:[…]. Input: pem / derBase64 / path (.csr .p10 .der .pem).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Dot-paths to keep after verbosity (arrays map over elements); unmatched paths land in _meta.unmatchedFields. | |
| limits | No | Raise pkinative's 22 named security bounds for this call (trusted input only; absent keys keep the engine defaults). A value above an operator ceiling (PKINATIVE_MCP_MAX_INPUT_BYTES, PKINATIVE_MCP_MAX_KDF_ITERATIONS, PKINATIVE_MCP_MAX_PATHS_EXPLORED) is LIMIT_CEILING_EXCEEDED; describe_engine lists the defaults and the ceilings. | |
| strict | No | Escalate the first engine warning to a PKI_STRICT_DIAGNOSTIC error instead of listing it in diagnostics[]. | |
| verify | No | Verify the request's signature under the key it carries (proof of possession; one Web Crypto verification). false skips it. | |
| pemMode | No | 'strict' (RFC 7468 exactly, default) or 'lax' (tolerates whitespace, line length and RFC 1421 headers). | strict |
| request | Yes | The PKCS#10 request (CERTIFICATE REQUEST PEM or DER): exactly one of pem / derBase64 / path. | |
| allowSha1 | No | Accept or produce SHA-1 signatures (legacy material you already trust). Default false: refused with PKI_CRYPTO_ALGORITHM_REFUSED on read, VALIDATION_ERROR on write. | |
| verbosity | No | 'summary' keeps the scalar fields only (token-frugal). | full |
| encodingRules | No | 'der' (strict X.690 DER, default) or 'ber' (indefinite / non-minimal lengths and constructed strings, as legacy CMS producers write). | der |
| rawExtensions | No | Keep every requested extension undecoded (kind raw, valueDer as hex) — the way past PKI_X509_EXTENSION_MALFORMED. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | No | ||
| version | No | v1 (encoded 0), the only version RFC 2986 defines. | |
| publicKey | No | ||
| signature | No | The proof of possession (verify:true): the signature under the key the request carries. Not trust — a CSR is unsigned by any CA. | |
| sizeBytes | No | ||
| attributes | No | Every attribute in encoded order (extensionRequest, challengePassword, …). | |
| extensions | No | The extensions requested through extensionRequest (RFC 2985 §5.4.2), decoded; null when the request asks for none. A CA is free to ignore them. | |
| diagnostics | No | Non-fatal concerns the engine raised (PKI_DIAG_*, de-duplicated, at most 200; explain_code explains one). | |
| subjectString | No | RFC 4514 subject. | |
| extensionKinds | No | ||
| signatureValid | No | ||
| diagnosticCount | No | ||
| diagnosticCounts | No | Occurrences per diagnostic code. | |
| challengePassword | No | Whether a challengePassword attribute is present (its text is attacker-controlled and never reported). | |
| signatureAlgorithm | No | ||
| diagnosticsTruncated | No | true when distinct diagnostics beyond the 200 listed were dropped. | |
| subjectPublicKeyInfo | No |