Create test certificate
Gives a key a test certificate of the built-in test CA of the organisation in one call: the wallet makes the CSR with the key, the test root issues the leaf, and the wallet stores the chain (the leaf and the root) on the key. For development and testing only: the test CA is on no trusted list, and wallets and verifiers outside this platform do not trust it. The answer always has the warning test-certificate.
The body is a CsrRequest (see Generate CSR) with an optional validityDays. The leaf has exactly the values of the request and the certificate preset. The test root of the trust domain of the preset (testCaDomain in List certificate presets) issues it. When the organisation has no root of that domain yet, the wallet makes it first, with this country:
mdoc-iaca:subject.countryof the request, else the country of the newest CA-issued leaf of a key of the organisation, elseEU.providerandaccess: the country of the newest CA-issued leaf of a key of the organisation, elsesubject.country, elseEU.
To choose the country of a root before its first test certificate, use Create test CA. ISO/IEC 18013-5 needs the same country in the Document Signer, the IACA and the mdoc issuing_country: for mdoc-document-signer, mdoc-reader and the *-mdoc presets, another subject.country than the root gives the warning profile-mismatch.
After the call, certificateSource is test-ca and testCertificate is true, and the key can sign with cryptographicKeyFormat x509; a signature carries the leaf only. A key that already has a test certificate gets a new one, and the old leaf goes into the CRL. A key with a chain from another CA is refused: Delete certificate chain first. The key store must have the capabilities csr and certificateChain.
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
keys:update
Path parameters
keyId stringrequiredThe
keyIdof a key of the organisation, from List keys or from the answer of Create key. It is also thekidof its JWK.
Body
The certificate preset and the values of the certificate (CsrRequest), and the optional validity.
presetenum<string> | nullThe certificate preset. An unknown value gives
400(preset: unknown preset; use one of <the preset ids>).Available options:
wrpac-legal,wrpac-natural,pid-provider,wallet-provider,wallet-status-list-signer,eaa-provider,qeaa-provider,pub-eaa-provider,mdoc-document-signer,pid-provider-mdoc,eaa-provider-mdoc,qeaa-provider-mdoc,pub-eaa-provider-mdoc,mdoc-reader,mdoc-status-list-signer,status-list-signer,request-signer-san-dns,customExample:
"mdoc-document-signer"subjectobjectThe subject of the certificate, one value for each attribute. An attribute that the request does not give takes the prefill of the certificate preset;
nullmeans no value. The wallet encodes the subject in X.500 order, from the country to the common name.emailAddressis not allowed: put an email address insubjectAltName.email.subjectAlt Name objectThe subject alternative names of the certificate, at most 50 values of each kind. A kind that the request does not give takes the prefill of the certificate preset. The wallet checks the format of each value and refuses a repeated value.
keyUsage object | nullThe key usage extension.
nullmeans no key usage extension.extendedKey Usage object | nullThe extended key usage extension.
nullmeans no extended key usage extension.certificatePolicies string[] | nullThe certificate policies as OIDs in dotted form, at most 20, each once. For example
0.4.0.194118.1.2(NCP-l-eudiwrp, ETSI TS 119 411-8).qcStatements object | nullThe QC statements.
nullmeans no QC statement.validityDays integer | nullThe validity of the test certificate in days, at most the
maxValidityDaysof the certificate preset. Default thetestCertificateValidityDaysof the preset.From 1 to 3650.
Example:
365
Response
The key with its new test certificate, the warnings and the affected credential configurations.
keyobjectA signing key of the organisation, with its key store, its public JWK and what its certificate allows. It has public values only, never the private key, the name of the key at the provider or a secret. The wallet key of the organisation (the automatic key that the wallet creates at the deployment, the holder identity of the organisation wallet) is not a signing key, and no key answer has it while it has no certificate chain.
warningsobject[]The warnings,
test-certificatefirst, then any ofpreset-override,purpose-reuseandprofile-mismatch.affectedCredential Configurations object[]The credential configurations whose signing key check fitted with the old chain and gives
does-not-fitwith the test certificate. An empty list when there are none.