Documentation Index
Fetch the complete documentation index at: https://mintlify.com/strongswan/strongswan/llms.txt
Use this file to discover all available pages before exploring further.
pki --self creates a self-signed X.509 certificate from a private key. This is primarily used to create root CA certificates.
Synopsis
Options
Path to the input private key file (PEM or DER). If omitted, the key is read from stdin.
Hex-encoded CKA_ID of a private key stored on a token (HSM/smartcard). Use instead of
--in for hardware-backed keys.Input type. Accepted values:
priv (auto-detect), rsa, ecdsa, ed25519, ed448, pub, pkcs10.Subject Distinguished Name (DN) in RFC 4514 format, for example:
Subject Alternative Name (SAN). Can be specified multiple times. Accepts FQDNs, email addresses, IPv4 and IPv6 addresses, and URIs.
Certificate validity period in days. Defaults to 1095 days (3 years).
Start of certificate validity. Accepts a date string or Unix timestamp. Defaults to the current time.
End of certificate validity. Overrides
--lifetime if specified.Serial number in hexadecimal. If omitted, a random serial is generated.
Include the CA basic constraint, marking this as a CA certificate.
Maximum CA path length constraint. Only meaningful when
--ca is set.Extended Key Usage (EKU) flag. Can be specified multiple times. Accepted values:
serverAuth, clientAuth, crlSign, ocspSigning, ikeIntermediate, msSmartcardLogon.OCSP responder URI to embed in the certificate. Can be specified multiple times.
Digest algorithm to use for the signature (e.g.
sha256, sha384, sha512). Defaults to a digest appropriate for the key type.RSA padding scheme. Use
pss for RSASSA-PSS. Defaults to PKCS#1 v1.5.Output encoding format. Accepted values:
pem, der.