Generate CSR
Makes a certificate signing request (CSR) for a key: the key store signs it, and the wallet stores it. Send the CSR to your CA, then upload the issued chain with Upload certificate chain. For development and testing, Create test certificate does both steps with the built-in test CA.
The key store must have the capability csr (local, vault, gcp-kms, aws-kms, azure-key-vault, dpod). A key of a remote signing key store (csc) gets its certificate from the QTSP.
The body is a CsrRequest. Give the preset of the purpose of the key (List certificate presets): each member that you leave out takes the prefill and the fixed values of the preset, and a value that differs from a fixed value gives the warning preset-override. Use one key for each purpose: a CSR with another preset than the chain of the key gives the warning purpose-reuse.
The wallet checks the request first. An invalid value gives 400 with <field>: <problem>, where <field> is the path of the member (for example subjectAltName.dns.0). The main checks:
subject.countryis an ISO 3166-1 alpha-2 code (Greece isELin an identifier), and the subject has one value for each attribute and noemailAddress.- With a preset that has
etsiSyntaxtrue,subject.organizationIdentifierandsubject.serialNumberfollow ETSI EN 319 412-1 (for exampleVATSE-556677889901,TINSE-1234567890). - The DNS names, URIs, email addresses and telephone numbers of
subjectAltNameare well formed. keyUsage.valueshas nokeyEncipherment,dataEnciphermentor CA key usage.qcStatements.qcPsbhas all three values, andcountryOfLegislationis a country code orEU.- The fields in
requiredof the preset are there, for examplesubject.commonName: required by the preset mdoc-document-signer.
A missing subject.country, subject.organization or subject.commonName takes the prefill of the organisation, also without a preset: send null for no value. The subject is encoded in X.500 order, from the country to the common name. The CA decides what goes into the certificate; Upload certificate chain checks the issued certificate against the preset of the newest CSR of the key.
The older flat body (commonName, organization, sanDns and the other fields at the top level) gives 400 <field>: unknown field: put these values in subject and subjectAltName.
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
keys:sign
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 CSR (CsrRequest). Give the subject values that your CA registered for your organisation.
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,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-dnsExample:
"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.
Response
The CSR, stored with its preset and its request.
csrstringThe CSR in PEM format.
Example:
"-----BEGIN CERTIFICATE REQUEST----- <base64-csr-content> -----END CERTIFICATE REQUEST----- "csrId stringThe ID of the stored CSR.
Example:
"5e1c2f7a-8b3d-4c6e-9f0a-1b2c3d4e5f60"presetstring | nullThe certificate preset of the request.
nullwhen the request has no preset.Example:
"mdoc-document-signer"warningsobject[]The warnings (
preset-override,purpose-reuse). An empty list when there are none.