OPENSSL(1ossl)
๐ NAME ๐
openssl โ the OpenSSL command line program, aka the girlboss of cryptography toolkits, brought to you by the OpenSSL manual (section 1ossl, bestie, write it down) โจ
๐ฆ SYNOPSIS ๐ฆ
openssl command [ options ... ] [ parameters ... ]
openssl no-XXX [ options ]
openssl -help | -version
๐ธ DESCRIPTION ๐ธ
Okay so picture this: OpenSSL is a whole cryptography toolkit that implements the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) network protocols, plus all the related cryptography standards those protocols require. Iconic, honestly.
The openssl program is the command line program that lets you use all the various cryptography functions of OpenSSL's crypto library straight from your shell. It's giving Swiss Army knife but make it crypto. You can use it for:
- Creation and management of private keys, public keys and parameters
- Public key cryptographic operations
- Creation of X.509 certificates, CSRs and CRLs
- Calculation of Message Digests and Message Authentication Codes
- Encryption and Decryption with Ciphers
- SSL/TLS Client and Server Tests
- Handling of S/MIME signed or encrypted mail
- Timestamp requests, generation and verification
No cap, that's a lot of jobs. Main character energy fr fr ๐
๐ COMMAND SUMMARY ๐
The openssl program provides a rich variety of commands (that's command in the "SYNOPSIS" above, iykyk). Each command can have many options and argument parameters, shown above as options and parameters.
Detailed documentation and use cases for most standard subcommands are available (e.g., openssl-x509(1)). And if you ever forget what the subcommands even are, the subcommand openssl-list(1) may be used to list subcommands. Slay.
The command no-XXX tests whether a command of the specified name is available. Here's the vibe check:
- If no command named XXX exists, it returns
0(success) and printsno-XXX. - Otherwise it returns
1and printsXXX.
In both cases, the output goes to stdout and nothing is printed to stderr. Additional command line arguments are always ignored. And since for each cipher there is a command of the same name, this provides an easy way for shell scripts to test for the availability of ciphers in the openssl program.
Heads up bestie:no-XXXis not able to detect pseudo-commands such asquit,list, orno-XXXitself. She has limits ๐
๐ Configuration Option ๐
Many commands use an external configuration file for some or all of their arguments, and have a -config option to specify that file. The default name of the file is openssl.cnf, living in the default certificate storage area โ which you can figure out from the openssl-version(1) command using the -d or -a option. The environment variable OPENSSL_CONF can be used to specify a different file location, or to disable loading a configuration (just use the empty string for that, sneaky but valid).
Among others, the configuration file can be used to load modules and to specify parameters for generating certificates and random numbers. See config(5) for the details, because there are details.
๐ Standard Commands ๐
asn1parseโ Parse an ASN.1 sequence.caโ Certificate Authority (CA) Management.ciphersโ Cipher Suite Description Determination.cmsโ CMS (Cryptographic Message Syntax) command.crlโ Certificate Revocation List (CRL) Management.crl2pkcs7โ CRL to PKCS#7 Conversion.dgstโ Message Digest calculation. MAC calculations are superseded byopenssl-mac(1).dhparamโ Generation and Management of Diffie-Hellman Parameters. Superseded byopenssl-genpkey(1)andopenssl-pkeyparam(1).dsaโ DSA Data Management.dsaparamโ DSA Parameter Generation and Management. Superseded byopenssl-genpkey(1)andopenssl-pkeyparam(1).ecโ EC (Elliptic curve) key processing.ecparamโ EC parameter manipulation and generation.encโ Encryption, decryption, and encoding.engineโ Engine (loadable module) information and manipulation.errstrโ Error Number to Error String Conversion.fipsinstallโ FIPS configuration installation.gendsaโ Generation of DSA Private Key from Parameters. Superseded byopenssl-genpkey(1)andopenssl-pkey(1).genpkeyโ Generation of Private Key or Parameters.genrsaโ Generation of RSA Private Key. Superseded byopenssl-genpkey(1).helpโ Display information about a command's options.infoโ Display diverse information built into the OpenSSL libraries.kdfโ Key Derivation Functions.listโ List algorithms and features.macโ Message Authentication Code Calculation.nseqโ Create or examine a Netscape certificate sequence.ocspโ Online Certificate Status Protocol command.passwdโ Generation of hashed passwords.pkcs12โ PKCS#12 Data Management.pkcs7โ PKCS#7 Data Management.pkcs8โ PKCS#8 format private key conversion command.pkeyโ Public and private key management.pkeyparamโ Public key algorithm parameter management.pkeyutlโ Public key algorithm cryptographic operation command.primeโ Compute prime numbers.randโ Generate pseudo-random bytes.rehashโ Create symbolic links to certificate and CRL files named by the hash values.reqโ PKCS#10 X.509 Certificate Signing Request (CSR) Management.rsaโ RSA key management.rsautlโ RSA command for signing, verification, encryption, and decryption. Superseded byopenssl-pkeyutl(1).s_clientโ This implements a generic SSL/TLS client which can establish a transparent connection to a remote server speaking SSL/TLS. It's intended for testing purposes only and provides only rudimentary interface functionality but internally uses mostly all functionality of the OpenSSL ssl library.s_serverโ This implements a generic SSL/TLS server which accepts connections from remote clients speaking SSL/TLS. It's intended for testing purposes only and provides only rudimentary interface functionality but internally uses mostly all functionality of the OpenSSL ssl library. It provides both an own command line oriented protocol for testing SSL functions and a simple HTTP response facility to emulate an SSL/TLS-aware webserver.s_timeโ SSL Connection Timer.sess_idโ SSL Session Data Management.smimeโ S/MIME mail processing.speedโ Algorithm Speed Measurement.spkacโ SPKAC printing and generating command.srpโ Maintain SRP password file. This command is deprecated ๐ซstoreutlโ Command to list and display certificates, keys, CRLs, etc.tsโ Time Stamping Authority command.verifyโ X.509 Certificate Verification. See also theopenssl-verification-options(1)manual page.versionโ OpenSSL Version Information.x509โ X.509 Certificate Data Management.
๐ง Message Digest Commands ๐ง
blake2b512โ BLAKE2b-512 Digestblake2s256โ BLAKE2s-256 Digestmd2โ MD2 Digestmd4โ MD4 Digestmd5โ MD5 Digestmdc2โ MDC2 Digestrmd160โ RMD-160 Digestsha1โ SHA-1 Digestsha224โ SHA-2 224 Digestsha256โ SHA-2 256 Digestsha384โ SHA-2 384 Digestsha512โ SHA-2 512 Digestsha3-224โ SHA-3 224 Digestsha3-256โ SHA-3 256 Digestsha3-384โ SHA-3 384 Digestsha3-512โ SHA-3 512 Digestkeccak-224โ KECCAK 224 Digestkeccak-256โ KECCAK 256 Digestkeccak-384โ KECCAK 384 Digestkeccak-512โ KECCAK 512 Digestshake128โ SHA-3 SHAKE128 Digestshake256โ SHA-3 SHAKE256 Digestsm3โ SM3 Digest
๐ Encryption, Decryption, and Encoding Commands ๐
The following aliases provide convenient access to the most used encodings and ciphers. Convenient! We love a shortcut.
Depending on how OpenSSL was configured and built, not all ciphers listed here may be present. See openssl-enc(1) for more information. Building choices are real, bestie ๐ญ
aes128,aes-128-cbc,aes-128-cfb,aes-128-ctr,aes-128-ecb,aes-128-ofbโ AES-128 Cipheraes192,aes-192-cbc,aes-192-cfb,aes-192-ctr,aes-192-ecb,aes-192-ofbโ AES-192 Cipheraes256,aes-256-cbc,aes-256-cfb,aes-256-ctr,aes-256-ecb,aes-256-ofbโ AES-256 Cipheraria128,aria-128-cbc,aria-128-cfb,aria-128-ctr,aria-128-ecb,aria-128-ofbโ Aria-128 Cipheraria192,aria-192-cbc,aria-192-cfb,aria-192-ctr,aria-192-ecb,aria-192-ofbโ Aria-192 Cipheraria256,aria-256-cbc,aria-256-cfb,aria-256-ctr,aria-256-ecb,aria-256-ofbโ Aria-256 Cipherbase64โ Base64 Encodingbf,bf-cbc,bf-cfb,bf-ecb,bf-ofbโ Blowfish Ciphercamellia128,camellia-128-cbc,camellia-128-cfb,camellia-128-ctr,camellia-128-ecb,camellia-128-ofbโ Camellia-128 Ciphercamellia192,camellia-192-cbc,camellia-192-cfb,camellia-192-ctr,camellia-192-ecb,camellia-192-ofbโ Camellia-192 Ciphercamellia256,camellia-256-cbc,camellia-256-cfb,camellia-256-ctr,camellia-256-ecb,camellia-256-ofbโ Camellia-256 Ciphercast,cast-cbcโ CAST Ciphercast5-cbc,cast5-cfb,cast5-ecb,cast5-ofbโ CAST5 Cipherchacha20โ Chacha20 Cipherdes,des-cbc,des-cfb,des-ecb,des-ede,des-ede-cbc,des-ede-cfb,des-ede-ofb,des-ofbโ DES Cipherdes3,desx,des-ede3,des-ede3-cbc,des-ede3-cfb,des-ede3-ofbโ Triple-DES Cipheridea,idea-cbc,idea-cfb,idea-ecb,idea-ofbโ IDEA Cipherrc2,rc2-cbc,rc2-cfb,rc2-ecb,rc2-ofbโ RC2 Cipherrc4โ RC4 Cipherrc5,rc5-cbc,rc5-cfb,rc5-ecb,rc5-ofbโ RC5 Cipherseed,seed-cbc,seed-cfb,seed-ecb,seed-ofbโ SEED Ciphersm4,sm4-cbc,sm4-cfb,sm4-ctr,sm4-ecb,sm4-ofbโ SM4 Cipher
โจ OPTIONS โจ
Okay bestie, so the options you actually get depend on which command you're running โ every command has its own little menu. But this section is all about the ones that behave the same basically everywhere. ๐
๐ธ Program Options
These ones you can throw in without naming a command, and they'll just give you help or version tea. โ
-helpโ gives you a terse summary of, like, all the options. Want more detail? Every command also has its own-helpflag. Also accepts--help, because we love a flexible icon.-versionโ gives you a terse summary of theopensslprogram version. For the full scoop, go seeopenssl-version(1). Also accepts--version. ๐
๐ฆ Common Options
-helpโ and if an option takes an argument, the "type" of that argument gets shown too. Helpful queen behavior, honestly.--โ this one terminates the list of options. It's mostly useful when one of your filename parameters starts with a minus sign, so it doesn't get mistaken for a flag:
openssl verify [flags...] -- -cert1.pem...
๐ Format Options
See the openssl-format-options(1) manual page. (That's the whole vibe, no cap.) โจ
๐ Pass Phrase Options
See the openssl-passphrase-options(1) manual page. ๐ซถ
๐ Random State Options
Okay so storytime, bestie. ๐ Prior to OpenSSL 1.1.1, it was super common for applications to store info about the state of the random-number generator in a file โ loaded at startup, rewritten on exit, the whole routine. On modern operating systems this is generally no longer necessary, because OpenSSL seeds itself from a trusted entropy source provided by the operating system. Iconic. But these flags are still supported for special platforms or circumstances that might require them.
Heads up: it's generally an error to use the same seed file more than once, and every use of-randshould be paired with-writerand. Match them up like outfits, okay? ๐
-randfiles โ a file (or files!) containing random data used to seed the random number generator. You can specify multiple files separated by an OS-dependent character. The separator is;for MS-Windows,,for OpenVMS, and:for all others. Another way to specify multiple files is to just repeat this flag with different filenames.-writerandfile โ writes the seed data to the specified file upon exit. That file can then be used in a subsequent command invocation. Cute and reusable. ๐
๐ฅ Certificate Verification Options
See the openssl-verification-options(1) manual page. ๐
๐ Name Format Options
See the openssl-namedisplay-options(1) manual page. ๐ฆ
โญ TLS Version Options
Several commands use SSL, TLS, or DTLS. By default, the commands use TLS โ clients offer the lowest and highest protocol version they support, and servers pick the highest version the client offers that the server also supports. It's giving negotiation, it's giving compromise. ๐ค
The options below let you limit which protocol versions get used, and whether it's TCP (SSL and TLS) or UDP (DTLS). Note that not all protocols and flags may be available, depending on how OpenSSL was built. Check your vibe, basically.
-ssl3,-tls1,-tls1_1,-tls1_2,-tls1_3,-no_ssl3,-no_tls1,-no_tls1_1,-no_tls1_2,-no_tls1_3โ these options require or disable the use of the specified SSL or TLS protocols. When a specific TLS version is required, only that version will be offered or accepted. Only one specific protocol can be given, and it cannot be combined with any of theno_options. Also heads up: theno_*options do not work with thes_timeandcipherscommands, but they do work withs_clientands_server. ๐ญ (we don't make the rules)-dtls,-dtls1,-dtls1_2โ these specify to use DTLS instead of TLS. With-dtls, clients will negotiate any supported DTLS protocol version. Use-dtls1or-dtls1_2to support only DTLS1.0 or DTLS1.2, respectively. Pick your fighter. โ๏ธ
๐ Engine Options
-engineid โ loads the engine identified by id and uses all the methods it implements (algorithms, key storage, etc.), unless it says otherwise in the command-specific documentation, or it's configured to do so, as described in "Engine Configuration" inconfig(5).
The engine will be used for key ids specified with -key and similar options when an option like -keyform engine is given.
A special case is the "loader_attic" engine โ that one is meant just for internal OpenSSL testing purposes and supports loading keys, parameters, certificates, and CRLs from files. When this engine is used, files with such credentials are read via this engine. Using the "file:" schema is optional; a plain file (path) name will do.
Options specifying keys, like -key and similar, can use the generic OpenSSL engine key loading URI scheme "org.openssl.engine:" to retrieve private keys and public keys. The URI syntax is as follows, in simplified form:
org.openssl.engine:{engineid}:{keyid}
Where "{engineid}" is the identity/name of the engine, and "{keyid}" is a key identifier that's acceptable by that engine. For example, when using an engine that interfaces against a PKCS#11 implementation, the generic key URI would be something like this (this happens to be an example for the PKCS#11 engine that's part of OpenSC):
-key org.openssl.engine:pkcs11:label_some-private-key
As a third possibility, for engines and providers that have implemented their own OSSL_STORE_LOADER(3), "org.openssl.engine:" should not be necessary. For a PKCS#11 implementation that has implemented such a loader, the PKCS#11 URI as defined in RFC 7512 should be possible to use directly:
-key pkcs11:object=some-private-key;pin-value=1234
๐ง Provider Options
-providername โ load and initialize the provider identified by name. The name can also be a path to the provider module. In that case the provider name will be the specified path and not just the provider module name. Interpretation of relative paths is platform specific. The configured"MODULESDIR"path, theOPENSSL_MODULESenvironment variable, or the path specified by-provider-pathis prepended to relative paths. Seeprovider(7)for a more detailed description. โจ-provider-pathpath โ specifies the search path that is to be used for looking for providers. Equivalently, theOPENSSL_MODULESenvironment variable may be set. Same energy, different outfit.-provparam[name:]key=value โ set configuration parameter key to value val in provider name (optional). If name is not specified, the setting will be applied to all loaded providers. This option can be specified multiple times, to set multiple parameters. Options that specify nondefault providers to load should precede this option if the setting is intended to apply to the to-be-loaded providers. Parameters that only affect provider initialisation must, for now, be set in the configuration file โ only parameters that are also queried as needed later have any effect when set via this interface. Only UTF8-string-valued parameters are supported. See the documentation of the specific provider and associated algorithms for any supported parameters.-propquerypropq โ specifies the property query clause to be used when fetching algorithms from the loaded providers. Seeproperty(7)for a more detailed description. ๐
๐ ENVIRONMENT
The OpenSSL libraries can take some configuration parameters from the environment. Very main character of them. ๐ซ
- For info about all the environment variables used by the OpenSSL libraries โ like
OPENSSL_CONF,OPENSSL_MODULES, andOPENSSL_TRACEโ seeopenssl-env(7). - For info about the use of environment variables in configuration, see "ENVIRONMENT" in
config(5). - For info about specific commands, see
openssl-engine(1),openssl-rehash(1), andtsget(1). - For info about querying or specifying CPU architecture flags, see
OPENSSL_ia32cap(3),OPENSSL_ppccap(3),OPENSSL_s390xcap(3), andOPENSSL_riscvcap(3). ๐ฅ๏ธ
๐ SEE ALSO
Okay, deep breath, this is a long list, but every single one is here because it slays:
openssl-asn1parse(1), openssl-ca(1), openssl-ciphers(1), openssl-cms(1), openssl-crl(1), openssl-crl2pkcs7(1), openssl-dgst(1), openssl-dhparam(1), openssl-dsa(1), openssl-dsaparam(1), openssl-ec(1), openssl-ecparam(1), openssl-enc(1), openssl-engine(1), openssl-errstr(1), openssl-gendsa(1), openssl-genpkey(1), openssl-genrsa(1), openssl-kdf(1), openssl-list(1), openssl-mac(1), openssl-nseq(1), openssl-ocsp(1), openssl-passwd(1), openssl-pkcs12(1), openssl-pkcs7(1), openssl-pkcs8(1), openssl-pkey(1), openssl-pkeyparam(1), openssl-pkeyutl(1), openssl-prime(1), openssl-rand(1), openssl-rehash(1), openssl-req(1), openssl-rsa(1), openssl-rsautl(1), openssl-s_client(1), openssl-s_server(1), openssl-s_time(1), openssl-sess_id(1), openssl-smime(1), openssl-speed(1), openssl-spkac(1), openssl-srp(1), openssl-storeutl(1), openssl-ts(1), openssl-verify(1), openssl-version(1), openssl-x509(1), config(5), crypto(7), openssl-env(7). ssl(7), x509v3_config(5)
(Yes, that's a lot of reading. Hydrate first. ๐ง)
๐ HISTORY
- The
list -XXX-algorithmsoptions were added in OpenSSL 1.0.0; for notes on the availability of other commands, see their individual manual pages. - The
-issuer_checksoption is deprecated as of OpenSSL 1.1.0 and is silently ignored. It's giving ghosted. ๐ - The
-xcertformand-xkeyformoptions are obsolete since OpenSSL 3.0 and have no effect. RIP bestie, you did nothing. - The interactive mode โ which could be invoked by running
"openssl"with no further arguments โ was removed in OpenSSL 3.0, and running that program with no arguments is now equivalent to"openssl help". Character development, honestly. ๐ฆ
ยฉ๏ธ COPYRIGHT
Copyright 2000-2025 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 a wrap, bestie! ๐ This whole page is from OpenSSL 3.5.6, dated 2026-04-07 โ go off, version queen. Now close the tab and go touch some grass, you've earned it. ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms