pkiaas Command Reference
Manage your PKIaaS certificate authorities and keys. AI agents: start with the agent guide, or run pkiaas help agents.
Commands
Every command with its arguments and flags, apart from the global flags below and --server.
pkiaas├── ca│ ├── create --csr-only --days=INT --extended-key-usage=STRING --idempotency-key=STRING --key-type=STRING --key-usage=STRING --name=STRING --path-length=INT --set --signature-algorithm=STRING --subject=STRING --yes│ ├── delete NAME|ID --dry-run --yes│ ├── export --ca=STRING --chain --cps --csr --force --format=STRING --out=STRING│ ├── list│ ├── set NAME|ID│ ├── show --ca=STRING│ └── update --ca=STRING --cep=STRING --cep-password-env=STRING --cep-password-file=STRING --cep-username=STRING --cps-file=STRING --dry-run --policy-oid=STRING --service-key-type=STRING --service-signature-algorithm=STRING├── cert│ ├── export SERIAL --ca=STRING --chain --csr --force --format=STRING --out=STRING│ ├── list --ca=STRING --expires-within=INT --key-type=STRING --limit=INT --match=STRING --order=STRING --reason=STRING --search=STRING --sort=STRING --status=STRING --template=STRING│ ├── revoke SERIAL --ca=STRING --reason=STRING --yes│ ├── show SERIAL --ca=STRING --text│ └── unrevoke SERIAL --ca=STRING├── csr│ └── create --cn=STRING --force --format=STRING --key=STRING --key-passphrase-env=STRING --key-passphrase-file=STRING --out=STRING --san=STRING --subject=STRING├── help├── key│ ├── create --force --format=STRING --no-passphrase --out=STRING --passphrase-env=STRING --passphrase-file=STRING --type=STRING│ └── types├── log│ └── list --ca=STRING --level=STRING --limit=INT --order=STRING --search=STRING --since=STRING --sort=STRING --until=STRING├── login --device├── logout --all├── pkcs12│ └── create --cert=STRING --chain-file=STRING --force --key=STRING --key-passphrase-env=STRING --key-passphrase-file=STRING --legacy --no-passphrase --out=STRING --passphrase-env=STRING --passphrase-file=STRING├── request│ ├── approve ID --ca=STRING --chain --force --format=STRING --not-after=STRING --not-before=STRING --out=STRING --san=STRING --subject=STRING│ ├── create --approve --ca=STRING --chain --csr=STRING --force --format=STRING --idempotency-key=STRING --not-after=STRING --not-before=STRING --out=STRING --san=STRING --subject=STRING --template=STRING│ ├── decline ID --ca=STRING --yes│ ├── list --ca=STRING --limit=INT --order=STRING --search=STRING --sort=STRING│ └── show ID --ca=STRING├── template│ └── list --ca=STRING --limit=INT├── version --licenses└── whoamiGlobal flags
| Flag | Type | Description |
|---|---|---|
--json | bool | print the result, or the error, as JSON |
-h, --help | bool | show help for the command; with --json, as JSON |
Environment
| Variable | Use |
|---|---|
PKIAAS_TOKEN | a token to use instead of the stored login (e.g. in CI); never print it |
PKIAAS_SERVER | the server to use when --server isn’t given, e.g. https://pkiaas.io |
PKIAAS_CA | the name (any case) or ID of the CA that commands work in when --ca isn’t given, instead of the active CA; scripts should give the ID |
Exit codes and error codes are listed in the agent guide.
pkiaas ca
Create certificate authorities, list them, show one, change its settings, export its certificate, CSR or CPS, set the active one, delete one.
pkiaas ca [flags]Commands:
pkiaas ca createpkiaas ca deletepkiaas ca exportpkiaas ca listpkiaas ca setpkiaas ca showpkiaas ca update
pkiaas ca create
Create a CA, self-signed or (with —csr-only) waiting for another CA to sign it.
pkiaas ca create --name NAME [--subject DN] [--key-type TYPE] [--signature-algorithm sha256|sha384|sha512] [--days N] [--path-length N] [--key-usage USAGE]... [--extended-key-usage USAGE]... [--csr-only] [--set] [--idempotency-key KEY] [--yes] [flags]Create a certificate authority owned by you, as the website’s “Create a Managed CA” form does. The platform makes the CA’s key, which never leaves it, and self-signs the CA’s certificate, so the new CA is a root CA. It also makes the CA’s OCSP responder certificate and gives it a copy of the “Web Server” template, so it can issue certificates at once. It takes a few seconds (SLH-DSA keys up to about 5). The result is the new CA, as pkiaas ca show describes it; commands take its id (or name) with --ca. It doesn’t become the active CA unless --set is given, which sets it as pkiaas ca set does.
--name is the CA’s name: its certificate’s common name, at most 64 characters. --subject gives the certificate’s other subject fields in RFC 4514 form (“O=Example,OU=IT,C=US”) or OpenSSL’s (“/C=US/O=Example/OU=IT”): only C, ST, L, O and OU, each at most once. --key-type is the CA’s key type: the flag lists those a CA can have, which pkiaas key types describes. --signature-algorithm is ignored for ML-DSA and SLH-DSA keys, which have their own. sha1 is for testing only: SHA-1 is broken for collisions, and OpenSSL 3 (at its default security level) and Windows reject SHA-1 certificate chains. The command prints a warning on standard error and asks for confirmation on the terminal; without one, it needs --yes. Give --yes only when the person asked for SHA-1. --days is how long the certificate is valid (1 to 36500). --path-length limits how many CAs may follow this one in a chain (0 to 4; 0: it can only issue end-entity certificates); without it there is no limit.
--key-usage and --extended-key-usage (repeatable, or comma-separated) add to the certificate’s key usages, which always include digitalSignature, keyCertSign and cRLSign. A CA usually has no extended key usages: those it has limit every certificate it issues, and Windows and some other clients enforce that.
With --csr-only, the CA isn’t signed: it waits for another CA to sign its CSR, which pkiaas ca export --csr exports, and for the signed certificate to be imported on the website. Until then it can’t issue certificates.
Each run is a new CA, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same flags: within 24 hours that gives the earlier result instead of a second CA. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for different flags is refused (error idempotency_key_reused).
You can create at most 20 CAs an hour; beyond that the server refuses with http_429 and says when to try again. If a step fails on the server, nothing is kept and the command fails with ca_creation_failed, naming the step. pkiaas ca delete deletes a CA you no longer need.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--csr-only | bool | leave the CA unsigned, for another CA to sign its CSR (pkiaas ca export --csr) |
--days | int | how many days the CA’s certificate is valid (1-36500). Default: 3650. |
--extended-key-usage | string, repeatable | an extended key usage (repeatable): serverAuth, clientAuth, codeSigning, emailProtection, timeStamping, OCSPSigning, msCodeInd, msCodeCom, msCTLSign, msEFS, ipsecIKE, ipsecEndSystem, ipsecTunnel, ipsecUser |
--idempotency-key | string | repeat an earlier run with this key instead of creating a second CA (default: a new random key) |
--key-type | string | the CA’s key, made on the platform: rsa-2048, rsa-4096, ec-p256, ec-p384, ec-p521, ml-dsa-44, ml-dsa-65, ml-dsa-87, slh-dsa-sha2-128s, slh-dsa-sha2-128f, slh-dsa-sha2-192s, slh-dsa-sha2-192f, slh-dsa-sha2-256s, slh-dsa-sha2-256f, slh-dsa-shake-128s, slh-dsa-shake-128f, slh-dsa-shake-192s, slh-dsa-shake-192f, slh-dsa-shake-256s, slh-dsa-shake-256f. Default: rsa-2048. |
--key-usage | string, repeatable | a key usage to add (repeatable): digitalSignature, keyCertSign, cRLSign, keyEncipherment, nonRepudiation, dataEncipherment, keyAgreement, encipherOnly, decipherOnly |
--name | string | the CA’s name: its certificate’s common name (at most 64 characters) |
--path-length | int | how many CAs may follow this one in a chain, 0-4 (default: no limit) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--set | bool | also make the new CA the active CA, as pkiaas ca set does |
--signature-algorithm | string | the hash the CA signs with: sha1, sha256, sha384 or sha512 (ignored for ML-DSA and SLH-DSA; sha1 for testing only). Default: sha256. |
--subject | string | the certificate’s other subject fields, C, ST, L, O and OU, e.g. “O=Example,OU=IT,C=US” |
--yes | bool | create a SHA-1 CA without asking for confirmation |
Examples:
pkiaas ca create --name "Example Root CA" --subject "O=Example,C=US"pkiaas ca create --name "Example Root CA" --key-type ec-p384 --signature-algorithm sha384 --days 7300 --set --jsonpkiaas ca create --name "Example Issuing CA" --subject "O=Example,OU=IT,C=US" --path-length 0 --csr-only --jsonpkiaas ca create --name "Test CA $RUN" --key-type ec-p256 --days 7 --idempotency-key "$KEY" --jsonpkiaas ca create --name "SHA-1 test CA" --signature-algorithm sha1 --days 7 --yesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, gives this result again instead of a second CA |
Side effects:
- creates a CA owned by the user’s account on the server; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - the platform makes the CA’s private key and keeps it; it never leaves the platform
- the platform also makes the CA’s OCSP responder certificate and copies the “Web Server” template to the CA
- counts toward the limit of 20 CAs per user an hour
- with
--signature-algorithmsha1 (RSA and EC keys), prints a warning on standard error and asks for confirmation on the terminal (--yesskips the question) - with
--set, keeps the new CA as the active one in the CLI’s config.json, for this server
pkiaas ca delete
Delete a CA, with its certificates, requests and templates.
pkiaas ca delete NAME|ID [--dry-run] [--yes] [flags]Delete a certificate authority, by its name (in any case) or ID from pkiaas ca list. The CA has to be named: it is never the active CA or PKIAAS_CA by default. A name that more than one of your CAs has is refused (error ca_ambiguous): give the ID then. Only the CA’s owner can delete it (error forbidden for a CA shared with you).
Deleting a CA deletes every certificate it issued, its pending requests, templates, ACME policies and log lines. OCSP, the CRL, SCEP, ACME and CEP stop answering for it, so clients can no longer check its certificates, and its public pages are removed. Its ACME accounts stop working, and the other users it is shared with lose it. For a CA whose key is on the user’s HSM, the HSM keeps the key. It can’t be undone.
The command first asks the server what the delete takes with it (a dry run, which changes nothing) and prints that. --dry-run stops there; with --json, the result is the dry run: ca and impact. Otherwise, on a terminal, it asks for the CA’s name to be typed: only the exact name deletes the CA, anything else stops and deletes nothing. Without a terminal, give --yes, which deletes without asking; without it, the command stops with a usage error.
The delete is sent with the version of the CA the dry run saw: if someone changed the CA in between, nothing is deleted and it fails with ca_changed: run the command again to see the impact now. Running it again after it succeeded fails with not_found, as for a CA that never existed; if a retry of the same delete finds the CA gone, the result says it is deleted. If the CA was the active CA on this computer, that setting is cleared: commands then use the CA you last used on the website, else the first by name, as pkiaas ca show says.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--dry-run | bool | show what the delete would take with it, and delete nothing |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | delete without asking for the CA’s name; only after the person saw what the delete takes with it and agreed |
Examples:
pkiaas ca delete "Test CA 1234" --dry-runpkiaas ca delete "Test CA 1234" --dry-run --jsonpkiaas ca delete "Test CA 1234"pkiaas ca delete "Test CA 1234" --yes --jsonpkiaas ca delete a1B2c3D4e5 --yesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
id | string, optional | the deleted CA’s ID (not with --dry-run) |
name | string, optional | the deleted CA’s name (not with --dry-run) |
deleted | boolean, optional | true: the CA is deleted, also when an earlier try of the same delete did it (not with --dry-run) |
ca | object, optional | --dry-run only: the CA the delete would remove |
ca.id | string | the CA’s ID |
ca.name | string | the CA’s name |
impact | object, optional | --dry-run only: what deleting the CA takes with it |
impact.activeCertificates | integer | issued certificates that are still valid and not revoked: OCSP and the CRL stop answering for them |
impact.certificates | integer | the certificates the CA issued (not its own OCSP, SCEP and timestamp certificates), all deleted |
impact.pendingRequests | integer | requests that wait for approval or signing, all deleted |
impact.templates | integer | the CA’s templates, all deleted |
impact.acmeAccounts | integer | ACME accounts of the CA’s ACME policies, which stop working |
impact.delegates | integer | other users the CA is shared with, who lose it too |
impact.hsm | boolean | the CA’s key is on the user’s HSM, which keeps it; PKIaaS.io deletes only its copy of the CA’s certificate |
impact.reversible | boolean | always false: a deleted CA can never be restored |
Side effects:
- deletes the CA on the server, with every certificate it issued, its pending requests, templates, ACME policies and log lines; nothing with
--dry-run - OCSP, the CRL, SCEP, ACME and CEP stop answering for the CA, its public pages are removed, its ACME accounts stop working, and the users it is shared with lose it
- it can’t be undone; an HSM keeps the key of a CA whose key is on it
- clears the active CA in the CLI’s config.json if it was this CA
pkiaas ca export
Export a CA’s certificate, its chain, the CSR of an unsigned CA, or its CPS.
pkiaas ca export [--chain | --csr | --cps] [--format pem|der] [--out FILE] [--ca NAME|ID] [flags]Export the certificate of a CA, by default the active CA. The chain (--chain) is the CA’s certificate followed by the certificates that issued it, up to the root; for a root CA that is its certificate alone. It is what a server needs beside a certificate the CA issued, and what pkiaas pkcs12 create --chain-file adds to a PKCS#12 file. The certificate of a root CA is what clients add to their trust store.
A CA waiting for its signed certificate fails with ca_not_signed. With --csr, it exports such a CA’s certificate signing request instead (e.g. of a CA made with pkiaas ca create --csr-only), for another CA to sign; the signed certificate is then imported on the website. A signed CA has no CSR to export (error conflict). An --out file with a CSR is readable by its owner only, as for pkiaas cert export --csr.
With --cps, it exports the CA’s certification practice statement, the text of its public page, as stored: Markdown, or HTML for a CPS written in the website’s old editor (the result’s format says which). Edit it and send it back with pkiaas ca update --cps-file. --format doesn’t apply to it.
Without --out (or with --out -), the output goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. With --out FILE, it is written to the file, which is only replaced with --force, and the result describes it.
--format is pem (default) or der, as OpenSSL’s -outform. PEM is what servers, OpenSSL and pkiaas pkcs12 create read; DER (.cer, .der) is the binary form Windows and Java also take. DER holds one certificate, so it can’t be used with --chain. Like OpenSSL, it goes to standard output as it is, also to a terminal.
With --chain, the output holds the certificate followed by the certificates that issued it, up to the root: what a server sends (e.g. nginx’s ssl_certificate).
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | export the CA’s certificate followed by the certificates that issued it |
--cps | bool | export the CA’s CPS (Markdown, or HTML for an old one) instead, to edit it for pkiaas ca update --cps-file |
--csr | bool | export the CSR of a CA that waits for its signed certificate instead |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-o, --out | string | the file to write (default: standard output, as with -) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca exportpkiaas ca export --out ca.pempkiaas ca export --chain --out chain.pem --jsonpkiaas ca export --ca a1B2c3D4e5 --format der --out root.cerpkiaas ca export --csr --ca a1B2c3D4e5 --out ca.csr --jsonpkiaas ca export --cps > cpspkiaas ca export --cps --ca a1B2c3D4e5 --out cps --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
id | string | the CA’s ID |
name | string or null | the CA’s name |
file | string | the file written (--out) |
format | string | pem or der (--format); for --cps, markdown or html, as the CPS is stored |
content | string | what the file holds: certificate, chain (--chain: the CA’s certificate followed by those that issued it), csr (--csr) or cps (--cps) |
certificates | integer | how many certificates the file holds; 0 for a CSR |
Side effects:
- with
--out, writes the file (readable by everyone for certificates and the CPS, which are public; by its owner only for a CSR); otherwise writes to standard output and prints no result
pkiaas ca list
List the CAs you have access to.
pkiaas ca list [flags]List the certificate authorities your account has access to: your own, and those you were invited to, by name. Commands take a CA’s name, in any case, or its ID; scripts should keep the ID, which never changes and no other CA has. The active CA, which commands work in unless told otherwise, is marked with *.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca listpkiaas ca list --jsonWith --json, the result is an array of objects with these fields:
| Field | Type | Description |
|---|---|---|
id | string | the CA’s ID, which commands take to name the CA, like its name; scripts should keep the ID |
name | string or null | the CA’s name (its certificate’s common name) |
signed | boolean | false while the CA waits for its signed certificate to be imported |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
active | boolean | whether it is the active CA, which commands work in unless told otherwise |
pkiaas ca set
Set the active CA.
pkiaas ca set NAME|ID [flags]Set the active CA, which commands work in unless told otherwise, by its name (in any case) or ID from pkiaas ca list. A name that more than one of your CAs has is refused (error ca_ambiguous): give the ID then. The ID is kept, so renaming the CA doesn’t change it. It is kept on this computer, for this server, until pkiaas logout; it doesn’t change the CA you work in on the website.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca set "Example Issuing CA"pkiaas ca set a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the active CA’s ID; null if the account has no CAs |
name | string or null | the active CA’s name |
source | string | why it is active: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name), or none |
Side effects:
- keeps the CA as the active one in the CLI’s config.json, for this server
pkiaas ca show
Show a CA’s details, by default the active CA’s.
pkiaas ca show [--ca NAME|ID] [flags]Show a CA’s details: its key, certificate (serial, thumbprint, validity), how many certificates it has issued that are still valid, and the URLs of its public services (certificate, chain, CRL, OCSP, time stamping, CPS page and Windows enrollment).
Without --ca or PKIAAS_CA, it shows the active CA: the CA that commands work in unless told otherwise. It is the one set with pkiaas ca set (or at login), on this computer for this server. Until one is set, it is the CA you last worked in on the website. The result’s source says how the CA was chosen. When the account has no CAs, the id, the name and the details are null, and source is none.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca showpkiaas ca show --jsonpkiaas ca show --ca "Example Issuing CA"pkiaas ca show --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
pkiaas ca update
Change a CA’s settings: its CPS, policy identifier, Windows enrollment (CEP) and service certificate key.
pkiaas ca update [--ca NAME|ID] [--cps-file FILE] [--policy-oid OID] [--cep on|off] [--cep-username NAME --cep-password-env NAME | --cep-password-file FILE] [--service-key-type TYPE] [--service-signature-algorithm sha256|sha384|sha512|sha1] [--dry-run] [flags]Change the settings of a CA, by default the active CA, as the website’s Edit CA page does. Only the settings whose flags are given change; the others stay as they are. The CA’s name, key and certificate can’t be changed. Changing settings needs the modify privilege in the CA (error forbidden without it).
--cps-file is the CA’s new certification practice statement (CPS), the text of its public page, in Markdown (- for standard input). To edit the CPS, export it (pkiaas ca export --cps > cps), change the file, and send it back (pkiaas ca update --cps-file cps). An HTML CPS written in the website’s old editor is replaced by the Markdown you send; convert it on the website to keep its formatting.
--policy-oid is the certificate policy OID (dotted, at most 50 characters) the CA puts in the certificates of templates with policies, next to the address of its CPS page. --policy-oid none removes it: certificates then get neither the policy nor the CPS address.
--cep on|off turns Windows certificate enrollment (CEP/CES) on or off. It needs a user name and password, which Windows clients enroll with: --cep-username with the password from --cep-password-env NAME (an environment variable) or --cep-password-file FILE (its first line; - for standard input), never as an argument. Both replace the stored ones; without them the stored ones are kept. The CA’s CEP URLs are in pkiaas ca show.
--service-key-type is the key of the CA’s OCSP responder and time-stamping certificates, as pkiaas key types names it. --service-signature-algorithm is the hash they are signed with; ML-DSA and SLH-DSA keys have their own, so it doesn’t apply to them. With a new RSA or EC key type and no --service-signature-algorithm, the stored hash is kept (sha256 if there is none). The certificates get the new key when they are next made: when they expire (yearly) or are revoked.
The command reads the CA’s settings, changes those given, and sends them all back with the version it read. If someone changed the CA in between, nothing is saved and it fails with ca_changed: run it again. Running it again after it succeeded changes nothing more. When the CA already has the settings given, nothing is sent and the result is the CA as it is. --dry-run sends nothing and shows what would change, each setting old → new; with --json, the CA as it is now with dryRun true and changes.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--cep | string | turn Windows certificate enrollment (CEP/CES) on or off |
--cep-password-env | string | read the CEP password from this environment variable. Not with --cep-password-file. |
--cep-password-file | string | read the CEP password from this file’s first line (- for standard input). Not with --cep-password-env. |
--cep-username | string | the CEP user name, with the password from --cep-password-env or --cep-password-file; replaces the stored ones |
--cps-file | string | the new CPS, in Markdown, from this file (- for standard input); pkiaas ca export --cps exports the current one |
--dry-run | bool | send nothing; show what would change |
--policy-oid | string | the certificate policy OID, in dotted form, e.g. 2.5.29.32.0 (at most 50 characters), or none |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--service-key-type | string | the key of the OCSP and time-stamping certificates: rsa-2048, rsa-4096, ec-p256, ec-p384, ec-p521, ml-dsa-44, ml-dsa-65, ml-dsa-87, slh-dsa-sha2-128s, slh-dsa-sha2-128f, slh-dsa-sha2-192s, slh-dsa-sha2-192f, slh-dsa-sha2-256s, slh-dsa-sha2-256f, slh-dsa-shake-128s, slh-dsa-shake-128f, slh-dsa-shake-192s, slh-dsa-shake-192f, slh-dsa-shake-256s, slh-dsa-shake-256f |
--service-signature-algorithm | string | the hash they are signed with: sha256, sha384, sha512 or sha1 (not for ML-DSA and SLH-DSA keys; default: the stored one, else sha256) |
Examples:
pkiaas ca update --cps-file cpspkiaas ca update --cps-file cps --dry-runpkiaas ca update --cep on --cep-username enroll --cep-password-env CEP_PASSWORD --jsonpkiaas ca update --cep offpkiaas ca update --ca a1B2c3D4e5 --policy-oid 1.3.6.1.4.1.99999.1 --jsonpkiaas ca update --ca "Example CA" --policy-oid none --dry-runpkiaas ca update --service-key-type ec-p384 --service-signature-algorithm sha384 --dry-run --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the CA is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting, as in settings: policyOid, cps.format, cps.text, cep.enabled, cep.credentials, serviceCertificates.keyType or serviceCertificates.signatureAlgorithm |
changes[].from | string or null | its value now, as text: for cps.text the size, e.g. “2153 bytes”; for cep.enabled on or off; for cep.credentials set, or null if none are stored; null if not set |
changes[].to | string or null | its new value, as from; for cep.credentials always “replaced” (the user name and password are never shown) |
Side effects:
- changes the CA’s settings on the server, only those given; nothing when the CA already has them, or with
--dry-run - with
--cep-username, replaces the stored CEP user name and password, which Windows clients enroll with - OCSP and time-stamping certificates use the new key from their next renewal (yearly, or when revoked)
- an HTML CPS written in the website’s old editor is replaced by the Markdown you send; convert it on the website to keep its formatting
- the CA’s log records the change
pkiaas cert
List the certificates a CA issued, show one, export it, its chain or its CSR, revoke it.
pkiaas cert [flags]Commands:
pkiaas cert export
Export a certificate, with its chain, or the CSR it was issued from, as PEM or DER.
pkiaas cert export SERIAL [--chain | --csr] [--format pem|der] [--out FILE] [--ca NAME|ID] [flags]Export a certificate that a CA issued, by default the active CA, by its serial number from pkiaas cert list.
With --csr, it exports the certificate signing request the certificate was issued from instead. It is stored for most certificates, but not all (e.g. not for ACME): pkiaas cert show says whether (hasCsr), and a certificate without one fails with csr_not_stored. A CSR sent by SCEP holds the enrollment’s challenge password, so every exported CSR is a secret: an --out file with it is readable by its owner only, and without --out it goes to standard output only when that is a terminal (in a pipe or captured output the command fails with secret_destination); give --out - to pipe it.
Without --out (or with --out -), the output goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. With --out FILE, it is written to the file, which is only replaced with --force, and the result describes it.
--format is pem (default) or der, as OpenSSL’s -outform. PEM is what servers, OpenSSL and pkiaas pkcs12 create read; DER (.cer, .der) is the binary form Windows and Java also take. DER holds one certificate, so it can’t be used with --chain. Like OpenSSL, it goes to standard output as it is, also to a terminal.
With --chain, the output holds the certificate followed by the certificates that issued it, up to the root: what a server sends (e.g. nginx’s ssl_certificate).
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Its output (the CSR, with —csr) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | export the certificate followed by the CA’s certificate and those that issued the CA |
--csr | bool | export the CSR the certificate was issued from instead |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-o, --out | string | the file to write (default: standard output, as with -) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 | openssl x509 -noout -subjectpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --chain --out fullchain.pem --jsonpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --format der --out www.cerpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --csr --out - | openssl req -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
file | string | the file written (--out) |
format | string | pem or der (--format) |
content | string | what the file holds: certificate, chain (--chain: the certificate, the CA’s certificate and those that issued the CA) or csr (--csr) |
certificates | integer | how many certificates the file holds; 0 for a CSR |
Side effects:
- with
--outFILE, writes the file (readable by everyone for certificates, by its owner only for a CSR); otherwise writes to standard output (a CSR only with--out- or to a terminal) and prints no result
pkiaas cert list
List the certificates a CA issued, the newest first.
pkiaas cert list [--ca NAME|ID] [--search TEXT] [--match FIELD:VALUE]... [--status S] [--expires-within DAYS] [--template NAME|ID] [--key-type T] [--reason R] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the certificates a CA issued, by default the active CA’s: every certificate it signed, also expired and revoked ones and the CAs it signed, the newest first. The serial is what commands take to name a certificate.
It lists the first --limit certificates (default 50, at most 1000); total says how many match, so when it is more, narrow the list with the filters or sort it to bring the ones you need first. --sort takes name, revocationReason, template, validFrom, validTo, keyType or keySize, in --order asc (the default with --sort) or desc. Without --sort: validFrom, desc.
The filters are checked on the server, and a certificate is listed when all that are given hold: --search TEXT the text is in the common name, a subject value or a SAN value, in any case; when it is hex (at least 8 digits; colons and spaces between the bytes are ignored), also in the serial or the SHA-1 thumbprint --match FIELD:VALUE one subject attribute or SAN type has this whole value, in any case; * matches any text (dns:*.example.com also matches the wildcard name *.example.com itself). FIELD is a subject attribute by its OpenSSL short or long name (CN, C, ST, L, O, OU, postalCode, street, emailAddress, serialNumber, businessCategory, jurisdictionC, jurisdictionST, jurisdictionL; e.g. organizationName) or a SAN type (DNS, IP, URI, email, RID, dirName, otherName). Repeat it for more, up to 10; all have to match --status S,… valid, expired or revoked --expires-within DAYS expires within this many days (1-3650) and hasn’t expired yet; revoked ones too, so add --status valid for the certificates to renew --template NAME|ID issued with this template (its name or ID from pkiaas template list, enabled or not) --key-type TYPE,… the key’s keyType as the list shows it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 --reason R,… revoked with one of these reasons, e.g. keyCompromise, superseded, certificateHold
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--expires-within | int | only certificates that expire within this many days and haven’t expired. Default: 0. |
--key-type | string, repeatable | only certificates with one of these key types, e.g. rsaEncryption, id-ecPublicKey |
--limit | int | how many certificates to list (1-1000). Default: 50. |
--match | string, repeatable | only certificates whose subject attribute or SAN FIELD has this VALUE, * for any text (repeatable) |
--order | string | asc or desc (default: asc with --sort) |
--reason | string, repeatable | only certificates revoked with one of these reasons, e.g. keyCompromise |
--search | string | only certificates with this text in the common name, a subject or SAN value, or (hex) the serial or thumbprint |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: name, revocationReason, template, validFrom, validTo, keyType, keySize (default: validFrom, desc) |
--status | string, repeatable | only certificates with one of these statuses: valid, expired, revoked |
--template | string | only certificates issued with this template, by name or ID |
Examples:
pkiaas cert listpkiaas cert list --search example.com --jsonpkiaas cert list --match dns:*.example.com --match o:Contoso --jsonpkiaas cert list --status valid --expires-within 30 --sort validTo --jsonpkiaas cert list --search 25:ab:76:5c:72:38:b3:d2 --jsonpkiaas cert list --status revoked --reason keyCompromise,cACompromise --jsonpkiaas cert list --template "Web Server" --key-type rsaEncryption --limit 200 --jsonpkiaas cert list --sort name --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificates |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many certificates match; more than are listed when it exceeds --limit |
certificates | object[] | the first --limit matching certificates, in the --sort and --order order |
certificates[].serial | string | the serial number in hex, which commands take to name the certificate in its CA |
certificates[].name | string or null | the certificate’s common name |
certificates[].status | string | valid, expired, or revoked (also when it has expired since) |
certificates[].template | string or null | the template it was issued with; null for a CA certificate the CA signed, or a deleted template |
certificates[].validFrom | string | when it became valid (ISO 8601, UTC) |
certificates[].validTo | string | when it expires (ISO 8601, UTC) |
certificates[].keyType | string | the algorithm of its key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey |
certificates[].keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
certificates[].revocation | object or null | null unless the certificate is revoked |
certificates[].revocation.reason | string or null | the reason, as RFC 5280 names it, e.g. keyCompromise, superseded or certificateHold |
certificates[].revocation.revokedAt | string or null | when it was revoked (ISO 8601, UTC); null for the few revocations stored without a date |
pkiaas cert revoke
Revoke a certificate.
pkiaas cert revoke SERIAL --reason REASON [--ca NAME|ID] [--yes] [flags]Revoke a certificate that a CA issued, by default the active CA’s, by its serial number from pkiaas cert list. The CA’s next CRL and OCSP responses list it as revoked.
--reason is one of RFC 5280’s reasons: unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation or certificateHold. certificateHold suspends the certificate: pkiaas cert unrevoke undoes it, and revoking it again with another reason makes it final, from the time it was put on hold. Every other reason is final: it can’t be undone or changed (error revocation_final).
It asks for confirmation on a terminal; without one, give --yes. Revoking a certificate that is revoked with the same reason changes nothing and succeeds, so the command is safe to run again. Revoking needs a subscription, the user’s or the CA owner’s (error subscription_required).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--reason | string | why: unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation or certificateHold |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | revoke without asking for confirmation |
Examples:
pkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason keyCompromisepkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason superseded --yes --jsonpkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason certificateHold --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
reason | string | the reason it is revoked with, as RFC 5280 names it |
revokedAt | string or null | when it was revoked (ISO 8601, UTC); for a certificate taken off hold for good, when it was put on hold |
Side effects:
- revokes the certificate on the server, and clears the CA’s cached CRL and the certificate’s OCSP responses; only certificateHold can be undone (cert unrevoke)
pkiaas cert show
Show a certificate’s details.
pkiaas cert show SERIAL [--ca NAME|ID] [--text] [flags]Show a certificate that a CA issued, by default the active CA, by its serial number from pkiaas cert list: its status (valid, expired or revoked, with the reason and date), template, validity, key, signature algorithm and thumbprint, and whether its CSR is stored. The serial is hex, with or without colons, in any case.
With --text, it adds every field and extension of the certificate as ‘openssl x509 -text’ describes them (its subject alternative names, key usages, policies and so on).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--text | bool | add the certificate as ‘openssl x509 -text’ describes it |
Examples:
pkiaas cert show 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert show 25:AB:76:5C:72:38:B3:D2:8D:2B:AB:03:27:1F:5F:A8:F2:FC:CF:86 --jsonpkiaas cert show 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --text --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the serial number in hex |
name | string or null | the certificate’s common name |
status | string | valid, expired, or revoked (also when it has expired since) |
template | string or null | the template it was issued with; null for a CA certificate the CA signed, or a deleted template |
validFrom | string | when it became valid (ISO 8601, UTC) |
validTo | string | when it expires (ISO 8601, UTC) |
keyType | string | the algorithm of its key, as OpenSSL names it |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply |
signatureAlgorithm | string | the algorithm of its signature, as OpenSSL names it |
thumbprint | string | its SHA-1 fingerprint (hex), as Windows shows it |
revocation | object or null | null unless the certificate is revoked |
revocation.reason | string or null | the reason, as RFC 5280 names it, e.g. keyCompromise, superseded or certificateHold |
revocation.revokedAt | string or null | when it was revoked (ISO 8601, UTC); null for the few revocations stored without a date |
hasCsr | boolean | whether the CSR it was issued from is stored, for pkiaas cert export --csr |
text | string or null | with --text, the certificate as ‘openssl x509 -text’ describes it; otherwise null |
pkiaas cert unrevoke
Take a certificate off hold (certificateHold).
pkiaas cert unrevoke SERIAL [--ca NAME|ID] [flags]Take a certificate that is on hold (revoked with reason certificateHold) off hold, so that the CA’s next CRL and OCSP responses show it as valid again. Other reasons are final (error revocation_final).
A certificate that isn’t revoked stays as it is, and the command succeeds, so it is safe to run again. Unrevoking needs a subscription, the user’s or the CA owner’s (error subscription_required).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas cert unrevoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert unrevoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
Side effects:
- deletes the certificate’s revocation (certificateHold) on the server, and clears the CA’s cached CRL and the certificate’s OCSP responses
pkiaas csr
Create certificate signing requests on this computer.
pkiaas csr [flags]Commands:
pkiaas csr create
Create a certificate signing request (CSR).
pkiaas csr create --key FILE (--cn NAME | --subject DN) [--out FILE] [--format pem|der] [flags]Create a PKCS#10 certificate signing request signed with your private key.
The subject is either just a common name (--cn) or a full distinguished name (--subject), in RFC 4514 form (“CN=host.example.com,O=Example,C=US”) or OpenSSL’s form (“/C=US/O=Example/CN=host.example.com”). In Git Bash, use the RFC 4514 form: Git Bash rewrites arguments that start with ”/“.
Subject alternative names (--san, repeatable) are dns:NAME, ip:ADDRESS, email:ADDRESS or uri:URI; without a prefix the kind is guessed. If no --san is given and the common name is a DNS name, it is added as one, because browsers and most clients only check SANs. With --san, list the common name too.
--key is a PEM or DER file, or - for standard input. An encrypted key’s passphrase then has to come from --key-passphrase-env or --key-passphrase-file, since it can’t be prompted for.
Without --out (or with --out -), the CSR goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. --format is pem (default) or der, as OpenSSL’s -outform.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Flags:
| Flag | Type | Description |
|---|---|---|
--cn | string | the subject’s common name. Not with --subject. |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-k, --key | string | the private key file, PEM or DER (- for standard input). Required. |
--key-passphrase-env | string | read the key passphrase from this environment variable. Not with --key-passphrase-file. |
--key-passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --key-passphrase-env. |
-o, --out | string | the file to write (default: standard output, as with -) |
--san | string, repeatable | a subject alternative name (repeatable) |
--subject | string | the subject’s distinguished name. Not with --cn. |
Examples:
pkiaas csr create --key server.key --cn www.example.com --san www.example.com --san example.com --out server.csrpkiaas csr create --key server.key --key-passphrase-env KEY_PASSPHRASE --subject "CN=www.example.com,O=Example,C=US" --san ip:192.0.2.10 --out server.csr --jsonpkiaas csr create --key server.key --cn www.example.com | openssl req -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the CSR file (--out) |
keyType | string | the key’s type, as in pkiaas key types |
subject | string | the subject’s distinguished name, RFC 4514 form |
sans | string[] | the subject alternative names, each as kind:value (dns:, ip:, email:, uri:) |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex |
Side effects:
- with
--out, writes the file; otherwise writes the CSR to standard output and no result
pkiaas help
Show help for a command, or the guide for AI agents.
pkiaas help [command... | agents] [flags]Show help for a command. pkiaas help agents shows the guide for AI agents: how to run pkiaas without prompts, keep secrets out of transcripts, log in, and handle each error code.
With --json, the command and those under it are described as JSON: every flag, example, result field, side effect, exit code and error code. pkiaas <command> --help --json does the same.
Examples:
pkiaas help agentspkiaas help --jsonpkiaas help --json key createpkiaas key
Create private keys on this computer.
pkiaas key [flags]Commands:
pkiaas key create
Create a private key.
pkiaas key create [--out FILE] [--format pem|der] [flags]Create a private key in PKCS#8 form, and save it in a file that only you can read.
The key is encrypted with a passphrase (AES-256-CBC, PBKDF2-HMAC-SHA256 with 600,000 iterations) unless --no-passphrase is given. Run pkiaas key types to list the key types.
The key is a secret, so without --out it goes to standard output only when that is a terminal, followed by a notice that it wasn’t saved; in a pipe or captured output the command fails with secret_destination. --out - sends it to standard output anyway, as OpenSSL writes it, to pipe to another command. There is no result then, so --json needs --out FILE. Prefer --out FILE: a key on standard output can end up in logs and transcripts. --format is pem (default) or der, as OpenSSL’s -outform.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Its output (the key) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
--no-passphrase | bool | save the key unencrypted |
-o, --out | string | the file to write (default: standard output, as with -) |
--passphrase-env | string | read the key passphrase from this environment variable. Not with --passphrase-file. |
--passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --passphrase-env. |
--type | string | the key type. Default: rsa-2048. |
Examples:
pkiaas key create --out server.keypkiaas key create --type ml-dsa-65 --out pq.key --passphrase-env KEY_PASSPHRASE --jsonpkiaas key create --type ec-p256 --out ci.key --no-passphrase --jsonpkiaas key create --type ec-p256 --no-passphrase --out - | openssl pkey -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the key file (--out) |
type | string | the key type, as in pkiaas key types |
encrypted | boolean | whether the key is encrypted with a passphrase |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex; the CSR and PKCS#12 commands report the same value |
Side effects:
- with
--outFILE, writes the file, readable by the owner only; with--out- or to a terminal, writes the key to standard output and no result
pkiaas key types
List the key types.
pkiaas key types [flags]List the key types pkiaas key create --type accepts: RSA, EC, Ed25519 and Ed448, and the post-quantum ML-DSA and SLH-DSA types. PKIaaS signs CSRs for all of them, but few clients accept the post-quantum types yet.
Examples:
pkiaas key types --jsonWith --json, the result is an array of objects with these fields:
| Field | Type | Description |
|---|---|---|
name | string | the name to give to --type |
description | string | what the key type is |
default | boolean | whether it is the default type |
pkiaas log
List what the platform logged for your CAs, for troubleshooting.
pkiaas log [flags]Commands:
pkiaas log list
List the latest log lines of your CAs.
pkiaas log list [--ca NAME|ID]... [--level LEVEL] [--since TIME] [--until TIME] [--search TEXT] [--sort time|ca [--order asc|desc]] [--limit N] [flags]List what the platform logged for your CAs, as the website’s Logs page does: SCEP, CEP/CES and ACME requests, certificate approvals, revocations and the errors they met, by default the latest ones. Use it to find out why something failed, e.g. a device’s enrollment or a signing. It changes nothing.
By default it lists the lines of all the CAs your account has, its own and those it was invited to: unlike the commands that work in one CA, it doesn’t use the active CA or PKIAAS_CA. --ca NAME|ID (any case for a name) keeps the lines of that CA; repeat it for more, up to 20. Lines are deleted after a while (by default 30 days).
--level LEVEL keeps the lines of this level and the more severe ones: emergency, alert, critical, error, warning, notice, info or debug (the least severe), e.g. --level warning for warnings and errors.
--since TIME keeps the lines logged at that time or later, --until TIME those logged before it. TIME is an RFC 3339 time (2026-10-24T08:00:00Z, or with an offset such as -05:00), a date (2026-10-24, midnight in this computer’s time zone), or how long ago: a number with m, h or d (90m, 24h, 7d). The result says which times they stood for.
--search TEXT keeps the lines with that text in the message or the client’s IP address, in any case, e.g. a device’s name, a certificate’s serial or an error.
It lists --limit lines (default 50, at most 1000), the latest ones; total says how many match, so when it is more, narrow the list with --ca, --level, --since, --until or --search. It lists them in time order, as logs are read: the oldest first, the newest last, by the prompt. --sort time --order asc lists the earliest lines instead. --sort ca groups the lines by the CA’s name, in --order asc (the default) or desc, each group in time order; it picks the lines of the first names, the latest of each.
Each line shows, as log tools do: the time (RFC 3339, in this computer’s time zone, which TZ changes, e.g. TZ=UTC), the level, the CA’s name in brackets (a ] or \ in it escaped with ), the IP address of the client whose request it logs (- for the platform’s own work) and the message. Control characters in it show as escapes such as \x1b. --json has the CA’s id and name, the level, the time (UTC), the IP address ("" for none) and the message, unescaped.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string, repeatable | only the lines of this CA, by its name (any case) or ID from pkiaas ca list; repeatable, up to 20 (default: all your CAs, not the active CA) |
--level | string | only lines of this level or more severe: emergency, alert, critical, error, warning, notice, info, debug |
--limit | int | how many lines to list (1-1000). Default: 50. |
--order | string | asc or desc (default: desc with --sort time, the latest lines; asc with --sort ca) |
--search | string | only lines with this text in the message or the IP address, in any case (at most 100 characters) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--since | string | only lines logged at this time or later: RFC 3339, a date (midnight in this computer’s time zone), or how long ago (90m, 24h, 7d) |
--sort | string | what picks the lines: time, ca (default: time, desc, the latest lines); they are listed in time order, grouped by CA with ca |
--until | string | only lines logged before this time: RFC 3339, a date (midnight in this computer’s time zone), or how long ago (90m, 24h, 7d) |
Examples:
pkiaas log listpkiaas log list --ca "Example Root CA" --level warningpkiaas log list --since 24h --search "challenge password"pkiaas log list --since 2026-10-24 --until 2026-10-25 --search 203.0.113.7 --jsonpkiaas log list --ca a1B2c3D4e5 --ca f6G7h8I9j0 --level error --jsonpkiaas log list --sort ca --jsonpkiaas log list --json --limit 200With --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
since | string, optional | the time --since stands for (ISO 8601, UTC): only lines logged then or later; only with --since |
until | string, optional | the time --until stands for (ISO 8601, UTC): only lines logged before it; only with --until |
total | integer | how many lines match; more than are listed when it exceeds --limit |
logs | object[] | --limit matching lines, the latest unless --sort time --order asc, in time order: the oldest first, the newest last (with --sort ca grouped by the CA’s name, in time order within it) |
logs[].ca | object | the CA the line belongs to |
logs[].ca.id | string | the ID of the CA the line belongs to, which --ca takes |
logs[].ca.name | string or null | the CA’s name (its certificate’s common name) |
logs[].level | string | how severe it is, as syslog names the levels: emergency, alert, critical, error, warning, notice, info or debug |
logs[].time | string | when it was logged (ISO 8601, UTC) |
logs[].ip | string | the IP address of the client whose request it logs; empty for the platform’s own work |
logs[].message | string | what happened, e.g. a SCEP, CEP/CES or ACME request, an approval or a revocation, and why it failed |
pkiaas login
Log in to a PKIaaS server.
pkiaas login [flags]Log in to a PKIaaS server, by default https://pkiaas.io or the server of your last login.
Your browser opens to log in and to allow the CLI. On a computer without a browser (e.g. over SSH), use --device: it shows a code to enter on another device. The token is kept in the system keyring, or where there is none in a file only you can read. PKIAAS_TOKEN, if set, is used instead of a stored token.
Login shows the active CA, which commands work in unless told otherwise: the one set before with pkiaas ca set, else the CA you last worked in on the website. Change it with pkiaas ca set.
A person has to approve the login in their browser. AI agents: ask the user to run it, see pkiaas help agents.
This command calls the PKIaaS server and needs the user to take part.
Flags:
| Flag | Type | Description |
|---|---|---|
--device | bool | log in by entering a code in a browser on another device |
--server | string | the PKIaaS server, e.g. https://pkiaas.io (default: the last one you logged in to) |
Examples:
pkiaas loginpkiaas login --devicepkiaas login --server https://pki.example.comWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server logged in to |
email | string or null | the account’s email address |
displayName | string or null | the account’s name |
provider | string | the identity provider the account signs in with, e.g. google |
storedIn | string | where the token is kept: the system keyring, or the path of the owner-only file |
activeCaId | string or null | the active CA’s ID, which commands work in unless told otherwise; null if the account has no CAs |
activeCaName | string or null | the active CA’s name |
Side effects:
- stores the token in the system keyring or an owner-only file
- remembers the server for later commands
- keeps the active CA: the one set before, else the CA last used on the website
- emails the account about the new login, if it has an email address
pkiaas logout
Log out of a PKIaaS server.
pkiaas logout [flags]Log out: revoke the token on the server and delete it from this computer.
With --all, every CLI login of your account is revoked, on every computer. Use it if a token may have leaked.
This command calls the PKIaaS server.
Flags:
| Flag | Type | Description |
|---|---|---|
--all | bool | revoke every CLI login of your account, on every computer |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas logoutpkiaas logout --allWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server logged out of |
revoked | integer, optional | with --all, how many logins were revoked on the server |
removedLocalToken | boolean | whether a token stored on this computer was deleted |
Side effects:
- revokes the token on the server (with
--all, every CLI login of the account) - deletes the stored token
- forgets the active CA for the server
pkiaas pkcs12
Create PKCS#12 (.pfx/.p12) files on this computer.
pkiaas pkcs12 [flags]Commands:
pkiaas pkcs12 create
Combine a key and its certificate into a PKCS#12 file.
pkiaas pkcs12 create --key FILE --cert FILE [--chain-file FILE] [--out FILE] [flags]Combine a private key, its certificate and the CA chain into a PKCS#12 (.pfx/.p12) file.
--key may be PEM or DER; --cert and --chain-file may be PEM, DER or PKCS#7 (.p7b) files. One of them may be - for standard input, e.g. a certificate piped from pkiaas cert export; passphrases then have to come from an environment variable or a file, since they can’t be prompted for. --cert may hold the whole chain (e.g. a fullchain.pem); the certificate whose public key matches the key is used, and the others are added as the chain, followed by any in --chain-file.
The file is protected with AES-256-CBC, PBKDF2-HMAC-SHA256 and an HMAC-SHA256 MAC, which Windows 10 1709 and later, macOS, Java 12 and later, and OpenSSL 1.1.1 and later read. --legacy uses 3DES and a SHA-1 MAC for older systems. --no-passphrase writes the key unencrypted, for programs that load PKCS#12 files without a password; protect such a file like a plain private key.
The PKCS#12 file holds the key, so it is a secret: without --out, it (always DER, as OpenSSL writes it) goes to standard output only when that is a terminal, and in a pipe or captured output the command fails with secret_destination. --out - sends it to standard output anyway, to pipe to another command. There is no result then, so --json needs --out FILE.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Its output (the PKCS#12 file) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--cert | string | the certificate file (PEM, DER or PKCS#7; may include the chain; - for standard input). Required. |
--chain-file | string | a file with the CA certificates (PEM, DER or PKCS#7; - for standard input). Not with --chain. |
--force | bool | replace the --out file if it exists |
-k, --key | string | the private key file, PEM or DER (- for standard input). Required. |
--key-passphrase-env | string | read the key passphrase from this environment variable. Not with --key-passphrase-file. |
--key-passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --key-passphrase-env. |
--legacy | bool | use 3DES and SHA-1 for older Windows, macOS and Java |
--no-passphrase | bool | don’t encrypt the file |
-o, --out | string | the file to write (default: standard output, as with -) |
--passphrase-env | string | read the PKCS#12 password from this environment variable. Not with --passphrase-file. |
--passphrase-file | string | read the PKCS#12 password from this file’s first line (- for standard input). Not with --passphrase-env. |
Examples:
pkiaas pkcs12 create --key server.key --cert server.pem --chain-file ca.pem --out server.pfxpkiaas pkcs12 create --key server.key --key-passphrase-env KEY_PASSPHRASE --cert server.pem --chain-file ca.pem --out server.pfx --passphrase-env PFX_PASSPHRASE --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the PKCS#12 file (--out) |
format | string | how the file is protected: aes-256, legacy-3des or unencrypted |
subject | string | the certificate’s subject |
certificates | integer | how many certificates the file holds, the certificate and its chain |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex |
Side effects:
- with
--outFILE, writes the file, readable by the owner only; with--out- or to a terminal, writes the PKCS#12 file to standard output and no result
pkiaas request
Request certificates from a CA, list the pending requests, approve or decline them.
pkiaas request [flags]Commands:
pkiaas request approvepkiaas request createpkiaas request declinepkiaas request listpkiaas request show
pkiaas request approve
Approve a request: the CA signs its CSR and issues the certificate.
pkiaas request approve ID [--subject DN] [--san NAME]... [--not-before TIME] [--not-after TIME] [--ca NAME|ID] [--out FILE|- [--chain] [--format pem|der] [--force]] [flags]Approve a request to a CA, by default the active CA, by its ID from pkiaas request list: the CA signs its CSR as the request’s template says, as the website’s Sign button does without changes, and the command ends once the certificate is issued (on a CA whose key is on an IoT HSM, that can take a few seconds). The result’s serial is the certificate’s: pkiaas cert export SERIAL outputs it. Check the request first with pkiaas request show.
By default the certificate holds what the CSR asks for, as the template allows. --subject, --san, --not-before and --not-after change that, as the website’s “Override requested attributes” and “Override validity time” do, for a request that is readyToBeSigned (statusDetail in pkiaas request show): --subject DN the subject in place of the CSR’s, in RFC 4514 form (“CN=www.example.com,O=Example,C=US”) or OpenSSL’s (“/C=US/O=Example/CN=www.example.com”), as pkiaas csr create takes it; the template’s subject attributes still win --san NAME the subject alternative names in place of the CSR’s (repeatable; list them all): dns:NAME, ip:ADDRESS, email:ADDRESS or uri:URI, or a bare name whose kind is guessed --not-after TIME when the certificate expires, in place of the template’s validity (RFC 3339, e.g. 2027-01-31T00:00:00Z); it is valid from now, or from --not-before TIME Without a subscription, while the CA has a validity limit (validityLimitDays), the validity can’t be changed (subscription_required). Values OpenSSL won’t take are refused (invalid_overrides), and nothing is signed.
Only a request that waits for approval (pendingApproval) and has a CSR can be approved; otherwise the error is request_not_approvable (no CSR, pending email confirmation, pre-approved, or changes to a request that isn’t readyToBeSigned), request_declined, or request_processing while it is being signed. If the CA can’t sign it (e.g. its IoT HSM doesn’t answer), the error is signing_failed: the request waits for approval again, and the CA’s log on the website says why.
Approving a request that is issued already changes nothing and succeeds, so the command is safe to run again, e.g. after a lost connection; the certificate is never signed again, so changes given then aren’t applied.
With --out FILE, it also writes the issued certificate to the file (PEM, or DER with --format der; with --chain, followed by the certificates that issued it, up to the root), which is only replaced with --force; the result names it (file). With --out -, standard output holds only the certificate, for piping, and there is no result (so no --json). The file is checked before anything is approved.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | with --out: add the CA’s certificate and those that issued the CA, up to the root |
--force | bool | with --out: replace the file if it exists |
--format | string | with --out: pem or der (as OpenSSL’s -outform). Default: pem. |
--not-after | string | the certificate expires at this time (RFC 3339) in place of the template’s validity |
--not-before | string | the certificate is valid from this time (RFC 3339) in place of now; needs --not-after |
-o, --out | string | also write the issued certificate to this file; - for standard output, instead of the result |
--san | string, repeatable | issue the certificate with this subject alternative name in place of the CSR’s (repeatable) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--subject | string | issue the certificate with this subject (distinguished name) in place of the CSR’s |
Examples:
pkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --out - > www.pempkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --chain --out fullchain.pem --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --san www.example.com --san example.com --not-after 2027-01-31T00:00:00Z --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --subject "CN=www.example.com,O=Example,C=US" --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to, which issued the certificate |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | issued |
name | string or null | the request’s name (the CSR’s common name) |
template | string or null | the template’s name |
templateId | string or null | the template’s ID |
serial | string or null | the certificate’s serial number: pkiaas cert export SERIAL outputs it |
file | string or null | the --out file the certificate was written to (with --chain, followed by its chain); null without --out |
Side effects:
- the CA signs the request’s CSR and issues the certificate on the server, with the
--subject,--sanand validity changes if given; for a request issued already, nothing - with
--outFILE, writes the certificate to the file; with--out-, writes it to standard output and prints no result
pkiaas request create
Request a certificate with a CSR; it waits for approval, or is issued with —approve.
pkiaas request create --csr FILE --template NAME|ID [--approve [--subject DN] [--san NAME]... [--not-before TIME] [--not-after TIME] [--out FILE|- [--chain] [--format pem|der] [--force]]] [--ca NAME|ID] [--idempotency-key KEY] [flags]Send a CSR to a CA, by default the active CA, as the website’s “Request a Certificate” does. The request waits for a member of the CA to approve it (pkiaas request approve, or the website’s Pending Requests page); approving it issues the certificate. No email is sent.
With --approve, the command approves the request too, as pkiaas request approve does, and ends once the certificate is issued: serial is the certificate’s. If approving fails, the request stays, waiting for approval: the error says its ID. To get the certificate in the same command, add --out (see below). --subject, --san, --not-before and --not-after change what it is issued with, as for pkiaas request approve (see its help); they need --approve.
--csr is a PEM or DER file (e.g. from pkiaas csr create), or - for standard input. Only the CSR is sent, never anything else in the file. The server checks its signature (error invalid_csr). --template is the name of one of the CA’s enabled templates, in any case, as the website and pkiaas template list show it, or its ID (error template_not_found); it says what the certificate will hold. A name that more than one enabled template has is refused (error template_ambiguous): give the ID then.
Each run is a new request, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same CSR, template and CA: within 24 hours that gives the earlier result instead of a second request. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for a different request is refused (error idempotency_key_reused). With --approve, running the same command again with the reported key approves the same request, which is safe: an issued request stays as it is.
With --approve, --out FILE also writes the issued certificate to the file (PEM, or DER with --format der; with --chain, followed by the certificates that issued it, up to the root), which is only replaced with --force; the result names it (file). With --out -, standard output holds only the certificate, for piping, and there is no result (so no --json). The file is checked before anything is approved.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--approve | bool | approve the request too, so the CA issues the certificate |
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | with --out: add the CA’s certificate and those that issued the CA, up to the root |
--csr | string | the CSR file, PEM or DER (- for standard input) |
--force | bool | with --out: replace the file if it exists |
--format | string | with --out: pem or der (as OpenSSL’s -outform). Default: pem. |
--idempotency-key | string | repeat an earlier run with this key instead of making a second request (default: a new random key) |
--not-after | string | the certificate expires at this time (RFC 3339) in place of the template’s validity |
--not-before | string | the certificate is valid from this time (RFC 3339) in place of now; needs --not-after |
-o, --out | string | also write the issued certificate to this file; - for standard output, instead of the result |
--san | string, repeatable | issue the certificate with this subject alternative name in place of the CSR’s (repeatable) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--subject | string | issue the certificate with this subject (distinguished name) in place of the CSR’s |
--template | string | the name or ID of one of the CA’s enabled templates (pkiaas template list) |
Examples:
pkiaas request create --csr www.csr --template "Web Server"pkiaas request create --csr www.csr --template "Web Server" --approve --jsonpkiaas request create --csr www.csr --template "Web Server" --approve --out - > www.pempkiaas request create --csr www.csr --template "Web Server" --approve --chain --out fullchain.pem --jsonpkiaas request create --csr www.csr --template "Web Server" --approve --not-after 2027-01-31T00:00:00Z --jsonpkiaas request create --csr - --template "Web Server" --json < www.csrpkiaas request create --csr www.csr --template f5IK8ghmT0 --ca a1B2c3D4e5 --idempotency-key 8e03978e-40d5-43e8-bc93-6894a57f9324 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | pendingApproval: it waits for a member of the CA to approve it (pkiaas request approve, or the website’s Pending Requests page); with --approve, issued |
name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
template | string or null | the template’s name |
templateId | string or null | the template’s ID (--template) |
requestedAt | string or null | when it was requested (ISO 8601, UTC) |
serial | string or null | with --approve, the issued certificate’s serial number (pkiaas cert export SERIAL); otherwise null |
file | string or null | with --approve --out FILE, the file the certificate was written to (with --chain, followed by its chain); otherwise null |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, gives this result again instead of a second request |
Side effects:
- creates a certificate request on the server, which waits for approval; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - with
--approve, the CA signs the CSR and issues the certificate, with the--subject,--sanand validity changes if given - with
--approve--outFILE, writes the certificate to the file; with--out-, writes it to standard output and prints no result
pkiaas request decline
Decline a request for good.
pkiaas request decline ID [--ca NAME|ID] [--yes] [flags]Decline a request to a CA, by default the active CA, by its ID from pkiaas request list: it will never be issued, and its voucher, email confirmation link and SCEP challenge stop working. This can’t be undone; the requester can make a new request.
It asks for confirmation on a terminal; without one, give --yes. Declining a request that is declined already changes nothing and succeeds, so the command is safe to run again. An issued request can’t be declined (error request_issued): revoke its certificate with pkiaas cert revoke instead. A request being signed can’t be declined (error request_processing) until it has been processing for 10 minutes, when it counts as stuck.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | decline without asking for confirmation |
Examples:
pkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --yes --jsonpkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | declined |
name | string or null | the request’s name (the CSR’s common name) |
Side effects:
- declines the request on the server for good, and deletes its voucher, email confirmation and SCEP challenge; can’t be undone
pkiaas request list
List the requests that wait for something, the newest first.
pkiaas request list [--ca NAME|ID] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List a CA’s pending requests, by default the active CA’s, as the website’s Pending Requests page does: the requests that wait for approval, for the requester’s email confirmation or for the requester to pick up a pre-approved certificate, and those being signed. Issued and declined requests aren’t listed (pkiaas request show ID shows any request), nor are requests from ACME.
pendingApproval: it waits for a member of the CA to approve it (approve it if hasCsr is true; one without a CSR needs an approved voucher, which only the website sends). pendingEmailVerification: it waits for the requester to confirm their email address. preApproved: it is issued when the requester picks it up with its voucher or SCEP challenge. processing: it is being signed; signing takes seconds, so one processing for more than 10 minutes (processingSince) is stuck. issued: the certificate is signed (serial). declined: it will never be issued.
It lists the first --limit requests (default 50, at most 1000); total says how many match. --search keeps the requests whose name contains the text, in any case. --sort takes requestedAt, name or template, in --order asc (the default with --sort) or desc. Without --sort: requestedAt, desc.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many requests to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--search | string | only requests whose name contains this text |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: requestedAt, name, template (default: requestedAt, desc) |
Examples:
pkiaas request listpkiaas request list --jsonpkiaas request list --search example.com --sort name --jsonpkiaas request list --ca a1B2c3D4e5 --limit 200 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the requests went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many requests match; more than are listed when it exceeds --limit |
requests | object[] | the first --limit matching requests, in the --sort and --order order |
requests[].id | string | the request’s ID, which the request commands take |
requests[].status | string | pendingApproval, pendingEmailVerification, preApproved or processing (see the command’s help) |
requests[].name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
requests[].template | string or null | the template’s name |
requests[].templateId | string or null | the template’s ID |
requests[].requestedAt | string or null | when it was requested (ISO 8601, UTC) |
requests[].hasCsr | boolean | it has a CSR, so pkiaas request approve can issue it; one without needs an approved voucher, which only the website sends |
requests[].source | string or null | where it came from: scep, web, system, createCa, ces or api (this CLI and the new pages); null if unknown |
requests[].expiresAt | string or null | when the pre-approval (voucher, email confirmation or SCEP challenge) expires (ISO 8601, UTC); null if it never does |
requests[].processingSince | string or null | while it is processing, when signing started (ISO 8601, UTC); otherwise null |
pkiaas request show
Show a request’s details: its status and what its CSR asks for.
pkiaas request show ID [--ca NAME|ID] [flags]Show a request to a CA, by default the active CA, by its ID from pkiaas request list or pkiaas request create: its status, template and source, and what its CSR asks for (subject, subject alternative names, key), so it can be checked before it is approved. The template, not the CSR, decides what the certificate holds. Once it is issued, serial is the certificate’s serial number. Requests from ACME aren’t shown.
pendingApproval: it waits for a member of the CA to approve it (approve it if hasCsr is true; one without a CSR needs an approved voucher, which only the website sends). pendingEmailVerification: it waits for the requester to confirm their email address. preApproved: it is issued when the requester picks it up with its voucher or SCEP challenge. processing: it is being signed; signing takes seconds, so one processing for more than 10 minutes (processingSince) is stuck. issued: the certificate is signed (serial). declined: it will never be issued.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas request show k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request show k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | pendingApproval, pendingEmailVerification, preApproved, processing, issued or declined (see the command’s help) |
name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
template | string or null | the template’s name; the template, not the CSR, decides what the certificate holds |
templateId | string or null | the template’s ID |
source | string or null | where it came from: scep, web, system, createCa, ces or api (this CLI and the new pages); null if unknown |
requestedAt | string or null | when it was requested (ISO 8601, UTC) |
expiresAt | string or null | when the pre-approval (voucher, email confirmation or SCEP challenge) expires (ISO 8601, UTC); null if it never does |
processingSince | string or null | while it is processing, when signing started (ISO 8601, UTC); otherwise null |
serial | string or null | once it is issued, the certificate’s serial number (pkiaas cert export SERIAL); otherwise null |
hasCsr | boolean | it has a CSR, so pkiaas request approve can issue it |
subject | string or null | the CSR’s subject as OpenSSL prints it, e.g. C=US, O=Example, CN=www.example.com; null without a CSR |
subjectAltNames | string[] | the CSR’s subject alternative names as OpenSSL writes them, e.g. DNS:www.example.com; empty without a CSR |
keyType | string or null | the algorithm of the CSR’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey |
keySize | integer or null | the key size in bits (the curve size for EC keys) |
pkiaas template
List a CA’s certificate templates.
pkiaas template [flags]Commands:
pkiaas template list
List a CA’s templates, by name.
pkiaas template list [--ca NAME|ID] [--limit N] [flags]List the certificate templates of a CA, by default the active CA’s, by name, enabled or not. A template says what the certificates it issues hold; pkiaas request create --template takes its name or ID, and only enabled templates take requests. Templates are made and changed on the website.
It lists the first --limit templates (default 50, at most 1000); total says how many there are.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many templates to list (1-1000). Default: 50. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template listpkiaas template list --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the templates belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many templates the CA has; more than are listed when it exceeds --limit |
templates | object[] | the first --limit templates, by name |
templates[].id | string | the template’s ID; pkiaas request create --template takes it or the name |
templates[].name | string or null | the template’s name |
templates[].enabled | boolean | whether it takes requests; a disabled template is refused (template_not_found) |
pkiaas version
Show the CLI’s version.
pkiaas version [flags]Show the CLI’s version, and the Go version and platform it was built for. With --licenses, show the licences of the third-party code in the CLI instead (as text, even with --json).
Flags:
| Flag | Type | Description |
|---|---|---|
--licenses | bool | show the licences of the third-party code in the CLI |
Examples:
pkiaas version --jsonpkiaas version --licensesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
version | string | the CLI’s version, e.g. 0.1.0+af1cf3e (semantic version + build) |
goVersion | string | the Go version it was built with |
os | string | the operating system it was built for, e.g. linux |
arch | string | the processor architecture it was built for, e.g. amd64 |
pkiaas whoami
Show who you are logged in as.
pkiaas whoami [flags]Show the server and the account the CLI is logged in to, and where the token comes from. Use it to check for a login: without one, it fails with exit code 3 and the code not_logged_in or invalid_token.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas whoami --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
email | string or null | the account’s email address |
displayName | string or null | the account’s name |
provider | string | the identity provider the account signs in with, e.g. google |
tokenSource | string | where the token came from: environment (PKIAAS_TOKEN), keyring or file |