OPENSSL-FORMAT-OPTIONS(1ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

🌸 openSSL-FORMAT-OPTIONS(1ossl) β€” the manual page, bestie edition 🌸

okay so real talk: this is the openssl-format-options page, from the OpenSSL manual set (1ossl, iykyk), and it's literally just the glow-up guide for how OpenSSL commands eat their input and serve their output. no cap, it's more useful than it sounds πŸ’…


✨ SYNOPSIS ✨

openssl command [ options ... ] [ parameters ... ]

that's it. that's the whole vibe. a command, some options, some parameters, boom πŸŽ€


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: several OpenSSL commands can take input or generate output in a whole variety of formats. like, options galore.

Since OpenSSL 3.0, keys, single certificates, and CRLs can be read from files in any of the DER, PEM or P12 formats. so specifying their input format is no more needed β€” the openssl commands will just automatically try all the possible formats for you. iconic behavior honestly πŸ¦‹

BUT β€” and this is the important part β€” if the DER or PEM input format is specified, it will be enforced. like, locked in. no auto-detecting your way out of that one πŸ™ˆ

And if you wanna access a key via an engine, the input format ENGINE may be used. alternatively β€” plot twist β€” the key identifier in the <uri> argument of the respective key option may be preceded by "org.openssl.engine:". for an example usage of that latter one, go peek at "Engine Options" in openssl(1) ✨


πŸŽ€ OPTIONS πŸŽ€

πŸ’… Format Options

these are the options that specify the format, bestie. and pls β€” refer to the individual man page to see which options are actually accepted by that command, because not everybody takes everything 😭

  • -inform format, -outform format β€” the format of the input or output streams, respectively. in-form, out-form, in and out, you got this πŸ’œ
  • -keyform format β€” format of a private key input source πŸ”‘
  • -CRLform format β€” format of a CRL input source. yes, it's capitalized like that, don't come for me 🫢

🌈 Format Option Arguments

so these are the possible format arguments, described below. both uppercase and lowercase are accepted β€” she's flexible like that πŸ’…

and heads up: the list of acceptable format arguments, and the default, is described in each command's documentation. so check your specific command's page, bestie, don't just assume 🌸

  • DER β€” a binary format, encoded or parsed according to Distinguished Encoding Rules (DER) of the ASN.1 data language. very structured. very serious. very binary ⭐
  • ENGINE β€” used to specify that the cryptographic material lives in an OpenSSL engine. an engine must be configured or specified using the -engine option. and a password or PIN may be supplied to the engine using the -passin option πŸ”₯
  • P12 β€” a DER-encoded file containing a PKCS#12 object. it might be necessary to provide a decryption password to retrieve the private key, so like... come prepared with the password πŸ™ˆ
  • PEM β€” a text format defined in IETF RFC 1421 and IETF RFC 7468. briefly (and I do mean briefly), this is a block of base-64 encoding (defined in IETF RFC 4648), with specific lines used to mark the start and end:
Text before the BEGIN line is ignored.
----- BEGIN object-type -----
OT43gQKBgQC/2OHZoko6iRlNOAQ/tMVFNq7fL81GivoQ9F1U0Qr+DH3ZfaH8eIkX
xT0ToMPJUzWAn8pZv0snA0um6SIgvkCuxO84OkANCVbttzXImIsL7pFzfcwV/ERK
UM6j0ZuSMFOCr/lGPAoOQU0fskidGEHi1/kW+suSr28TqsyYZpwBDQ==
----- END object-type -----
Text after the END line is also ignored

The object-type must match the type of object that is expected. for example, a "BEGIN X509 CERTIFICATE" will not match if the command is trying to read a private key β€” mismatch era, embarrassing for everyone πŸ’€

The types supported include:

  • ANY PRIVATE KEY
  • CERTIFICATE
  • CERTIFICATE REQUEST
  • CMS
  • DH PARAMETERS
  • DSA PARAMETERS
  • DSA PUBLIC KEY
  • EC PARAMETERS
  • EC PRIVATE KEY
  • ECDSA PUBLIC KEY
  • ENCRYPTED PRIVATE KEY
  • PARAMETERS
  • PKCS #7 SIGNED DATA
  • PKCS7
  • PRIVATE KEY
  • PUBLIC KEY
  • RSA PRIVATE KEY
  • SSL SESSION PARAMETERS
  • TRUSTED CERTIFICATE
  • X509 CRL
  • X9.42 DH PARAMETERS

The following legacy object-type's are also supported for compatibility with earlier releases (throwback moment πŸ•°οΈ):

  • DSA PRIVATE KEY
  • NEW CERTIFICATE REQUEST
  • RSA PUBLIC KEY
  • X509 CERTIFICATE
  • SMIME β€” an S/MIME object as described in IETF RFC 8551. earlier versions were known as CMS and are compatible. but note: the parsing is simple and might fail to parse some legal data 😭 so like, don't come for her when the fancy legal data doesn't parse

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>.


and that's the whole page, bestie, you ate πŸ’– this was OpenSSL 3.5.0, dated 2026-09-25, and you've been reading OPENSSL-FORMAT-OPTIONS(1ossl) β€” go forth and format responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from