OPENSSL-SPKAC(1ossl)

πŸ’« OPENSSL-SPKAC πŸ’«

okay so bestie, this is the openssl-spkac page from the OpenSSL manual set β€” it's the SPKAC printing and generating command, and honestly it's giving "niche but iconic" ✨


🌸 SYNOPSIS 🌸

openssl spkac [-help] [-in filename] [-out filename] [-digest digest]
[-key filename|uri] [-keyform DER|PEM|P12|ENGINE] [-passin arg]
[-challenge string] [-pubkey] [-spkac spkacname] [-spksect section]
[-noout] [-verify] [-engine id] [-provider name] [-provider-path path]
[-provparam [name:]key=value] [-propquery propq]

πŸ¦‹ DESCRIPTION πŸ¦‹

So this command processes Netscape signed public key and challenge (SPKAC) files. Like, that's the whole gig. It can:

  • print out their contents πŸ“„
  • verify the signature βœ…
  • produce its own SPKACs from a supplied private key πŸ”‘

three moods, one command, we love a multitasker πŸ’…


πŸŽ€ OPTIONS πŸŽ€

okay bestie here's the full lineup, no skips, all facts:

  • -help β€” prints out a usage message. classic. we stan a helpful queen 🫢
  • -in filename β€” this specifies the input filename to read from, or standard input if you don't specify this option. lowkey important: it's ignored if the -key option is used. πŸ™ˆ
  • -out filename β€” specifies the output filename to write to, or standard output by default.
  • -digest digest β€” use the specified digest to sign a created SPKAC file. the default digest algorithm is MD5. (yes, MD5, we'll get to that in HISTORY, don't come for me 😭)
  • -key filename|uri β€” create an SPKAC file using the private key specified by filename or uri. heads up bestie: the -in, -noout, -spksect and -verify options are ignored if present. like, they're simply not invited to this party πŸ’€
  • -keyform DER|PEM|P12|ENGINE β€” the key format; unspecified by default. see openssl-format-options(1) for details.
  • -passin arg β€” the input file password source. for more info about the format of arg, see openssl-passphrase-options(1).
  • -challenge string β€” specifies the challenge string if an SPKAC is being created. spicy ✨
  • -spkac spkacname β€” allows an alternative name form the variable containing the SPKAC. the default is "SPKAC". this option affects both generated and input SPKAC files. (yes, the original says "form the variable", we're keeping it, it's canon πŸŽ€)
  • -spksect section β€” allows an alternative name form the section containing the SPKAC. the default is the default section.
  • -noout β€” don't output the text version of the SPKAC (not used if an SPKAC is being created).
  • -pubkey β€” output the public key of an SPKAC (not used if an SPKAC is being created). πŸ”‘
  • -verify β€” verifies the digital signature on the supplied SPKAC. vibe check for signatures βœ…
  • -engine id β€” see "Engine Options" in openssl(1). ⚠️ this option is deprecated.
  • -provider name
  • -provider-path path
  • -provparam [name:]key=value
  • -propquery propq β€” see "Provider Options" in openssl(1), provider(7), and property(7). (grouped together in the original, so grouped together here 🫢)

🌈 EXAMPLES 🌈

these are the moments, bestie. copy them exactly, character for character πŸ’–

print out the contents of an SPKAC:

openssl spkac -in spkac.cnf

verify the signature of an SPKAC:

openssl spkac -in spkac.cnf -noout -verify

create an SPKAC using the challenge string "hello":

openssl spkac -key key.pem -challenge hello -out spkac.cnf

example of an SPKAC, (long lines split up for clarity) β€” and yes it's gonna look unhinged, that's just what SPKACs look like:

SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
dq+NQ3F+X4deMx9AaEglZtULwV4=

⭐ NOTES ⭐

a created SPKAC with suitable DN components appended can be fed to openssl-ca(1). like, hand it off, it's ready πŸŽ€

SPKACs are typically generated by Netscape when a form is submitted containing the KEYGEN tag as part of the certificate enrollment process. ancient lore, but valid lore πŸ¦‹

the challenge string permits a primitive form of proof of possession of private key. by checking the SPKAC signature and a random challenge string, some guarantee is given that the user knows the private key corresponding to the public key being certified. this is important in some applications. without this it is possible for a previous SPKAC to be used in a "replay attack". 😭

ok so that last bit matters, bestie β€” no challenge string, no proof, and a stale SPKAC can get replayed. don't skip the challenge, it's not just decoration ✨

πŸ’œ SEE ALSO πŸ’œ

openssl(1), openssl-ca(1)


πŸ‘‘ HISTORY πŸ‘‘

  • the -engine option was deprecated in OpenSSL 3.0.
  • the -digest option was added in OpenSSL 3.0.

Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


okay that's the whole page, you ate it, go verify some SPKACs 🫢✨ this lil rewrite is serving OpenSSL 3.5.9, dated 2026-09-29 β€” periodt, mwah πŸ’…πŸŽ€

πŸ“¦ where this page comes from