2
0

openssl.pod 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. =pod
  2. =head1 NAME
  3. openssl - OpenSSL command line tool
  4. =head1 SYNOPSIS
  5. B<openssl>
  6. I<command>
  7. [ I<command_opts> ]
  8. [ I<command_args> ]
  9. B<openssl> [ B<list-standard-commands> | B<list-message-digest-commands> | B<list-cipher-commands> | B<list-cipher-algorithms> | B<list-message-digest-algorithms> | B<list-public-key-algorithms>]
  10. B<openssl> B<no->I<XXX> [ I<arbitrary options> ]
  11. =head1 DESCRIPTION
  12. OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL
  13. v2/v3) and Transport Layer Security (TLS v1) network protocols and related
  14. cryptography standards required by them.
  15. The B<openssl> program is a command line tool for using the various
  16. cryptography functions of OpenSSL's B<crypto> library from the shell.
  17. It can be used for
  18. o Creation and management of private keys, public keys and parameters
  19. o Public key cryptographic operations
  20. o Creation of X.509 certificates, CSRs and CRLs
  21. o Calculation of Message Digests
  22. o Encryption and Decryption with Ciphers
  23. o SSL/TLS Client and Server Tests
  24. o Handling of S/MIME signed or encrypted mail
  25. o Time Stamp requests, generation and verification
  26. =head1 COMMAND SUMMARY
  27. The B<openssl> program provides a rich variety of commands (I<command> in the
  28. SYNOPSIS above), each of which often has a wealth of options and arguments
  29. (I<command_opts> and I<command_args> in the SYNOPSIS).
  30. The pseudo-commands B<list-standard-commands>, B<list-message-digest-commands>,
  31. and B<list-cipher-commands> output a list (one entry per line) of the names
  32. of all standard commands, message digest commands, or cipher commands,
  33. respectively, that are available in the present B<openssl> utility.
  34. The pseudo-commands B<list-cipher-algorithms> and
  35. B<list-message-digest-algorithms> list all cipher and message digest names, one entry per line. Aliases are listed as:
  36. from => to
  37. The pseudo-command B<list-public-key-algorithms> lists all supported public
  38. key algorithms.
  39. The pseudo-command B<no->I<XXX> tests whether a command of the
  40. specified name is available. If no command named I<XXX> exists, it
  41. returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1
  42. and prints I<XXX>. In both cases, the output goes to B<stdout> and
  43. nothing is printed to B<stderr>. Additional command line arguments
  44. are always ignored. Since for each cipher there is a command of the
  45. same name, this provides an easy way for shell scripts to test for the
  46. availability of ciphers in the B<openssl> program. (B<no->I<XXX> is
  47. not able to detect pseudo-commands such as B<quit>,
  48. B<list->I<...>B<-commands>, or B<no->I<XXX> itself.)
  49. =head2 STANDARD COMMANDS
  50. =over 10
  51. =item L<B<asn1parse>|asn1parse(1)>
  52. Parse an ASN.1 sequence.
  53. =item L<B<ca>|ca(1)>
  54. Certificate Authority (CA) Management.
  55. =item L<B<ciphers>|ciphers(1)>
  56. Cipher Suite Description Determination.
  57. =item L<B<cms>|cms(1)>
  58. CMS (Cryptographic Message Syntax) utility
  59. =item L<B<crl>|crl(1)>
  60. Certificate Revocation List (CRL) Management.
  61. =item L<B<crl2pkcs7>|crl2pkcs7(1)>
  62. CRL to PKCS#7 Conversion.
  63. =item L<B<dgst>|dgst(1)>
  64. Message Digest Calculation.
  65. =item B<dh>
  66. Diffie-Hellman Parameter Management.
  67. Obsoleted by L<B<dhparam>|dhparam(1)>.
  68. =item L<B<dhparam>|dhparam(1)>
  69. Generation and Management of Diffie-Hellman Parameters. Superseded by
  70. L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)>
  71. =item L<B<dsa>|dsa(1)>
  72. DSA Data Management.
  73. =item L<B<dsaparam>|dsaparam(1)>
  74. DSA Parameter Generation and Management. Superseded by
  75. L<B<genpkey>|genpkey(1)> and L<B<pkeyparam>|pkeyparam(1)>
  76. =item L<B<ec>|ec(1)>
  77. EC (Elliptic curve) key processing
  78. =item L<B<ecparam>|ecparam(1)>
  79. EC parameter manipulation and generation
  80. =item L<B<enc>|enc(1)>
  81. Encoding with Ciphers.
  82. =item L<B<engine>|engine(1)>
  83. Engine (loadble module) information and manipulation.
  84. =item L<B<errstr>|errstr(1)>
  85. Error Number to Error String Conversion.
  86. =item B<gendh>
  87. Generation of Diffie-Hellman Parameters.
  88. Obsoleted by L<B<dhparam>|dhparam(1)>.
  89. =item L<B<gendsa>|gendsa(1)>
  90. Generation of DSA Private Key from Parameters. Superseded by
  91. L<B<genpkey>|genpkey(1)> and L<B<pkey>|pkey(1)>
  92. =item L<B<genpkey>|genpkey(1)>
  93. Generation of Private Key or Parameters.
  94. =item L<B<genrsa>|genrsa(1)>
  95. Generation of RSA Private Key. Superceded by L<B<genpkey>|genpkey(1)>.
  96. =item L<B<nseq>|nseq(1)>
  97. Create or examine a netscape certificate sequence
  98. =item L<B<ocsp>|ocsp(1)>
  99. Online Certificate Status Protocol utility.
  100. =item L<B<passwd>|passwd(1)>
  101. Generation of hashed passwords.
  102. =item L<B<pkcs12>|pkcs12(1)>
  103. PKCS#12 Data Management.
  104. =item L<B<pkcs7>|pkcs7(1)>
  105. PKCS#7 Data Management.
  106. =item L<B<pkey>|pkey(1)>
  107. Public and private key management.
  108. =item L<B<pkeyparam>|pkeyparam(1)>
  109. Public key algorithm parameter management.
  110. =item L<B<pkeyutl>|pkeyutl(1)>
  111. Public key algorithm cryptographic operation utility.
  112. =item L<B<rand>|rand(1)>
  113. Generate pseudo-random bytes.
  114. =item L<B<req>|req(1)>
  115. PKCS#10 X.509 Certificate Signing Request (CSR) Management.
  116. =item L<B<rsa>|rsa(1)>
  117. RSA key management.
  118. =item L<B<rsautl>|rsautl(1)>
  119. RSA utility for signing, verification, encryption, and decryption. Superseded
  120. by L<B<pkeyutl>|pkeyutl(1)>
  121. =item L<B<s_client>|s_client(1)>
  122. This implements a generic SSL/TLS client which can establish a transparent
  123. connection to a remote server speaking SSL/TLS. It's intended for testing
  124. purposes only and provides only rudimentary interface functionality but
  125. internally uses mostly all functionality of the OpenSSL B<ssl> library.
  126. =item L<B<s_server>|s_server(1)>
  127. This implements a generic SSL/TLS server which accepts connections from remote
  128. clients speaking SSL/TLS. It's intended for testing purposes only and provides
  129. only rudimentary interface functionality but internally uses mostly all
  130. functionality of the OpenSSL B<ssl> library. It provides both an own command
  131. line oriented protocol for testing SSL functions and a simple HTTP response
  132. facility to emulate an SSL/TLS-aware webserver.
  133. =item L<B<s_time>|s_time(1)>
  134. SSL Connection Timer.
  135. =item L<B<sess_id>|sess_id(1)>
  136. SSL Session Data Management.
  137. =item L<B<smime>|smime(1)>
  138. S/MIME mail processing.
  139. =item L<B<speed>|speed(1)>
  140. Algorithm Speed Measurement.
  141. =item L<B<spkac>|spkac(1)>
  142. SPKAC printing and generating utility
  143. =item L<B<ts>|ts(1)>
  144. Time Stamping Authority tool (client/server)
  145. =item L<B<verify>|verify(1)>
  146. X.509 Certificate Verification.
  147. =item L<B<version>|version(1)>
  148. OpenSSL Version Information.
  149. =item L<B<x509>|x509(1)>
  150. X.509 Certificate Data Management.
  151. =back
  152. =head2 MESSAGE DIGEST COMMANDS
  153. =over 10
  154. =item B<md2>
  155. MD2 Digest
  156. =item B<md5>
  157. MD5 Digest
  158. =item B<mdc2>
  159. MDC2 Digest
  160. =item B<rmd160>
  161. RMD-160 Digest
  162. =item B<sha>
  163. SHA Digest
  164. =item B<sha1>
  165. SHA-1 Digest
  166. =back
  167. =item B<sha224>
  168. SHA-224 Digest
  169. =item B<sha256>
  170. SHA-256 Digest
  171. =item B<sha384>
  172. SHA-384 Digest
  173. =item B<sha512>
  174. SHA-512 Digest
  175. =head2 ENCODING AND CIPHER COMMANDS
  176. =over 10
  177. =item B<base64>
  178. Base64 Encoding
  179. =item B<bf bf-cbc bf-cfb bf-ecb bf-ofb>
  180. Blowfish Cipher
  181. =item B<cast cast-cbc>
  182. CAST Cipher
  183. =item B<cast5-cbc cast5-cfb cast5-ecb cast5-ofb>
  184. CAST5 Cipher
  185. =item B<des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ofb>
  186. DES Cipher
  187. =item B<des3 desx des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb>
  188. Triple-DES Cipher
  189. =item B<idea idea-cbc idea-cfb idea-ecb idea-ofb>
  190. IDEA Cipher
  191. =item B<rc2 rc2-cbc rc2-cfb rc2-ecb rc2-ofb>
  192. RC2 Cipher
  193. =item B<rc4>
  194. RC4 Cipher
  195. =item B<rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb>
  196. RC5 Cipher
  197. =back
  198. =head1 PASS PHRASE ARGUMENTS
  199. Several commands accept password arguments, typically using B<-passin>
  200. and B<-passout> for input and output passwords respectively. These allow
  201. the password to be obtained from a variety of sources. Both of these
  202. options take a single argument whose format is described below. If no
  203. password argument is given and a password is required then the user is
  204. prompted to enter one: this will typically be read from the current
  205. terminal with echoing turned off.
  206. =over 10
  207. =item B<pass:password>
  208. the actual password is B<password>. Since the password is visible
  209. to utilities (like 'ps' under Unix) this form should only be used
  210. where security is not important.
  211. =item B<env:var>
  212. obtain the password from the environment variable B<var>. Since
  213. the environment of other processes is visible on certain platforms
  214. (e.g. ps under certain Unix OSes) this option should be used with caution.
  215. =item B<file:pathname>
  216. the first line of B<pathname> is the password. If the same B<pathname>
  217. argument is supplied to B<-passin> and B<-passout> arguments then the first
  218. line will be used for the input password and the next line for the output
  219. password. B<pathname> need not refer to a regular file: it could for example
  220. refer to a device or named pipe.
  221. =item B<fd:number>
  222. read the password from the file descriptor B<number>. This can be used to
  223. send the data via a pipe for example.
  224. =item B<stdin>
  225. read the password from standard input.
  226. =back
  227. =head1 SEE ALSO
  228. L<asn1parse(1)|asn1parse(1)>, L<ca(1)|ca(1)>, L<config(5)|config(5)>,
  229. L<crl(1)|crl(1)>, L<crl2pkcs7(1)|crl2pkcs7(1)>, L<dgst(1)|dgst(1)>,
  230. L<dhparam(1)|dhparam(1)>, L<dsa(1)|dsa(1)>, L<dsaparam(1)|dsaparam(1)>,
  231. L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, L<genpkey(1)|genpkey(1)>,
  232. L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>,
  233. L<passwd(1)|passwd(1)>,
  234. L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>,
  235. L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>,
  236. L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>,
  237. L<s_server(1)|s_server(1)>, L<s_time(1)|s_time(1)>,
  238. L<smime(1)|smime(1)>, L<spkac(1)|spkac(1)>,
  239. L<verify(1)|verify(1)>, L<version(1)|version(1)>, L<x509(1)|x509(1)>,
  240. L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)>, L<x509v3_config(5)|x509v3_config(5)>
  241. =head1 HISTORY
  242. The openssl(1) document appeared in OpenSSL 0.9.2.
  243. The B<list->I<XXX>B<-commands> pseudo-commands were added in OpenSSL 0.9.3;
  244. The B<list->I<XXX>B<-algorithms> pseudo-commands were added in OpenSSL 1.0.0;
  245. the B<no->I<XXX> pseudo-commands were added in OpenSSL 0.9.5a.
  246. For notes on the availability of other commands, see their individual
  247. manual pages.
  248. =cut