PKI---SIGNCRL(1)

πŸ’… PKI--SIGNCRL(1) β€” bestie's guide to strongSwan

okay so this is the pki --signcrl page from the strongSwan manual, and we're gonna get into it πŸ’–


✨ NAME ✨

pki --signcrl β€” Issue a Certificate Revocation List (CRL) using a CA certificate and key πŸŽ€

✨ SYNOPSIS ✨

pki --signcrl --cakey file|--cakeyid hex --cacert file [--lifetime days]
              [--this-update datetime] [--next-update datetime]
              [--lastcrl crl] [--basecrl crl] [--crluri uri]
              [--digest digest] [--rsa-padding padding]
              [[--reason reason] [--date ts] --cert file|--serial hex]
              [--critical oid] [--outform encoding] [--debug level]

pki --signcrl --options file

pki --signcrl -h | --help

✨ DESCRIPTION ✨

so this is a sub-command of pki(1) πŸ‘‘ and what it does is issue a Certificate Revocation List (CRL) using a CA certificate and private key. that's it. that's the whole vibe. it's giving "official hater energy, but for certs" πŸ’…

✨ OPTIONS ✨

  • -h, --help β€” prints the usage info plus a summary of all the options available 🫢
  • -v, --debug level β€” sets the debug level, default is 1 πŸ›
  • -+, --options file β€” reads the command line options from a file, yep, you can just stick 'em in a file πŸ“„
  • -k, --cakey file β€” the CA private key file. you need either this one or --cakeyid, no skipping πŸ”‘
  • -x, --cakeyid hex β€” the smartcard or TPM CA private key object handle, in hex format, with an optional 0x prefix. either this or --cakey is required πŸ’³
  • -c, --cacert file β€” the CA certificate file. Required. fr fr, you gotta have it ⭐
  • -l, --lifetime days β€” how many days until the CRL gets a nextUpdate, default is 15. it gets ignored if you give both an absolute start and end time πŸ—“οΈ
  • -F, --this-update datetime β€” the absolute time when the validity of the CRL begins. the datetime format is defined by the --dateform option ⏰
  • -T, --next-update datetime β€” the absolute time when the validity of the CRL end. the datetime format is defined by the --dateform option ⏳
  • -D, --dateform form β€” the strptime(3) format used for the --this-update and --next-update options, default is %d.%m.%y %T πŸ“…
  • -a, --lastcrl crl β€” a CRL of lastUpdate to copy revocations from. recycling era ♻️
  • -b, --basecrl crl β€” a base CRL to create a delta CRL for 🧬
  • -u, --crluri uri β€” the freshest delta CRL URI to include in the CRL. can be used multiple times, stack 'em 🌈
  • -g, --digest digest β€” the digest to use for signature creation. one of md5, sha1, sha224, sha256, sha384, or sha512. the default is determined based on the type and size of the signature key πŸ”
  • -R, --rsa-padding padding β€” the padding to use for RSA signatures. either pkcs1 or pss, defaults to pkcs1 🧸
  • -X, --critical oid β€” adds a critical extension with the given OID πŸ“Œ
  • -f, --outform encoding β€” the encoding of the created certificate file. either der (ASN.1 DER) or pem (Base64 PEM), defaults to der 🎁

πŸ¦‹ Revoked Certificates πŸ¦‹

you can add multiple revoked certificates to the CRL, and you do it by either handing over the certificate file or the respective serial number directly. a reason and a timestamp can be configured for each revocation β€” and heads up, they have to be given before each certificate/serial on the command line ⚠️

  • -r, --reason reason β€” the reason why the certificate was revoked. one of key-compromise, ca-compromise, affiliation-changed, superseded, cessation-of-operation, or certificate-hold πŸ’€
  • -d, --date ts β€” the revocation date as a Unix timestamp. defaults to the current time πŸ•
  • -z, --cert file β€” the certificate file to revoke πŸ“œ
  • -s, --serial hex β€” the hexadecimal encoded serial number of the certificate to revoke πŸ”’

✨ EXAMPLES ✨

revoke a certificate, iconic behaviour:

pki --signcrl --cacert ca_cert.der --cakey ca_key.der \
    --reason superseded --cert cert.der > crl.der

update an existing CRL with two new revocations, using the certificate's serial number, but no reason:

pki --signcrl --cacert ca_cert.der --cakey ca_key.der \
    --lastcrl old_crl.der --serial 0123 --serial 0345 > crl.der

✨ SEE ALSO ✨

pki(1) β€” go read that one too bestie 🫢


ngl if you're messing with --critical oid or --rsa-padding, double-check what you're doing first, 'cause it's all literally going into a signed CRL ✨

🌸 that's the whole page! brought to you by strongSwan, version 6.1.0, dated 2019-05-06 β€” mwah, go sign some CRLs responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from