Create test certificate
POST/v2/config/digital-wallet/openid/key-management/keys/:keyId/test-certificate
Gives a key a certificate of the built-in test CA of the organisation, in one call. For development and testing only: the test CA is not on any trusted list, and wallets and verifiers outside this platform do not trust it.
The body is a CsrRequest (the generate CSR operation), with the optional validityDays. The test root of the trust domain of the preset (testCaDomain of the list certificate presets operation) issues the certificate: mdoc-iaca for the mdoc presets, access for the WRPAC presets and request-signer-san-dns, and provider for the other presets. When the organisation has no root of that domain, the wallet first makes it, with this country:
mdoc-iaca: thesubject.countryof the request, else the country of the newest leaf certificate that a CA issued for a key of the organisation, elseEU.providerandaccess: the country of the newest leaf certificate that a CA issued for a key of the organisation, else thesubject.countryof the request, elseEU.
The wallet makes the CSR with the key, and the root issues the leaf with the values of the request: the profile of the preset exactly. The root adds the authority key identifier, the subject key identifier and the CRL distribution point (crlUrl of the root). An mdoc-iaca leaf also has an issuer alternative name (the contact of the root, ISO/IEC 18013-5 Annex B). A provider or access leaf also has the authority information access extension with caIssuers, the certificateUrl of the root (ETSI EN 319 412-2 GEN-4.4.1-2). The serial number has at least 64 random bits, and the leaf is valid from 1 minute before the issue. The leaf is never valid after the root.
The wallet stores the chain (the leaf and the test root) on the key: certificateSource is test-ca and testCertificate is true. The key can then sign with the x509 format. The x5c header and the mdoc x5chain of a signature have the leaf only, without the trust anchor. A key that has a test certificate gets a new one, also from the root of another domain, and the test CA revokes the old test leaf (CRL). A key with a certificate chain from another CA (certificateSource uploaded, imported or qtsp) is refused: delete that chain first.
ISO/IEC 18013-5 needs the same country in the Document Signer, in the root (IACA) and in the mdoc issuing_country. For mdoc-document-signer and mdoc-reader, a subject.country that is not the country of the mdoc-iaca root gives the warning profile-mismatch. To choose the country of a root before the first test certificate of its domain, use the create test CA operation.
This operation is for keys in a key store with the capabilities csr and certificateChain: local, vault, gcp-kms, aws-kms, azure-key-vault and dpod. A sandbox organisation cannot issue a test certificate.
Request
Path Parameters
Unique identifier of the key
- application/json
Body
required
The preset and the values of the certificate (CsrRequest), and the optional validity.
Possible values: [wrpac-legal, wrpac-natural, pid-provider, wallet-provider, wallet-status-list-signer, eaa-provider, qeaa-provider, pub-eaa-provider, mdoc-document-signer, mdoc-reader, mdoc-status-list-signer, status-list-signer, credential-issuer, request-signer-san-dns, custom, null]
The id of a preset of the list certificate presets operation. An unknown id gives 400 (preset: unknown preset; use one of <the preset ids>).
subject object
The subject of the certificate. Each attribute has one value. An attribute that the request does not give takes the prefill of the preset. null is no value. The wallet encodes the subject in X.500 order, from the country to the common name. The subject has no emailAddress: put the email address in subjectAltName.email.
Country (C), an ISO 3166-1 alpha-2 code in upper case. In an identifier, Greece is EL. For an mdoc Document Signer, the country of the issuing authority (the mdoc issuing_country) and the country of the IACA root.
State or province (ST), at most 128 characters. For an mdoc Document Signer, the issuing_jurisdiction when the IACA root has one.
Locality (L), at most 128 characters.
Organisation (O), the registered name of the organisation, at most 256 characters.
Organisational unit (OU), at most 64 characters. Some Certificate Authorities put the identifier that they gave the organisation here.
Common name (CN), at most 64 characters. Use the name of the organisation or of the service. Every preset requires it.
Organisation identifier, at most 128 characters. For a preset with etsiSyntax true, it has the syntax of ETSI EN 319 412-1 clause 5.1.4, for example VATSE-556677889901 (the type VAT, NTR, PSD, LEI, EOR or EXC, the country code, - and the identifier).
Serial number of a natural person, at most 64 characters of an ASN.1 PrintableString. For a preset with etsiSyntax true, it has the syntax of ETSI EN 319 412-1 clause 5.1.3, for example TINSE-1234567890 (the type PAS, IDC, PNO, TIN or EID, the country code, - and the identifier).
Given name of a natural person, at most 128 characters.
Surname of a natural person, at most 128 characters.
subjectAltName object
The subject alternative names of the certificate, at most 50 values of each type. A type that the request does not give takes the prefill of the preset. The wallet checks the format of each value and refuses a repeated value.
DNS names (dNSName). A host name, without an IP address. The first label can be *. Give an international name in the A-label form. The x509_san_dns client identifier prefix of OpenID4VP needs the host of the verifier here.
URIs (uniformResourceIdentifier). An absolute URI with a scheme, at most 2048 characters, for example the support website of a relying party access certificate.
Email addresses (rfc822Name), in the form local-part@domain.
Telephone numbers in the international form of ITU-T E.123, for example +46 8 123 456 78.
keyUsage objectnullable
The key usage extension. null is no key usage extension.
Possible values: [digitalSignature, nonRepudiation, keyAgreement], >= 1
The key usages, each one time.
true: the extension is critical. Without a value, the criticality of the preset applies (true when the preset fixes none).
extendedKeyUsage objectnullable
The extended key usage extension. null is no extended key usage extension.
Possible values: >= 1
The key purposes as OIDs in dotted form, at most 20, each one time. For example 1.0.18013.5.1.2 (ISO/IEC 18013-5 mdoc Document Signer), 1.0.18013.5.1.6 (ISO/IEC 18013-5 reader authentication) or 1.3.6.1.5.5.7.3.45 (Token Status List signer).
true: the extension is critical. Without a value, the criticality of the preset applies (false when the preset fixes none).
The certificate policies as OIDs in dotted form, at most 20, each one time. For example 0.4.0.194118.1.2 (NCP-l-eudiwrp, ETSI TS 119 411-8).
qcStatements objectnullable
The QC statements of ETSI EN 319 412-5 and the QcPSB statement of ETSI TS 119 412-6. null is no QC statement.
The QcType, one OID in dotted form (QcType has one value). For example 0.4.0.194126.1.1 (PID provider), 0.4.0.194126.1.2 (wallet provider) or 0.4.0.1862.1.6.2 (electronic seal).
true: the QcCompliance statement (0.4.0.1862.1.1), an EU qualified certificate.
true: the QcSSCD statement (0.4.0.1862.1.4), the private key is in a qualified signature or seal creation device (QSCD).
qcPsb objectnullable
The QcPSB statement (0.4.0.194126.1.3) of a PuB-EAA provider, with all three values. null is no QcPSB statement; with the preset pub-eaa-provider, null gives the warning preset-override.
The country of the law, an ISO 3166-1 alpha-2 code, or EU for European Union law (ETSI TS 119 412-6 PSB-8.3-05). A PrintableString of two characters in the certificate.
The unambiguous identification of the authentic source (PSB-8.3-04), for example a list of relative distinguished names. At most 2048 characters, no control character.
The identification of the law under which the public sector body is responsible for the authentic source (PSB-8.3-02). Use a URI (RFC 3986) when one exists (PSB-8.3-03). At most 2048 characters, no control character.
Possible values: >= 1 and <= 3650
The validity of the test certificate in days, at most the maxValidityDays of the preset. Without a value, the validity is the testCertificateValidityDays of the preset (the list certificate presets operation).
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
- 503
- 507
The test CA issued the certificate, and the wallet stored the chain on the key.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
key objectrequired
One signing key of the organisation, with the key store that holds it and the DIDs that come from it. The answer has public key material only. It never has the private part of the key, the reference of the key in the provider or a secret.
Unique identifier of the key. The wallet makes it, and it cannot change. The value is the same as jwk.kid.
Possible values: <= 100 characters
Name of the key, given by an administrator when the key is created or with the update key operation. null when the key has no name.
keyStore objectrequired
The key store that holds the key.
Unique identifier of the key store.
Possible values: [local, vault, gcp-kms, aws-kms, azure-key-vault, dpod, csc]
Type of the key store.
Name of the key store.
Possible values: [created, imported, referenced]
How the key came to the organisation. created, the wallet created the key in the key store (also in a cloud KMS or a DPoD partition of the organisation). imported, the import key operation imported the key, with or without a certificate chain. referenced, the key was already in the key store of the provider, and the wallet signs with it there.
Signature algorithm of the key.
Status of the key. The wallet signs with a key that has the status active.
Shows true when the wallet signs with this key by default.
jwk objectrequired
Public key in JSON Web Key (JWK) format. The service sends only public members. It never sends the private key member d.
Key type. The service always sends this member. The keys are elliptic curve keys, so the value is EC.
Elliptic curve identifier. The keys are P-256 keys, so the value is P-256.
X coordinate of the elliptic curve point, in base64url format.
Y coordinate of the elliptic curve point, in base64url format.
Key identifier. The value is the same as keyId.
Signature algorithm for the key, for example ES256 for a P-256 key.
Certificate chain of the key as it is stored, in leaf to root order (for a test certificate, the leaf and the test root). Each item is a base64 encoded DER certificate. The service adds this member only when the key has a certificate chain. The x5c header of a signature and the mdoc x5chain have the leaf and the intermediate certificates, without the trust anchor.
SHA-1 thumbprint of the leaf certificate. The service adds this member only when the key has a certificate chain.
SHA-256 thumbprint of the leaf certificate. Note the # in the member name. The upload certificate chain operation gives the same value as x5t_s256.
Expiry time of the leaf certificate, in UTC. The service adds this member only when the key has a certificate chain.
DIDs that come from this key.
Shows true when the key has an X.509 certificate chain. Then the key can sign with the x509 format.
Possible values: [uploaded, imported, test-ca, qtsp, null]
Where the certificate chain of the key comes from. uploaded, the upload certificate chain operation. imported, the import key operation with a certificate. test-ca, the built-in test CA (the create test certificate operation), for development and testing only. qtsp, the certificate of the QTSP credential. null when the key has no certificate chain.
Shows true only when certificateSource is test-ca. The built-in test CA issued the certificate, which is for development and testing only. Wallets and verifiers outside this platform do not trust it.
The preset of the certificate chain of the key (the list certificate presets operation). For a test certificate, the preset of its request. For an uploaded chain, the preset of the newest CSR of the key. null when there is none.
certificateAssessment object
What the leaf certificate of the key allows: its key usage type, the credential categories that it fits, the mDL Document Signer profile, its QcPSB statement, and the texts of the save check for each category. The wallet reads the certificate chain of the key. A key without a certificate chain, or with a leaf that the wallet cannot read, gives keyUsageType null, empty lists, mdlDocumentSigner false, qcPsb null and texts such as An EAA needs a seal certificate of a legal person. This key has no certificate. Request a certificate with the preset EAA provider (eaa-provider). The texts do not count the trusted-list exemption of the key: an exempt key is never refused.
Possible values: [A, B, C, D, E, F, null]
The key usage type of the leaf certificate (ETSI EN 319 412-2 clause 4.3.2, table 1). A: nonRepudiation. B: nonRepudiation and digitalSignature. C: digitalSignature. D: digitalSignature and keyEncipherment or keyAgreement. E: keyEncipherment or keyAgreement. F: nonRepudiation, digitalSignature and keyEncipherment or keyAgreement. null when the certificate has another key usage (for example with keyCertSign) or no key usage.
Possible values: [none, pid, eaa, qeaa, pub-eaa]
The credential categories that the certificate fits (the list credential categories operation), without none. A PID certificate fits only pid, and a PID certificate with another key usage type fits no category.
Possible values: [none, pid, eaa, qeaa, pub-eaa]
The credential categories that the certificate fits for an mDL configuration, without none. The rules are the same as for fitsCredentialCategories, but eaa, qeaa and pub-eaa also accept key usage Type C. A key signs an mDL configuration only when mdlDocumentSigner is true and the category of the configuration is in this list.
Shows true when the certificate has the Document Signer profile of ISO/IEC 18013-5 Table B.3 (key usage digitalSignature and extended key usage 1.0.18013.5.1.2, both critical). A key signs an mDL (doctype org.iso.18013.5.1.mDL) only with this profile.
qcPsb objectnullablerequired
The QcPSB statement (0.4.0.194126.1.3) of a PuB-EAA provider, with all three values. null when the certificate has no QcPSB statement. A key with this statement signs only the attestations under its law (legislationIdentification, countryOfLegislation) and from its authentic source (authSourceIdentification), ETSI TS 119 412-6 clause 8.3.
The country of the law, an ISO 3166-1 alpha-2 code, or EU for European Union law (ETSI TS 119 412-6 PSB-8.3-05). A PrintableString of two characters in the certificate.
The unambiguous identification of the authentic source (PSB-8.3-04), for example a list of relative distinguished names. At most 2048 characters, no control character.
The identification of the law under which the public sector body is responsible for the authentic source (PSB-8.3-02). Use a URI (RFC 3986) when one exists (PSB-8.3-03). At most 2048 characters, no control character.
categoryMessages objectrequired
For each credential category, the texts of the save check for a configuration that is not an mDL. none is always an empty list.
mdlConfigurationMessages objectrequired
For each credential category, the texts of the save check for an mDL configuration (mso_mdoc with doctype org.iso.18013.5.1.mDL) of that category. First the category rule (with key usage Type C also allowed for eaa, qeaa and pub-eaa), then the ISO/IEC 18013-5 Document Signer rule. none has only the Document Signer rule.
trustedListExemption objectnullable
The trusted-list exemption of a key: the certificate of the key is in a trusted list, or chains to a listed CA. While the exemption applies, a rule of the signing key check that the key does not fit gives the check result exempt and no refusal. The exemption is bound to the leaf certificate that the key had when the exemption was set (leafSha256): with another leaf, applies is false and reason says why and what to do (null while it applies). listUri is the source of the exemption: the URL of the trusted list, or a text, for example a recorded decision. Only the platform operator sets or removes it; the API cannot change it. The other members: listUri (the trusted list), service (the service of the list), certificateSha256 (the SHA-256 fingerprint of the certificate of the list), match (how the certificate of the key matched the list), setAt (the time, in UTC) and setBy (who set it). Each of them can be null.
Shows if the key store keeps the key in a qualified signature creation device (QSCD). false, or provider for a key of a qualified trust service provider (key store type csc): the provider decides. The value comes from the key store.
trust objectnullable
The qualified status of a key of a key store of a qualified trust service provider: its leaf certificate against the EU trusted lists. The wallet checks it when the key is referenced and when the connection of the key store is tested.
Possible values: [qualified, not-qualified, unknown]
qualified: the certificate chains to a qualified certificate authority (service type CA/QC with the status granted) on the EU trusted list, and it is a qualified certificate for electronic signatures or electronic seals whose private key is in a qualified signature or seal creation device (QSCD). not-qualified: the trusted lists say no. unknown: the installation has no EU trusted list source, a list cannot be read, or the key was not checked yet.
Time of the check, in UTC. null when the key was not checked yet.
The facts that gave the result, for example the certificate authority and the trusted list, and whether the trusted list or the certificate says that the key is in a QSCD.
usage object
The number of credential definitions and presentation definitions that sign with the key. Only the list keys operation returns this member. A credential definition counts once, also when several of its configurations or its status lists use the key. The read key usage operation gives the details.
Number of credential definitions that sign with the key.
Number of presentation definitions that sign with the key.
Creation time of the key, in UTC.
Time of the last change of the key, in UTC.
warnings object[]required
The warnings. The first one is always test-certificate. Others can follow (preset-override, purpose-reuse, profile-mismatch).
Possible values: [test-certificate, preset-override, profile-mismatch, purpose-reuse]
The kind of warning. test-certificate, the answer issues or shows a certificate of the built-in test CA: the text is always the text of the example. preset-override, a value of the request is not the fixed value of the preset; the request value applies. profile-mismatch, the certificate does not agree with the preset of the key. purpose-reuse, the certificate chain of the key has a preset, and the new CSR, test certificate or chain upload has another preset: use one key for each purpose.
The text of the warning, for a person.
affectedCredentialConfigurations object[]required
The credential configurations that sign with the key, whose signing key check fitted with the old chain and gives does-not-fit with the test certificate. An empty list when there is none.
The credential definition of the configuration.
The credential configuration id, as in the OID4VCI Credential Issuer Metadata.
The label of the configuration, else its display.name, else the label of the credential definition.
The id of a credential category (the list credential categories operation): the eIDAS category of a credential configuration. none (no certificate rule), pid (person identification data), eaa (non-qualified attestation), qeaa (qualified attestation) or pub-eaa (attestation issued by or for a public sector body).
The rules that the new certificate does not fit, with the fix, as in signingKeyCheck.messages.
{
"key": {
"keyId": "3f2a91c47b8d4e6fa0c5d7e18b924f30",
"name": "PID issuance 2026",
"keyStore": {
"id": "local-openbao",
"type": "local",
"name": "Local vault"
},
"origin": "created",
"algorithm": "ES256",
"status": "active",
"isDefault": true,
"jwk": {
"kty": "EC",
"crv": "P-256",
"x": "<base64url-x-coordinate>",
"y": "<base64url-y-coordinate>",
"kid": "3f2a91c47b8d4e6fa0c5d7e18b924f30",
"alg": "ES256",
"x5c": [
"string"
],
"x5t": "<base64url-sha1-thumbprint>",
"x5t#S256": "<base64url-sha256-thumbprint>",
"x5c_expiry": "2027-11-21T10:00:00Z"
},
"dids": [
"did:key:z2dmzD81cgPx8Vki7JbuuMmFYrWPgYoytykUZ3eyqht1j9KbqZ..."
],
"hasCertificateChain": false,
"certificateSource": null,
"testCertificate": false,
"certificatePreset": null,
"certificateAssessment": {
"keyUsageType": "B",
"fitsCredentialCategories": [
"eaa"
],
"fitsCredentialCategoriesForMdl": [
"eaa"
],
"mdlDocumentSigner": false,
"qcPsb": {
"countryOfLegislation": "SE",
"authSourceIdentification": "cn=Example Register,o=Example AB,c=SE",
"legislationIdentification": "https://www.example.se/law/2026-123"
},
"categoryMessages": {
"none": [
"string"
],
"pid": [
"string"
],
"eaa": [
"string"
],
"qeaa": [
"string"
],
"pub-eaa": [
"string"
]
},
"mdlConfigurationMessages": {
"none": [
"string"
],
"pid": [
"string"
],
"eaa": [
"string"
],
"qeaa": [
"string"
],
"pub-eaa": [
"string"
]
}
},
"trustedListExemption": {
"listUri": "https://example.com/tl/eaa-providers.xml",
"service": "Example EAA provider",
"certificateSha256": "string",
"leafSha256": "string",
"match": "string",
"setAt": "2026-10-22T10:00:00Z",
"setBy": "string",
"applies": true,
"reason": "string"
},
"qscd": false,
"trust": {
"status": "qualified",
"checkedAt": "2026-10-21T10:00:00Z",
"detail": "Qualified certificate for electronic seals; the private key is in a QSCD (the QcSSCD statement of the certificate; the trusted list has no QSCD qualifier for it). Issuer: CN=Intesi Group EU Qualified Electronic Seal CA G3 ECC (CA/QC, granted, trusted list of IT)."
},
"usage": {
"credentialDefinitions": 2,
"presentationDefinitions": 1
},
"createdAt": "2026-10-20T10:00:00Z",
"updatedAt": "2026-10-20T10:00:00Z"
},
"warnings": [
{
"code": "test-certificate",
"message": "Development and testing only. The built-in test CA is not on any trusted list, and wallets and verifiers outside this platform do not trust it. Do not use it in production."
}
],
"affectedCredentialConfigurations": []
}
A check of the request failed (<field>: <problem>, as for the generate CSR operation), the preset is unknown, validityDays is more than the preset allows (validityDays: at most <n> days for the preset <preset id> (<document>)), the test root of the domain expired (The test CA of the organisation for the domain <domain> expired on <time>.), the key store of the key cannot make a CSR (a QTSP key store), or the organisation is a sandbox organisation (Subwallets are not allowed to issue test certificates.).
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Unauthorized
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
The installation switched the test CA off (The built-in test CA is switched off in this installation.).
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
The organisation has no key with this key ID (Key not found: <keyId>).
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
The key has a certificate chain from another CA (The key has a certificate chain from another CA. Delete the chain first.). The delete certificate chain operation removes it.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Internal server error
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
The key store of the key or the local key store of the test CA does not answer, for example Failed to issue the test certificate: Key management service is not available.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Insufficient Storage: the HSM partition of the key store has no room for a new key. This is the partition of the installation HSM (the local key store in a hardware security module), or the DPoD partition of a key store of your organisation. The text is The HSM partition has no room for a new key. Remove unused key pairs (kms signer orphans list) or give the partition more room. A new try fails the same way: the answer has no Retry-After, so do not send the request again before room is free. For the installation HSM, the operator of the installation removes the unused key pairs or gives the partition more room. For a DPoD partition of your organisation, delete unused key pairs in the partition or give it more room. Some operations put the text after their own text: the test CA (Failed to make the test CA: The HSM partition has no room ...), the deploy of the organisation wallet (Failed to deploy the OpenID digital wallet for organisation ID <id>: ...) and the create of a sandbox organisation (Failed to deploy sandbox organisation: ...). A route that signs can also give this answer for an organisation that has no default key yet, because the wallet makes the default key the first time that it needs it.
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
{
"errorCode": 507,
"errorDescription": "The HSM partition has no room for a new key. Remove unused key pairs (kms signer orphans list) or give the partition more room."
}