=pod =head1 NAME openssl - OpenSSL command line tool =head1 SYNOPSIS B I [ I ] [ I ] B B [ B | B | B | B | B | B] B BI [ I ] =head1 DESCRIPTION OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) network protocols and related cryptography standards required by them. The B program is a command line tool for using the various cryptography functions of OpenSSL's B library from the shell. It can be used for o Creation and management of private keys, public keys and parameters o Public key cryptographic operations o Creation of X.509 certificates, CSRs and CRLs o Calculation of Message Digests o Encryption and Decryption with Ciphers o SSL/TLS Client and Server Tests o Handling of S/MIME signed or encrypted mail o Time Stamp requests, generation and verification =head1 COMMAND SUMMARY The B program provides a rich variety of commands (I in the SYNOPSIS above), each of which often has a wealth of options and arguments (I and I in the SYNOPSIS). Many commands use an external configuration file for some or all of their arguments and have a B<-config> option to specify that file. The environment variable B can be used to specify the location of the file. If the environment variable is not specified, then the file is named B in the default certificate storage area, whose value depends on the configuration flags specified when the OpenSSL was built. The list parameters B, B, and B output a list (one entry per line) of the names of all standard commands, message digest commands, or cipher commands, respectively, that are available in the present B utility. The list parameters B and B list all cipher and message digest names, one entry per line. Aliases are listed as: from => to The list parameter B lists all supported public key algorithms. The command BI tests whether a command of the specified name is available. If no command named I exists, it returns 0 (success) and prints BI; otherwise it returns 1 and prints I. In both cases, the output goes to B and nothing is printed to B. Additional command line arguments are always ignored. 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 B program. (BI is not able to detect pseudo-commands such as B, B, or BI itself.) =head2 Standard Commands =over 10 =item L|asn1parse(1)> Parse an ASN.1 sequence. =item L|ca(1)> Certificate Authority (CA) Management. =item L|ciphers(1)> Cipher Suite Description Determination. =item L|cms(1)> CMS (Cryptographic Message Syntax) utility =item L|crl(1)> Certificate Revocation List (CRL) Management. =item L|crl2pkcs7(1)> CRL to PKCS#7 Conversion. =item L|dgst(1)> Message Digest Calculation. =item B Diffie-Hellman Parameter Management. Obsoleted by L|dhparam(1)>. =item L|dhparam(1)> Generation and Management of Diffie-Hellman Parameters. Superseded by L|genpkey(1)> and L|pkeyparam(1)> =item L|dsa(1)> DSA Data Management. =item L|dsaparam(1)> DSA Parameter Generation and Management. Superseded by L|genpkey(1)> and L|pkeyparam(1)> =item L|ec(1)> EC (Elliptic curve) key processing =item L|ecparam(1)> EC parameter manipulation and generation =item L|enc(1)> Encoding with Ciphers. =item L|engine(1)> Engine (loadable module) information and manipulation. =item L|errstr(1)> Error Number to Error String Conversion. =item B Generation of Diffie-Hellman Parameters. Obsoleted by L|dhparam(1)>. =item L|gendsa(1)> Generation of DSA Private Key from Parameters. Superseded by L|genpkey(1)> and L|pkey(1)> =item L|genpkey(1)> Generation of Private Key or Parameters. =item L|genrsa(1)> Generation of RSA Private Key. Superseded by L|genpkey(1)>. =item L|nseq(1)> Create or examine a Netscape certificate sequence =item L|ocsp(1)> Online Certificate Status Protocol utility. =item L|passwd(1)> Generation of hashed passwords. =item L|pkcs12(1)> PKCS#12 Data Management. =item L|pkcs7(1)> PKCS#7 Data Management. =item L|pkey(1)> Public and private key management. =item L|pkeyparam(1)> Public key algorithm parameter management. =item L|pkeyutl(1)> Public key algorithm cryptographic operation utility. =item L|rand(1)> Generate pseudo-random bytes. =item L|req(1)> PKCS#10 X.509 Certificate Signing Request (CSR) Management. =item L|rsa(1)> RSA key management. =item L|rsautl(1)> RSA utility for signing, verification, encryption, and decryption. Superseded by L|pkeyutl(1)> =item L|s_client(1)> 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 B library. =item L|s_server(1)> 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 B 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. =item L|s_time(1)> SSL Connection Timer. =item L|sess_id(1)> SSL Session Data Management. =item L|smime(1)> S/MIME mail processing. =item L|speed(1)> Algorithm Speed Measurement. =item L|spkac(1)> SPKAC printing and generating utility =item L|ts(1)> Time Stamping Authority tool (client/server) =item L|verify(1)> X.509 Certificate Verification. =item L|version(1)> OpenSSL Version Information. =item L|x509(1)> X.509 Certificate Data Management. =back =head2 Message Digest Commands =over 10 =item B MD2 Digest =item B MD5 Digest =item B MDC2 Digest =item B RMD-160 Digest =item B SHA Digest =item B SHA-1 Digest =item B SHA-224 Digest =item B SHA-256 Digest =item B SHA-384 Digest =item B SHA-512 Digest =back =head2 Encoding and Cipher Commands =over 10 =item B Base64 Encoding =item B Blowfish Cipher =item B CAST Cipher =item B CAST5 Cipher =item B DES Cipher =item B Triple-DES Cipher =item B IDEA Cipher =item B RC2 Cipher =item B RC4 Cipher =item B RC5 Cipher =back =head1 OPTIONS Details of which options are available depend on the specific command. This section describes some common options with common behavior. =head2 Common Options =over 10 =item B<-help> Provides a terse summary of all options. =back =head2 Pass Phrase Options Several commands accept password arguments, typically using B<-passin> and B<-passout> for input and output passwords respectively. These allow the password to be obtained from a variety of sources. Both of these options take a single argument whose format is described below. If no password argument is given and a password is required then the user is prompted to enter one: this will typically be read from the current terminal with echoing turned off. =over 10 =item B the actual password is B. Since the password is visible to utilities (like 'ps' under Unix) this form should only be used where security is not important. =item B obtain the password from the environment variable B. Since the environment of other processes is visible on certain platforms (e.g. ps under certain Unix OSes) this option should be used with caution. =item B the first line of B is the password. If the same B argument is supplied to B<-passin> and B<-passout> arguments then the first line will be used for the input password and the next line for the output password. B need not refer to a regular file: it could for example refer to a device or named pipe. =item B read the password from the file descriptor B. This can be used to send the data via a pipe for example. =item B read the password from standard input. =back =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L =head1 HISTORY The BIB<-algorithms> pseudo-commands were added in OpenSSL 1.0.0; For notes on the availability of other commands, see their individual manual pages. =head1 COPYRIGHT Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (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 L. =cut