OPENSSL-FORMAT-OPTIONS(1SSL)

πŸ’– NAME πŸ’–

openssl-format-options β€” the OpenSSL manual page (1SSL, bestie, we're in the big leagues) that explains all the format options for what goes in and what comes out of your OpenSSL commands. iykyk.


✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so several OpenSSL commands can take input, or spit out output, in a whole bunch of different formats. it's giving ✨options✨.

and here's the glow-up: since OpenSSL 3.0, keys, single certificates, and CRLs can be read from files in any of the DER, PEM or P12 formats. so you don't even have to specify the input format anymore β€” the openssl commands will just automatically try all the possible formats for you like the icon they are. πŸ’…

but!!! important: if you do specify the DER or PEM input format, it will be enforced. no take-backs, no vibes-based guessing. periodt.

πŸ‘‘ OPTIONS πŸ‘‘

πŸŽ€ Format Options

these are the options that let you say what format you're working with, bestie. (refer to the individual man page to see which options are accepted β€” they're not all invited to every party.)

  • -inform format, -outform format β€” the format of the input streams or the output streams.
  • -keyform format β€” the format of a private key input source. πŸ”‘
  • -CRLform format β€” the format of a CRL input source.

🧚 Format Option Arguments

here's the tea on all the possible format arguments. both uppercase and lowercase are accepted (the letters are not gonna gatekeep you πŸ’–).

the list of acceptable format arguments, and the default, is described in each command's own documentation. so like, check the receipts for your specific command.

  • DER β€” a binary format, encoded or parsed according to Distinguished Encoding Rules (DER) of the ASN.1 data language.
  • P12 β€” a DER-encoded file containing a PKCS#12 object. heads up: it might be necessary to provide a decryption password to retrieve the private key or certificate. πŸ”
  • PEM β€” a text format defined in IETF RFC 1421 and IETF RFC 7468. 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. awkward! 😭 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 (yes, we're being nice to the old ones 🫢):

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. πŸ“¬ note that the parsing is simple and might fail to parse some legal data. it's doing its best, ok?? πŸ™ˆ

Copyright 2000-2026 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 just read the 4.0.3 version of this manual page, dated 2026-09-29, and honestly? iconic. go forth and format ur stuff. πŸ’– ✨ πŸ¦‹

πŸ“¦ where this page comes from