diff options
| author | jmc <> | 2004-01-28 19:25:19 +0000 |
|---|---|---|
| committer | jmc <> | 2004-01-28 19:25:19 +0000 |
| commit | d61047fa89127e2667e2b3c88155a99deb6b889b (patch) | |
| tree | 805643b78c011cbfe7e11818800bce84d9a94648 /src | |
| parent | f5af420bc531180e9316cc8dcb135bde62aa03d7 (diff) | |
| download | openbsd-d61047fa89127e2667e2b3c88155a99deb6b889b.tar.gz openbsd-d61047fa89127e2667e2b3c88155a99deb6b889b.tar.bz2 openbsd-d61047fa89127e2667e2b3c88155a99deb6b889b.zip | |
update and sort openssl pkcs{7,8,12};
plus some consistency fixes;
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.sbin/openssl/openssl.1 | 717 |
1 files changed, 313 insertions, 404 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1 index caf93d2e1b..318833ecc2 100644 --- a/src/usr.sbin/openssl/openssl.1 +++ b/src/usr.sbin/openssl/openssl.1 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: openssl.1,v 1.31 2004/01/25 20:27:37 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.32 2004/01/28 19:25:19 jmc Exp $ |
| 2 | .\" ==================================================================== | 2 | .\" ==================================================================== |
| 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | .\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 | .\" | 4 | .\" |
| @@ -476,7 +476,7 @@ The input format. | |||
| 476 | is binary format and | 476 | is binary format and |
| 477 | .Ar PEM | 477 | .Ar PEM |
| 478 | .Pq Privacy Enhanced Mail , | 478 | .Pq Privacy Enhanced Mail , |
| 479 | the default, is base64 encoded. | 479 | the default, is base64-encoded. |
| 480 | .Ar TXT | 480 | .Ar TXT |
| 481 | is plain text. | 481 | is plain text. |
| 482 | .It Fl length Ar number | 482 | .It Fl length Ar number |
| @@ -492,9 +492,7 @@ The format of this file is described in the | |||
| 492 | .Sx ASN1PARSE NOTES | 492 | .Sx ASN1PARSE NOTES |
| 493 | section below. | 493 | section below. |
| 494 | .It Fl out Ar file | 494 | .It Fl out Ar file |
| 495 | Output file to place the | 495 | Output file to place the DER-encoded data into. |
| 496 | .Em DER | ||
| 497 | encoded data into. | ||
| 498 | If this option is not present, then no encoded data will be output. | 496 | If this option is not present, then no encoded data will be output. |
| 499 | This is most useful when combined with the | 497 | This is most useful when combined with the |
| 500 | .Fl strparse | 498 | .Fl strparse |
| @@ -1696,11 +1694,7 @@ selection options were added in version 0.9.7. | |||
| 1696 | .Pp | 1694 | .Pp |
| 1697 | The | 1695 | The |
| 1698 | .Nm crl | 1696 | .Nm crl |
| 1699 | command processes CRL files in | 1697 | command processes CRL files in DER or PEM format. |
| 1700 | .Ar DER | ||
| 1701 | or | ||
| 1702 | .Ar PEM | ||
| 1703 | format. | ||
| 1704 | .Pp | 1698 | .Pp |
| 1705 | The options are as follows: | 1699 | The options are as follows: |
| 1706 | .Bl -tag -width "XXXX" | 1700 | .Bl -tag -width "XXXX" |
| @@ -1725,10 +1719,10 @@ option is not specified. | |||
| 1725 | .It Fl inform Ar DER | PEM | 1719 | .It Fl inform Ar DER | PEM |
| 1726 | This specifies the input format. | 1720 | This specifies the input format. |
| 1727 | .Ar DER | 1721 | .Ar DER |
| 1728 | format is a DER encoded CRL structure. | 1722 | format is a DER-encoded CRL structure. |
| 1729 | .Ar PEM | 1723 | .Ar PEM |
| 1730 | .Pq the default | 1724 | .Pq the default |
| 1731 | is a base64 encoded version of the DER form with header and footer lines. | 1725 | is a base64-encoded version of the DER form with header and footer lines. |
| 1732 | .It Fl issuer | 1726 | .It Fl issuer |
| 1733 | Output the issuer name. | 1727 | Output the issuer name. |
| 1734 | .It Fl lastupdate | 1728 | .It Fl lastupdate |
| @@ -1758,16 +1752,11 @@ The PEM CRL format uses the header and footer lines: | |||
| 1758 | -----END X509 CRL----- | 1752 | -----END X509 CRL----- |
| 1759 | .Ed | 1753 | .Ed |
| 1760 | .Sh CRL EXAMPLES | 1754 | .Sh CRL EXAMPLES |
| 1761 | Convert a CRL file from | 1755 | Convert a CRL file from PEM to DER: |
| 1762 | .Ar PEM | ||
| 1763 | to | ||
| 1764 | .Ar DER : | ||
| 1765 | .Pp | 1756 | .Pp |
| 1766 | .Dl $ openssl crl -in crl.pem -outform DER -out crl.der | 1757 | .Dl $ openssl crl -in crl.pem -outform DER -out crl.der |
| 1767 | .Pp | 1758 | .Pp |
| 1768 | Output the text form of a | 1759 | Output the text form of a DER-encoded certificate: |
| 1769 | .Ar DER | ||
| 1770 | encoded certificate: | ||
| 1771 | .Pp | 1760 | .Pp |
| 1772 | .Dl $ openssl crl -in crl.der -inform DER -text -noout | 1761 | .Dl $ openssl crl -in crl.der -inform DER -text -noout |
| 1773 | .Sh CRL BUGS | 1762 | .Sh CRL BUGS |
| @@ -1799,23 +1788,21 @@ The options are as follows: | |||
| 1799 | .It Fl certfile Ar file | 1788 | .It Fl certfile Ar file |
| 1800 | Specifies a | 1789 | Specifies a |
| 1801 | .Ar file | 1790 | .Ar file |
| 1802 | containing one or more certificates in | 1791 | containing one or more certificates in PEM format. |
| 1803 | .Ar PEM | ||
| 1804 | format. | ||
| 1805 | All certificates in the file will be added to the PKCS#7 structure. | 1792 | All certificates in the file will be added to the PKCS#7 structure. |
| 1806 | This option can be used more than once to read certificates from multiple | 1793 | This option can be used more than once to read certificates from multiple |
| 1807 | files. | 1794 | files. |
| 1808 | .It Fl in Ar file | 1795 | .It Fl in Ar file |
| 1809 | This specifies the input | 1796 | This specifies the input |
| 1810 | .Ar file | 1797 | .Ar file |
| 1811 | to read a CRL from or standard input if this option is not specified. | 1798 | to read a CRL from, or standard input if this option is not specified. |
| 1812 | .It Fl inform Ar DER | PEM | 1799 | .It Fl inform Ar DER | PEM |
| 1813 | This specifies the CRL input format. | 1800 | This specifies the CRL input format. |
| 1814 | .Ar DER | 1801 | .Ar DER |
| 1815 | format is a DER encoded CRL structure. | 1802 | format is a DER-encoded CRL structure. |
| 1816 | .Ar PEM | 1803 | .Ar PEM |
| 1817 | .Pq the default | 1804 | .Pq the default |
| 1818 | is a base64 encoded version of the DER form with header and footer lines. | 1805 | is a base64-encoded version of the DER form with header and footer lines. |
| 1819 | .It Fl nocrl | 1806 | .It Fl nocrl |
| 1820 | Normally, a CRL is included in the output file. | 1807 | Normally, a CRL is included in the output file. |
| 1821 | With this option, no CRL is | 1808 | With this option, no CRL is |
| @@ -1823,23 +1810,21 @@ included in the output file and a CRL is not read from the input file. | |||
| 1823 | .It Fl out Ar file | 1810 | .It Fl out Ar file |
| 1824 | Specifies the output | 1811 | Specifies the output |
| 1825 | .Ar file | 1812 | .Ar file |
| 1826 | to write the PKCS#7 structure to or standard output by default. | 1813 | to write the PKCS#7 structure to, or standard output by default. |
| 1827 | .It Fl outform Ar DER | PEM | 1814 | .It Fl outform Ar DER | PEM |
| 1828 | This specifies the PKCS#7 structure output format. | 1815 | This specifies the PKCS#7 structure output format. |
| 1829 | .Ar DER | 1816 | .Ar DER |
| 1830 | format is a DER encoded PKCS#7 structure. | 1817 | format is a DER-encoded PKCS#7 structure. |
| 1831 | .Ar PEM | 1818 | .Ar PEM |
| 1832 | .Pq the default | 1819 | .Pq the default |
| 1833 | is a base64 encoded version of the DER form with header and footer lines. | 1820 | is a base64-encoded version of the DER form with header and footer lines. |
| 1834 | .El | 1821 | .El |
| 1835 | .Sh CRL2PKCS7 EXAMPLES | 1822 | .Sh CRL2PKCS7 EXAMPLES |
| 1836 | Create a PKCS#7 structure from a certificate and CRL: | 1823 | Create a PKCS#7 structure from a certificate and CRL: |
| 1837 | .Pp | 1824 | .Pp |
| 1838 | .Dl $ openssl crl2pkcs7 -in crl.pem -certfile cert.pem -out p7.pem | 1825 | .Dl $ openssl crl2pkcs7 -in crl.pem -certfile cert.pem -out p7.pem |
| 1839 | .Pp | 1826 | .Pp |
| 1840 | Create a PKCS#7 structure in | 1827 | Create a PKCS#7 structure in DER format with no CRL from several |
| 1841 | .Ar DER | ||
| 1842 | format with no CRL from several | ||
| 1843 | different certificates: | 1828 | different certificates: |
| 1844 | .Bd -literal -offset indent | 1829 | .Bd -literal -offset indent |
| 1845 | $ openssl crl2pkcs7 -nocrl -certfile newcert.pem \e | 1830 | $ openssl crl2pkcs7 -nocrl -certfile newcert.pem \e |
| @@ -1851,13 +1836,11 @@ just certificates and an optional CRL. | |||
| 1851 | .Pp | 1836 | .Pp |
| 1852 | This utility can be used to send certificates and CAs to Netscape as part of | 1837 | This utility can be used to send certificates and CAs to Netscape as part of |
| 1853 | the certificate enrollment process. | 1838 | the certificate enrollment process. |
| 1854 | This involves sending the DER encoded output | 1839 | This involves sending the DER-encoded output |
| 1855 | as MIME type | 1840 | as MIME type |
| 1856 | .Em application/x-x509-user-cert . | 1841 | .Em application/x-x509-user-cert . |
| 1857 | .Pp | 1842 | .Pp |
| 1858 | The | 1843 | The PEM-encoded form with the header and footer lines removed can be used to |
| 1859 | .Ar PEM | ||
| 1860 | encoded form with the header and footer lines removed can be used to | ||
| 1861 | install user certificates and CAs in MSIE using the Xenroll control. | 1844 | install user certificates and CAs in MSIE using the Xenroll control. |
| 1862 | .\" | 1845 | .\" |
| 1863 | .\" DGST | 1846 | .\" DGST |
| @@ -2046,17 +2029,17 @@ The engine will then be set as the default for all available algorithms. | |||
| 2046 | .It Fl in Ar file | 2029 | .It Fl in Ar file |
| 2047 | This specifies the input | 2030 | This specifies the input |
| 2048 | .Ar file | 2031 | .Ar file |
| 2049 | to read parameters from or standard input if this option is not specified. | 2032 | to read parameters from, or standard input if this option is not specified. |
| 2050 | .It Fl inform Ar DER | PEM | 2033 | .It Fl inform Ar DER | PEM |
| 2051 | This specifies the input format. | 2034 | This specifies the input format. |
| 2052 | The argument | 2035 | The argument |
| 2053 | .Ar DER | 2036 | .Ar DER |
| 2054 | uses an ASN1 DER encoded form compatible with the PKCS#3 DHparameter | 2037 | uses an ASN1 DER-encoded form compatible with the PKCS#3 DHparameter |
| 2055 | structure. | 2038 | structure. |
| 2056 | The | 2039 | The |
| 2057 | .Ar PEM | 2040 | .Ar PEM |
| 2058 | form is the default format: | 2041 | form is the default format: |
| 2059 | it consists of the DER format base64 encoded with | 2042 | it consists of the DER format base64-encoded with |
| 2060 | additional header and footer lines. | 2043 | additional header and footer lines. |
| 2061 | .It Fl noout | 2044 | .It Fl noout |
| 2062 | This option inhibits the output of the encoded version of the parameters. | 2045 | This option inhibits the output of the encoded version of the parameters. |
| @@ -2107,8 +2090,7 @@ programs are retained for now, but may have different purposes in future | |||
| 2107 | versions of | 2090 | versions of |
| 2108 | .Nm OpenSSL . | 2091 | .Nm OpenSSL . |
| 2109 | .Sh DHPARAM NOTES | 2092 | .Sh DHPARAM NOTES |
| 2110 | .Ar PEM | 2093 | PEM format DH parameters use the header and footer lines: |
| 2111 | format DH parameters use the header and footer lines: | ||
| 2112 | .Bd -unfilled -offset indent | 2094 | .Bd -unfilled -offset indent |
| 2113 | -----BEGIN DH PARAMETERS----- | 2095 | -----BEGIN DH PARAMETERS----- |
| 2114 | -----END DH PARAMETERS----- | 2096 | -----END DH PARAMETERS----- |
| @@ -2185,9 +2167,7 @@ utility to read in an encrypted key with no encryption option can be used to | |||
| 2185 | remove the pass phrase from a key, | 2167 | remove the pass phrase from a key, |
| 2186 | or by setting the encryption options it can be use to add or change | 2168 | or by setting the encryption options it can be use to add or change |
| 2187 | the pass phrase. | 2169 | the pass phrase. |
| 2188 | These options can only be used with | 2170 | These options can only be used with PEM format output files. |
| 2189 | .Ar PEM | ||
| 2190 | format output files. | ||
| 2191 | .It Fl engine Ar id | 2171 | .It Fl engine Ar id |
| 2192 | Specifying an engine (by it's unique | 2172 | Specifying an engine (by it's unique |
| 2193 | .Ar id | 2173 | .Ar id |
| @@ -2199,13 +2179,13 @@ The engine will then be set as the default for all available algorithms. | |||
| 2199 | .It Fl in Ar file | 2179 | .It Fl in Ar file |
| 2200 | This specifies the input | 2180 | This specifies the input |
| 2201 | .Ar file | 2181 | .Ar file |
| 2202 | to read a key from or standard input if this option is not specified. | 2182 | to read a key from, or standard input if this option is not specified. |
| 2203 | If the key is encrypted, a pass phrase will be prompted for. | 2183 | If the key is encrypted, a pass phrase will be prompted for. |
| 2204 | .It Fl inform Ar DER | PEM | 2184 | .It Fl inform Ar DER | PEM |
| 2205 | This specifies the input format. | 2185 | This specifies the input format. |
| 2206 | The | 2186 | The |
| 2207 | .Ar DER | 2187 | .Ar DER |
| 2208 | argument with a private key uses an ASN1 DER encoded form of an ASN.1 | 2188 | argument with a private key uses an ASN1 DER-encoded form of an ASN.1 |
| 2209 | SEQUENCE consisting of the values of version | 2189 | SEQUENCE consisting of the values of version |
| 2210 | .Pq currently zero , | 2190 | .Pq currently zero , |
| 2211 | P, Q, G, | 2191 | P, Q, G, |
| @@ -2217,8 +2197,8 @@ structure: it is an error if the key is not DSA. | |||
| 2217 | The | 2197 | The |
| 2218 | .Ar PEM | 2198 | .Ar PEM |
| 2219 | form is the default format: | 2199 | form is the default format: |
| 2220 | it consists of the DER format base64 | 2200 | it consists of the DER format base64-encoded with additional header and footer |
| 2221 | encoded with additional header and footer lines. | 2201 | lines. |
| 2222 | In the case of a private key, PKCS#8 format is also accepted. | 2202 | In the case of a private key, PKCS#8 format is also accepted. |
| 2223 | .It Fl modulus | 2203 | .It Fl modulus |
| 2224 | This option prints out the value of the public key component of the key. | 2204 | This option prints out the value of the public key component of the key. |
| @@ -2262,17 +2242,13 @@ This option is automatically set if the input is a public key. | |||
| 2262 | Prints out the public/private key components and parameters. | 2242 | Prints out the public/private key components and parameters. |
| 2263 | .El | 2243 | .El |
| 2264 | .Sh DSA NOTES | 2244 | .Sh DSA NOTES |
| 2265 | The | 2245 | The PEM private key format uses the header and footer lines: |
| 2266 | .Ar PEM | ||
| 2267 | private key format uses the header and footer lines: | ||
| 2268 | .Bd -unfilled -offset indent | 2246 | .Bd -unfilled -offset indent |
| 2269 | -----BEGIN DSA PRIVATE KEY----- | 2247 | -----BEGIN DSA PRIVATE KEY----- |
| 2270 | -----END DSA PRIVATE KEY----- | 2248 | -----END DSA PRIVATE KEY----- |
| 2271 | .Ed | 2249 | .Ed |
| 2272 | .Pp | 2250 | .Pp |
| 2273 | The | 2251 | The PEM public key format uses the header and footer lines: |
| 2274 | .Ar PEM | ||
| 2275 | public key format uses the header and footer lines: | ||
| 2276 | .Bd -unfilled -offset indent | 2252 | .Bd -unfilled -offset indent |
| 2277 | -----BEGIN PUBLIC KEY----- | 2253 | -----BEGIN PUBLIC KEY----- |
| 2278 | -----END PUBLIC KEY----- | 2254 | -----END PUBLIC KEY----- |
| @@ -2349,13 +2325,13 @@ parameter is included, then this option will be ignored. | |||
| 2349 | This specifies the input format. | 2325 | This specifies the input format. |
| 2350 | The | 2326 | The |
| 2351 | .Ar DER | 2327 | .Ar DER |
| 2352 | argument uses an ASN1 DER encoded form compatible with RFC 2459 | 2328 | argument uses an ASN1 DER-encoded form compatible with RFC 2459 |
| 2353 | .Pq PKIX | 2329 | .Pq PKIX |
| 2354 | DSS-Parms that is a SEQUENCE consisting of p, q and g, respectively. | 2330 | DSS-Parms that is a SEQUENCE consisting of p, q and g, respectively. |
| 2355 | The | 2331 | The |
| 2356 | .Ar PEM | 2332 | .Ar PEM |
| 2357 | form is the default format: | 2333 | form is the default format: |
| 2358 | it consists of the DER format base64 encoded with additional header | 2334 | it consists of the DER format base64-encoded with additional header |
| 2359 | and footer lines. | 2335 | and footer lines. |
| 2360 | .It Fl noout | 2336 | .It Fl noout |
| 2361 | This option inhibits the output of the encoded version of the parameters. | 2337 | This option inhibits the output of the encoded version of the parameters. |
| @@ -2388,8 +2364,7 @@ Multiple files can be specified, separated by a | |||
| 2388 | This option prints out the DSA parameters in human readable form. | 2364 | This option prints out the DSA parameters in human readable form. |
| 2389 | .El | 2365 | .El |
| 2390 | .Sh DSAPARAM NOTES | 2366 | .Sh DSAPARAM NOTES |
| 2391 | .Ar PEM | 2367 | PEM format DSA parameters use the header and footer lines: |
| 2392 | format DSA parameters use the header and footer lines: | ||
| 2393 | .Bd -unfilled -offset indent | 2368 | .Bd -unfilled -offset indent |
| 2394 | -----BEGIN DSA PARAMETERS----- | 2369 | -----BEGIN DSA PARAMETERS----- |
| 2395 | -----END DSA PARAMETERS----- | 2370 | -----END DSA PARAMETERS----- |
| @@ -2435,7 +2410,7 @@ If the | |||
| 2435 | option is set, then base64 process the data on one line. | 2410 | option is set, then base64 process the data on one line. |
| 2436 | .It Fl a | 2411 | .It Fl a |
| 2437 | Base64 process the data. | 2412 | Base64 process the data. |
| 2438 | This means that if encryption is taking place, the data is base64 encoded | 2413 | This means that if encryption is taking place, the data is base64-encoded |
| 2439 | after encryption. | 2414 | after encryption. |
| 2440 | If decryption is set, then the input data is base64 decoded before | 2415 | If decryption is set, then the input data is base64 decoded before |
| 2441 | being decrypted. | 2416 | being decrypted. |
| @@ -2950,10 +2925,10 @@ The options are as follows: | |||
| 2950 | .It Fl in Ar file | 2925 | .It Fl in Ar file |
| 2951 | This specifies the input | 2926 | This specifies the input |
| 2952 | .Ar file | 2927 | .Ar file |
| 2953 | to read or standard input if this option is not specified. | 2928 | to read, or standard input if this option is not specified. |
| 2954 | .It Fl out Ar file | 2929 | .It Fl out Ar file |
| 2955 | Specifies the output | 2930 | Specifies the output |
| 2956 | .Ar file | 2931 | .Ar file , |
| 2957 | or standard output by default. | 2932 | or standard output by default. |
| 2958 | .It Fl toseq | 2933 | .It Fl toseq |
| 2959 | Normally, a Netscape certificate sequence will be input and the output | 2934 | Normally, a Netscape certificate sequence will be input and the output |
| @@ -2974,9 +2949,7 @@ Create a Netscape certificate sequence: | |||
| 2974 | .Dl $ openssl nseq -in certs.pem -toseq -out nseq.pem | 2949 | .Dl $ openssl nseq -in certs.pem -toseq -out nseq.pem |
| 2975 | .Ed | 2950 | .Ed |
| 2976 | .Sh NSEQ NOTES | 2951 | .Sh NSEQ NOTES |
| 2977 | The | 2952 | The PEM-encoded form uses the same headers and footers as a certificate: |
| 2978 | .Em PEM | ||
| 2979 | encoded form uses the same headers and footers as a certificate: | ||
| 2980 | .Bd -unfilled -offset indent | 2953 | .Bd -unfilled -offset indent |
| 2981 | -----BEGIN CERTIFICATE----- | 2954 | -----BEGIN CERTIFICATE----- |
| 2982 | -----END CERTIFICATE----- | 2955 | -----END CERTIFICATE----- |
| @@ -2988,12 +2961,9 @@ certificates are sent to the browser: | |||
| 2988 | for example during certificate enrollment. | 2961 | for example during certificate enrollment. |
| 2989 | It is used by the Netscape certificate server, for example. | 2962 | It is used by the Netscape certificate server, for example. |
| 2990 | .Sh NSEQ BUGS | 2963 | .Sh NSEQ BUGS |
| 2991 | This program needs a few more options: | 2964 | This program needs a few more options, |
| 2992 | like allowing | 2965 | like allowing DER or PEM input and output files |
| 2993 | .Em DER | 2966 | and allowing multiple certificate files to be used. |
| 2994 | or | ||
| 2995 | .Em PEM | ||
| 2996 | input and output files and allowing multiple certificate files to be used. | ||
| 2997 | .\" | 2967 | .\" |
| 2998 | .\" OCSP | 2968 | .\" OCSP |
| 2999 | .\" | 2969 | .\" |
| @@ -3097,9 +3067,7 @@ This specifies the current issuer certificate. | |||
| 3097 | This option can be used multiple times. | 3067 | This option can be used multiple times. |
| 3098 | The certificate specified in | 3068 | The certificate specified in |
| 3099 | .Ar file | 3069 | .Ar file |
| 3100 | must be in | 3070 | must be in PEM format. |
| 3101 | .Ar PEM | ||
| 3102 | format. | ||
| 3103 | .It Fl no_cert_checks | 3071 | .It Fl no_cert_checks |
| 3104 | Don't perform any additional checks on the OCSP response signer's certificate. | 3072 | Don't perform any additional checks on the OCSP response signer's certificate. |
| 3105 | That is, do not make any checks to see if the signer's certificate is | 3073 | That is, do not make any checks to see if the signer's certificate is |
| @@ -3174,9 +3142,7 @@ and | |||
| 3174 | .Fl host | 3142 | .Fl host |
| 3175 | options). | 3143 | options). |
| 3176 | .It Fl reqout Ar file , Fl respout Ar file | 3144 | .It Fl reqout Ar file , Fl respout Ar file |
| 3177 | Write out the | 3145 | Write out the DER-encoded certificate request or response to |
| 3178 | .Ar DER | ||
| 3179 | encoded certificate request or response to | ||
| 3180 | .Ar file . | 3146 | .Ar file . |
| 3181 | .It Fl serial Ar num | 3147 | .It Fl serial Ar num |
| 3182 | Same as the | 3148 | Same as the |
| @@ -3557,70 +3523,63 @@ prints | |||
| 3557 | .Sh PKCS7 | 3523 | .Sh PKCS7 |
| 3558 | .Nm openssl pkcs7 | 3524 | .Nm openssl pkcs7 |
| 3559 | .Bk -words | 3525 | .Bk -words |
| 3560 | .Op Fl inform Ar DER | PEM | 3526 | .Op Fl noout |
| 3561 | .Op Fl outform Ar DER | PEM | ||
| 3562 | .Op Fl in Ar file | ||
| 3563 | .Op Fl out Ar file | ||
| 3564 | .Op Fl print_certs | 3527 | .Op Fl print_certs |
| 3565 | .Op Fl text | 3528 | .Op Fl text |
| 3566 | .Op Fl noout | ||
| 3567 | .Op Fl engine Ar id | 3529 | .Op Fl engine Ar id |
| 3530 | .Op Fl in Ar file | ||
| 3531 | .Op Fl inform Ar DER | PEM | ||
| 3532 | .Op Fl out Ar file | ||
| 3533 | .Op Fl outform Ar DER | PEM | ||
| 3568 | .Ek | 3534 | .Ek |
| 3569 | .Pp | 3535 | .Pp |
| 3570 | The | 3536 | The |
| 3571 | .Nm pkcs7 | 3537 | .Nm pkcs7 |
| 3572 | command processes PKCS#7 files in | 3538 | command processes PKCS#7 files in DER or PEM format. |
| 3573 | .Em DER | ||
| 3574 | or | ||
| 3575 | .Em PEM | ||
| 3576 | format. | ||
| 3577 | .Pp | 3539 | .Pp |
| 3578 | The options are as follows: | 3540 | The options are as follows: |
| 3579 | .Bl -tag -width "XXXX" | 3541 | .Bl -tag -width "XXXX" |
| 3542 | .It Fl engine Ar id | ||
| 3543 | Specifying an engine (by it's unique | ||
| 3544 | .Ar id | ||
| 3545 | string) will cause | ||
| 3546 | .Nm pkcs7 | ||
| 3547 | to attempt to obtain a functional reference to the specified engine, | ||
| 3548 | thus initialising it if needed. | ||
| 3549 | The engine will then be set as the default for all available algorithms. | ||
| 3550 | .It Fl in Ar file | ||
| 3551 | This specifies the input | ||
| 3552 | .Ar file | ||
| 3553 | to read from, or standard input if this option is not specified. | ||
| 3580 | .It Fl inform Ar DER | PEM | 3554 | .It Fl inform Ar DER | PEM |
| 3581 | This specifies the input format. | 3555 | This specifies the input format. |
| 3582 | .Ar DER | 3556 | .Ar DER |
| 3583 | format is a DER encoded PKCS#7 v1.5 structure. | 3557 | format is a DER-encoded PKCS#7 v1.5 structure. |
| 3584 | .Ar PEM | 3558 | .Ar PEM |
| 3585 | .Pq the default | 3559 | .Pq the default |
| 3586 | is a base64 encoded version of the DER form with header and footer lines. | 3560 | is a base64-encoded version of the DER form with header and footer lines. |
| 3561 | .It Fl noout | ||
| 3562 | Don't output the encoded version of the PKCS#7 structure | ||
| 3563 | (or certificates if | ||
| 3564 | .Fl print_certs | ||
| 3565 | is set). | ||
| 3566 | .It Fl out Ar file | ||
| 3567 | Specifies the output | ||
| 3568 | .Ar file | ||
| 3569 | to write to, or standard output by default. | ||
| 3587 | .It Fl outform Ar DER | PEM | 3570 | .It Fl outform Ar DER | PEM |
| 3588 | This specifies the output format; the options have the same meaning as the | 3571 | This specifies the output format; the options have the same meaning as the |
| 3589 | .Fl inform | 3572 | .Fl inform |
| 3590 | option. | 3573 | option. |
| 3591 | .It Fl in Ar file | ||
| 3592 | This specifies the input | ||
| 3593 | .Ar file | ||
| 3594 | to read from or standard input if this option is not specified. | ||
| 3595 | .It Fl out Ar file | ||
| 3596 | Specifies the output | ||
| 3597 | .Ar file | ||
| 3598 | to write to or standard output by default. | ||
| 3599 | .It Fl print_certs | 3574 | .It Fl print_certs |
| 3600 | Prints out any certificates or CRLs contained in the file. | 3575 | Prints out any certificates or CRLs contained in the file. |
| 3601 | They are preceded by their subject and issuer names in one line format. | 3576 | They are preceded by their subject and issuer names in a one-line format. |
| 3602 | .It Fl text | 3577 | .It Fl text |
| 3603 | Prints out certificate details in full rather than just subject and | 3578 | Prints out certificate details in full rather than just subject and |
| 3604 | issuer names. | 3579 | issuer names. |
| 3605 | .It Fl noout | ||
| 3606 | Don't output the encoded version of the PKCS#7 structure | ||
| 3607 | (or certificates if | ||
| 3608 | .Fl print_certs | ||
| 3609 | is set). | ||
| 3610 | .It Fl engine Ar id | ||
| 3611 | Specifying an engine (by it's unique | ||
| 3612 | .Ar id | ||
| 3613 | string) will cause | ||
| 3614 | .Nm pkcs7 | ||
| 3615 | to attempt to obtain a functional reference to the specified engine, | ||
| 3616 | thus initialising it if needed. | ||
| 3617 | The engine will then be set as the default for all available algorithms. | ||
| 3618 | .El | 3580 | .El |
| 3619 | .Sh PKCS7 EXAMPLES | 3581 | .Sh PKCS7 EXAMPLES |
| 3620 | Convert a PKCS#7 file from | 3582 | Convert a PKCS#7 file from PEM to DER: |
| 3621 | .Em PEM | ||
| 3622 | to | ||
| 3623 | .Em DER : | ||
| 3624 | .Pp | 3583 | .Pp |
| 3625 | .Dl $ openssl pkcs7 -in file.pem -outform DER -out file.der | 3584 | .Dl $ openssl pkcs7 -in file.pem -outform DER -out file.der |
| 3626 | .Pp | 3585 | .Pp |
| @@ -3628,9 +3587,7 @@ Output all certificates in a file: | |||
| 3628 | .Pp | 3587 | .Pp |
| 3629 | .Dl $ openssl pkcs7 -in file.pem -print_certs -out certs.pem | 3588 | .Dl $ openssl pkcs7 -in file.pem -print_certs -out certs.pem |
| 3630 | .Sh PKCS7 NOTES | 3589 | .Sh PKCS7 NOTES |
| 3631 | The | 3590 | The PEM PKCS#7 format uses the header and footer lines: |
| 3632 | .Em PEM | ||
| 3633 | PKCS#7 format uses the header and footer lines: | ||
| 3634 | .Bd -unfilled -offset indent | 3591 | .Bd -unfilled -offset indent |
| 3635 | -----BEGIN PKCS7----- | 3592 | -----BEGIN PKCS7----- |
| 3636 | -----END PKCS7----- | 3593 | -----END PKCS7----- |
| @@ -3652,21 +3609,21 @@ They cannot currently parse, for example, the new CMS as described in RFC 2630. | |||
| 3652 | .Sh PKCS8 | 3609 | .Sh PKCS8 |
| 3653 | .Nm openssl pkcs8 | 3610 | .Nm openssl pkcs8 |
| 3654 | .Bk -words | 3611 | .Bk -words |
| 3612 | .Op Fl embed | ||
| 3613 | .Op Fl nocrypt | ||
| 3614 | .Op Fl noiter | ||
| 3615 | .Op Fl nooct | ||
| 3616 | .Op Fl nsdb | ||
| 3655 | .Op Fl topk8 | 3617 | .Op Fl topk8 |
| 3618 | .Op Fl engine Ar id | ||
| 3619 | .Op Fl in Ar file | ||
| 3656 | .Op Fl inform Ar DER | PEM | 3620 | .Op Fl inform Ar DER | PEM |
| 3621 | .Op Fl out Ar file | ||
| 3657 | .Op Fl outform Ar DER | PEM | 3622 | .Op Fl outform Ar DER | PEM |
| 3658 | .Op Fl in Ar file | ||
| 3659 | .Op Fl passin Ar arg | 3623 | .Op Fl passin Ar arg |
| 3660 | .Op Fl out Ar file | ||
| 3661 | .Op Fl passout Ar arg | 3624 | .Op Fl passout Ar arg |
| 3662 | .Op Fl noiter | ||
| 3663 | .Op Fl nocrypt | ||
| 3664 | .Op Fl nooct | ||
| 3665 | .Op Fl embed | ||
| 3666 | .Op Fl nsdb | ||
| 3667 | .Op Fl v2 Ar alg | ||
| 3668 | .Op Fl v1 Ar alg | 3625 | .Op Fl v1 Ar alg |
| 3669 | .Op Fl engine Ar id | 3626 | .Op Fl v2 Ar alg |
| 3670 | .Ek | 3627 | .Ek |
| 3671 | .Pp | 3628 | .Pp |
| 3672 | The | 3629 | The |
| @@ -3679,67 +3636,44 @@ and PKCS#12 algorithms. | |||
| 3679 | .Pp | 3636 | .Pp |
| 3680 | The options are as follows: | 3637 | The options are as follows: |
| 3681 | .Bl -tag -width "XXXX" | 3638 | .Bl -tag -width "XXXX" |
| 3682 | .It Fl topk8 | 3639 | .It Fl embed |
| 3683 | Normally, a PKCS#8 private key is expected on input and a traditional format | 3640 | This option generates DSA keys in a broken format. |
| 3684 | private key will be written. | 3641 | The DSA parameters are embedded inside the |
| 3685 | With the | 3642 | .Em PrivateKey |
| 3686 | .Fl topk8 | 3643 | structure. |
| 3687 | option the situation is reversed: | 3644 | In this form the OCTET STRING contains an ASN1 SEQUENCE consisting of |
| 3688 | it reads a traditional format private key and writes a PKCS#8 format key. | 3645 | two structures: |
| 3689 | .It Fl inform Ar DER | PEM | 3646 | a SEQUENCE containing the parameters and an ASN1 INTEGER containing |
| 3690 | This specifies the input format. | 3647 | the private key. |
| 3691 | If a PKCS#8 format key is expected on input, | 3648 | .It Fl engine Ar id |
| 3692 | then either a | 3649 | Specifying an engine (by it's unique |
| 3693 | .Em DER | 3650 | .Ar id |
| 3694 | or | 3651 | string) will cause |
| 3695 | .Em PEM | 3652 | .Nm pkcs8 |
| 3696 | encoded version of a PKCS#8 key will be expected. | 3653 | to attempt to obtain a functional reference to the specified engine, |
| 3697 | Otherwise the | 3654 | thus initialising it if needed. |
| 3698 | .Em DER | 3655 | The engine will then be set as the default for all available algorithms. |
| 3699 | or | ||
| 3700 | .Em PEM | ||
| 3701 | format of the traditional format private key is used. | ||
| 3702 | .It Fl outform Ar DER | PEM | ||
| 3703 | This specifies the output format; the options have the same meaning as the | ||
| 3704 | .Fl inform | ||
| 3705 | option. | ||
| 3706 | .It Fl in Ar file | 3656 | .It Fl in Ar file |
| 3707 | This specifies the input | 3657 | This specifies the input |
| 3708 | .Ar file | 3658 | .Ar file |
| 3709 | to read a key from or standard input if this option is not specified. | 3659 | to read a key from, or standard input if this option is not specified. |
| 3710 | If the key is encrypted, a pass phrase will be prompted for. | 3660 | If the key is encrypted, a pass phrase will be prompted for. |
| 3711 | .It Fl passin Ar arg | 3661 | .It Fl inform Ar DER | PEM |
| 3712 | The input file password source. | 3662 | This specifies the input format. |
| 3713 | For more information about the format of | 3663 | If a PKCS#8 format key is expected on input, |
| 3714 | .Ar arg , | 3664 | then either a |
| 3715 | see the | 3665 | DER- or PEM-encoded version of a PKCS#8 key will be expected. |
| 3716 | .Sx PASS PHRASE ARGUMENTS | 3666 | Otherwise the DER or PEM format of the traditional format private key is used. |
| 3717 | section above. | ||
| 3718 | .It Fl out Ar file | ||
| 3719 | This specifies the output | ||
| 3720 | .Ar file | ||
| 3721 | to write a key to or standard output by default. | ||
| 3722 | If any encryption options are set then a pass phrase will be prompted for. | ||
| 3723 | The output filename should | ||
| 3724 | .Em not | ||
| 3725 | be the same as the input filename. | ||
| 3726 | .It Fl passout Ar arg | ||
| 3727 | The output file password source. | ||
| 3728 | For more information about the format of | ||
| 3729 | .Ar arg , | ||
| 3730 | see the | ||
| 3731 | .Sx PASS PHRASE ARGUMENTS | ||
| 3732 | section above. | ||
| 3733 | .It Fl nocrypt | 3667 | .It Fl nocrypt |
| 3734 | PKCS#8 keys generated or input are normally PKCS#8 | 3668 | PKCS#8 keys generated or input are normally PKCS#8 |
| 3735 | .Em EncryptedPrivateKeyInfo | 3669 | .Em EncryptedPrivateKeyInfo |
| 3736 | structures using an appropriate password based encryption algorithm. | 3670 | structures using an appropriate password-based encryption algorithm. |
| 3737 | With this option an unencrypted | 3671 | With this option, an unencrypted |
| 3738 | .Em PrivateKeyInfo | 3672 | .Em PrivateKeyInfo |
| 3739 | structure is expected or output. | 3673 | structure is expected or output. |
| 3740 | This option does not encrypt private keys at all and should only be used | 3674 | This option does not encrypt private keys at all and should only be used |
| 3741 | when absolutely necessary. | 3675 | when absolutely necessary. |
| 3742 | Certain software such as some versions of Java code signing software used | 3676 | Certain software such as some versions of Java code signing software use |
| 3743 | unencrypted private keys. | 3677 | unencrypted private keys. |
| 3744 | .It Fl nooct | 3678 | .It Fl nooct |
| 3745 | This option generates RSA private keys in a broken format that some software | 3679 | This option generates RSA private keys in a broken format that some software |
| @@ -3747,24 +3681,51 @@ uses. | |||
| 3747 | Specifically the private key should be enclosed in an OCTET STRING, | 3681 | Specifically the private key should be enclosed in an OCTET STRING, |
| 3748 | but some software just includes the structure itself without the | 3682 | but some software just includes the structure itself without the |
| 3749 | surrounding OCTET STRING. | 3683 | surrounding OCTET STRING. |
| 3750 | .It Fl embed | ||
| 3751 | This option generates DSA keys in a broken format. | ||
| 3752 | The DSA parameters are embedded inside the | ||
| 3753 | .Em PrivateKey | ||
| 3754 | structure. | ||
| 3755 | In this form the OCTET STRING contains an ASN1 SEQUENCE consisting of | ||
| 3756 | two structures: | ||
| 3757 | a SEQUENCE containing the parameters and an ASN1 INTEGER containing | ||
| 3758 | the private key. | ||
| 3759 | .It Fl nsdb | 3684 | .It Fl nsdb |
| 3760 | This option generates DSA keys in a broken format compatible with Netscape | 3685 | This option generates DSA keys in a broken format compatible with Netscape |
| 3761 | private key databases. | 3686 | private key databases. |
| 3762 | The | 3687 | The |
| 3763 | .Em PrivateKey | 3688 | .Em PrivateKey |
| 3764 | contains a SEQUENCE consisting of the public and private keys, respectively. | 3689 | contains a SEQUENCE consisting of the public and private keys, respectively. |
| 3690 | .It Fl out Ar file | ||
| 3691 | This specifies the output | ||
| 3692 | .Ar file | ||
| 3693 | to write a key to, or standard output by default. | ||
| 3694 | If any encryption options are set, then a pass phrase will be prompted for. | ||
| 3695 | The output filename should | ||
| 3696 | .Em not | ||
| 3697 | be the same as the input filename. | ||
| 3698 | .It Fl outform Ar DER | PEM | ||
| 3699 | This specifies the output format; the options have the same meaning as the | ||
| 3700 | .Fl inform | ||
| 3701 | option. | ||
| 3702 | .It Fl passin Ar arg | ||
| 3703 | The input file password source. | ||
| 3704 | For more information about the format of | ||
| 3705 | .Ar arg , | ||
| 3706 | see the | ||
| 3707 | .Sx PASS PHRASE ARGUMENTS | ||
| 3708 | section above. | ||
| 3709 | .It Fl passout Ar arg | ||
| 3710 | The output file password source. | ||
| 3711 | For more information about the format of | ||
| 3712 | .Ar arg , | ||
| 3713 | see the | ||
| 3714 | .Sx PASS PHRASE ARGUMENTS | ||
| 3715 | section above. | ||
| 3716 | .It Fl topk8 | ||
| 3717 | Normally, a PKCS#8 private key is expected on input and a traditional format | ||
| 3718 | private key will be written. | ||
| 3719 | With the | ||
| 3720 | .Fl topk8 | ||
| 3721 | option the situation is reversed: | ||
| 3722 | it reads a traditional format private key and writes a PKCS#8 format key. | ||
| 3723 | .It Fl v1 Ar alg | ||
| 3724 | This option specifies a PKCS#5 v1.5 or PKCS#12 algorithm to use. | ||
| 3725 | A complete list of possible algorithms is included below. | ||
| 3765 | .It Fl v2 Ar alg | 3726 | .It Fl v2 Ar alg |
| 3766 | This option enables the use of PKCS#5 v2.0 algorithms. | 3727 | This option enables the use of PKCS#5 v2.0 algorithms. |
| 3767 | Normally, PKCS#8 private keys are encrypted with the password based | 3728 | Normally, PKCS#8 private keys are encrypted with the password-based |
| 3768 | encryption algorithm called | 3729 | encryption algorithm called |
| 3769 | .Em pbeWithMD5AndDES-CBC ; | 3730 | .Em pbeWithMD5AndDES-CBC ; |
| 3770 | this uses 56-bit DES encryption but it was the strongest encryption | 3731 | this uses 56-bit DES encryption but it was the strongest encryption |
| @@ -3780,29 +3741,16 @@ then this doesn't matter. | |||
| 3780 | .Pp | 3741 | .Pp |
| 3781 | The | 3742 | The |
| 3782 | .Ar alg | 3743 | .Ar alg |
| 3783 | argument is the encryption algorithm to use, valid values include | 3744 | argument is the encryption algorithm to use; valid values include |
| 3784 | .Ar des , des3 | 3745 | .Ar des , des3 , |
| 3785 | and | 3746 | and |
| 3786 | .Ar rc2 . | 3747 | .Ar rc2 . |
| 3787 | It is recommended that | 3748 | It is recommended that |
| 3788 | .Ar des3 | 3749 | .Ar des3 |
| 3789 | is used. | 3750 | is used. |
| 3790 | .It Fl v1 Ar alg | ||
| 3791 | This option specifies a PKCS#5 v1.5 or PKCS#12 algorithm to use. | ||
| 3792 | A complete list of possible algorithms is included below. | ||
| 3793 | .It Fl engine Ar id | ||
| 3794 | Specifying an engine (by it's unique | ||
| 3795 | .Ar id | ||
| 3796 | string) will cause | ||
| 3797 | .Nm pkcs8 | ||
| 3798 | to attempt to obtain a functional reference to the specified engine, | ||
| 3799 | thus initialising it if needed. | ||
| 3800 | The engine will then be set as the default for all available algorithms. | ||
| 3801 | .El | 3751 | .El |
| 3802 | .Sh PKCS8 NOTES | 3752 | .Sh PKCS8 NOTES |
| 3803 | The encrypted form of a | 3753 | The encrypted form of a PEM-encoded PKCS#8 file uses the following |
| 3804 | .Em PEM | ||
| 3805 | encoded PKCS#8 file uses the following | ||
| 3806 | headers and footers: | 3754 | headers and footers: |
| 3807 | .Bd -unfilled -offset indent | 3755 | .Bd -unfilled -offset indent |
| 3808 | -----BEGIN ENCRYPTED PRIVATE KEY----- | 3756 | -----BEGIN ENCRYPTED PRIVATE KEY----- |
| @@ -3816,25 +3764,22 @@ The unencrypted form uses: | |||
| 3816 | .Ed | 3764 | .Ed |
| 3817 | .Pp | 3765 | .Pp |
| 3818 | Private keys encrypted using PKCS#5 v2.0 algorithms and high iteration | 3766 | Private keys encrypted using PKCS#5 v2.0 algorithms and high iteration |
| 3819 | counts are more secure that those encrypted using the traditional | 3767 | counts are more secure than those encrypted using the traditional |
| 3820 | .Nm SSLeay | 3768 | .Nm SSLeay |
| 3821 | compatible formats. | 3769 | compatible formats. |
| 3822 | So if additional security is considered, important the keys should be converted. | 3770 | So if additional security is considered important, the keys should be converted. |
| 3823 | .Pp | 3771 | .Pp |
| 3824 | The default encryption is only 56 bits because this is the encryption | 3772 | The default encryption is only 56 bits because this is the encryption |
| 3825 | that most current implementations of PKCS#8 will support. | 3773 | that most current implementations of PKCS#8 support. |
| 3826 | .Pp | 3774 | .Pp |
| 3827 | Some software may use PKCS#12 password based encryption algorithms | 3775 | Some software may use PKCS#12 password-based encryption algorithms |
| 3828 | with PKCS#8 format private keys: these are handled automatically | 3776 | with PKCS#8 format private keys: these are handled automatically |
| 3829 | but there is no option to produce them. | 3777 | but there is no option to produce them. |
| 3830 | .Pp | 3778 | .Pp |
| 3831 | It is possible to write out | 3779 | It is possible to write out |
| 3832 | .Em DER | 3780 | DER-encoded encrypted private keys in PKCS#8 format because the encryption |
| 3833 | encoded encrypted private keys in PKCS#8 format because the encryption | ||
| 3834 | details are included at an ASN1 | 3781 | details are included at an ASN1 |
| 3835 | level whereas the traditional format includes them at a | 3782 | level whereas the traditional format includes them at a PEM level. |
| 3836 | .Em PEM | ||
| 3837 | level. | ||
| 3838 | .Sh PKCS#5 V1.5 AND PKCS#12 ALGORITHMS | 3783 | .Sh PKCS#5 V1.5 AND PKCS#12 ALGORITHMS |
| 3839 | Various algorithms can be used with the | 3784 | Various algorithms can be used with the |
| 3840 | .Fl v1 | 3785 | .Fl v1 |
| @@ -3855,7 +3800,7 @@ They use either 64-bit RC2 or 56-bit DES. | |||
| 3855 | .Pp | 3800 | .Pp |
| 3856 | .It Ar PBE-SHA1-RC4-128 | PBE-SHA1-RC4-40 | PBE-SHA1-3DES | PBE-SHA1-2DES | 3801 | .It Ar PBE-SHA1-RC4-128 | PBE-SHA1-RC4-40 | PBE-SHA1-3DES | PBE-SHA1-2DES |
| 3857 | .It Ar PBE-SHA1-RC2-128 | PBE-SHA1-RC2-40 | 3802 | .It Ar PBE-SHA1-RC2-128 | PBE-SHA1-RC2-40 |
| 3858 | These algorithms use the PKCS#12 password based encryption algorithm and | 3803 | These algorithms use the PKCS#12 password-based encryption algorithm and |
| 3859 | allow strong encryption algorithms like triple DES or 128-bit RC2 to be used. | 3804 | allow strong encryption algorithms like triple DES or 128-bit RC2 to be used. |
| 3860 | .El | 3805 | .El |
| 3861 | .Sh PKCS8 EXAMPLES | 3806 | .Sh PKCS8 EXAMPLES |
| @@ -3875,7 +3820,7 @@ $ openssl pkcs8 -in key.pem -topk8 -out enckey.pem \e | |||
| 3875 | -v1 PBE-SHA1-3DES | 3820 | -v1 PBE-SHA1-3DES |
| 3876 | .Ed | 3821 | .Ed |
| 3877 | .Pp | 3822 | .Pp |
| 3878 | Read a DER unencrypted PKCS#8 format private key: | 3823 | Read a DER-unencrypted PKCS#8 format private key: |
| 3879 | .Pp | 3824 | .Pp |
| 3880 | .Dl "$ openssl pkcs8 -inform DER -nocrypt -in key.der -out key.pem" | 3825 | .Dl "$ openssl pkcs8 -inform DER -nocrypt -in key.der -out key.pem" |
| 3881 | .Pp | 3826 | .Pp |
| @@ -3893,7 +3838,7 @@ algorithms are concerned. | |||
| 3893 | The format of PKCS#8 DSA | 3838 | The format of PKCS#8 DSA |
| 3894 | .Pq and other | 3839 | .Pq and other |
| 3895 | private keys is not well documented: | 3840 | private keys is not well documented: |
| 3896 | it is hidden away in PKCS#11 v2.01, section 11.9.; | 3841 | it is hidden away in PKCS#11 v2.01, section 11.9; |
| 3897 | .Nm OpenSSL Ns Li 's | 3842 | .Nm OpenSSL Ns Li 's |
| 3898 | default DSA PKCS#8 private key format complies with this standard. | 3843 | default DSA PKCS#8 private key format complies with this standard. |
| 3899 | .Sh PKCS8 BUGS | 3844 | .Sh PKCS8 BUGS |
| @@ -3910,41 +3855,41 @@ compatibility, several of the utilities use the old format at present. | |||
| 3910 | .Sh PKCS12 | 3855 | .Sh PKCS12 |
| 3911 | .Nm "openssl pkcs12" | 3856 | .Nm "openssl pkcs12" |
| 3912 | .Bk -words | 3857 | .Bk -words |
| 3913 | .Op Fl export | 3858 | .Oo |
| 3859 | .Fl aes128 | aes192 | aes256 | | ||
| 3860 | .Fl des | des3 | ||
| 3861 | .Oc | ||
| 3862 | .Op Fl cacerts | ||
| 3863 | .Op Fl certpbe | ||
| 3914 | .Op Fl chain | 3864 | .Op Fl chain |
| 3915 | .Op Fl inkey Ar file | ||
| 3916 | .Op Fl certfile Ar file | ||
| 3917 | .Op Fl CApath Ar directory | ||
| 3918 | .Op Fl CAfile Ar file | ||
| 3919 | .Op Fl name Ar name | ||
| 3920 | .Op Fl caname Ar name | ||
| 3921 | .Op Fl in Ar file | ||
| 3922 | .Op Fl out Ar file | ||
| 3923 | .Op Fl noout | ||
| 3924 | .Op Fl nomacver | ||
| 3925 | .Op Fl nocerts | ||
| 3926 | .Op Fl clcerts | 3865 | .Op Fl clcerts |
| 3927 | .Op Fl cacerts | 3866 | .Op Fl descert |
| 3928 | .Op Fl nokeys | 3867 | .Op Fl export |
| 3929 | .Op Fl info | 3868 | .Op Fl info |
| 3930 | .Oo | 3869 | .Op Fl keyex |
| 3931 | .Fl des | des3 | aes128 | | 3870 | .Op Fl keypbe |
| 3932 | .Fl aes192 | aes256 | 3871 | .Op Fl keysig |
| 3933 | .Oc | 3872 | .Op Fl maciter |
| 3873 | .Op Fl nocerts | ||
| 3934 | .Op Fl nodes | 3874 | .Op Fl nodes |
| 3935 | .Op Fl noiter | 3875 | .Op Fl noiter |
| 3936 | .Op Fl maciter | 3876 | .Op Fl nokeys |
| 3877 | .Op Fl nomacver | ||
| 3878 | .Op Fl noout | ||
| 3937 | .Op Fl twopass | 3879 | .Op Fl twopass |
| 3938 | .Op Fl descert | 3880 | .Op Fl CAfile Ar file |
| 3939 | .Op Fl certpbe | 3881 | .Op Fl CApath Ar directory |
| 3940 | .Op Fl keypbe | 3882 | .Op Fl caname Ar name |
| 3941 | .Op Fl keyex | 3883 | .Op Fl certfile Ar file |
| 3942 | .Op Fl keysig | 3884 | .Op Fl engine Ar id |
| 3943 | .Op Fl password Ar arg | 3885 | .Op Fl in Ar file |
| 3886 | .Op Fl inkey Ar file | ||
| 3887 | .Op Fl name Ar name | ||
| 3888 | .Op Fl out Ar file | ||
| 3944 | .Op Fl passin Ar arg | 3889 | .Op Fl passin Ar arg |
| 3945 | .Op Fl passout Ar arg | 3890 | .Op Fl passout Ar arg |
| 3891 | .Op Fl password Ar arg | ||
| 3946 | .Op Fl rand Ar file ... | 3892 | .Op Fl rand Ar file ... |
| 3947 | .Op Fl engine Ar id | ||
| 3948 | .Ek | 3893 | .Ek |
| 3949 | .Pp | 3894 | .Pp |
| 3950 | The | 3895 | The |
| @@ -3964,18 +3909,43 @@ option | |||
| 3964 | .Pq see below . | 3909 | .Pq see below . |
| 3965 | .Sh PKCS12 PARSING OPTIONS | 3910 | .Sh PKCS12 PARSING OPTIONS |
| 3966 | .Bl -tag -width "XXXX" | 3911 | .Bl -tag -width "XXXX" |
| 3912 | .It Xo | ||
| 3913 | .Fl aes128 | aes192 | aes256 | | ||
| 3914 | .Fl des | des3 | ||
| 3915 | .Xc | ||
| 3916 | Use AES, DES, or triple DES, respectively, | ||
| 3917 | to encrypt private keys before outputting. | ||
| 3918 | The default is triple DES. | ||
| 3919 | .It Fl cacerts | ||
| 3920 | Only output CA certificates | ||
| 3921 | .Pq not client certificates . | ||
| 3922 | .It Fl clcerts | ||
| 3923 | Only output client certificates | ||
| 3924 | .Pq not CA certificates . | ||
| 3967 | .It Fl in Ar file | 3925 | .It Fl in Ar file |
| 3968 | This specifies the | 3926 | This specifies the |
| 3969 | .Ar file | 3927 | .Ar file |
| 3970 | of the PKCS#12 file to be parsed. | 3928 | of the PKCS#12 file to be parsed. |
| 3971 | Standard input is used by default. | 3929 | Standard input is used by default. |
| 3930 | .It Fl info | ||
| 3931 | Output additional information about the PKCS#12 file structure, | ||
| 3932 | algorithms used, and iteration counts. | ||
| 3933 | .It Fl nocerts | ||
| 3934 | No certificates at all will be output. | ||
| 3935 | .It Fl nodes | ||
| 3936 | Don't encrypt the private keys at all. | ||
| 3937 | .It Fl nokeys | ||
| 3938 | No private keys will be output. | ||
| 3939 | .It Fl nomacver | ||
| 3940 | Don't attempt to verify the integrity MAC before reading the file. | ||
| 3941 | .It Fl noout | ||
| 3942 | This option inhibits output of the keys and certificates to the output file | ||
| 3943 | version of the PKCS#12 file. | ||
| 3972 | .It Fl out Ar file | 3944 | .It Fl out Ar file |
| 3973 | The | 3945 | The |
| 3974 | .Ar file | 3946 | .Ar file |
| 3975 | to write certificates and private keys to, standard output by default. | 3947 | to write certificates and private keys to, standard output by default. |
| 3976 | They are all written in | 3948 | They are all written in PEM format. |
| 3977 | .Em PEM | ||
| 3978 | format. | ||
| 3979 | .It Fl pass Ar arg , Fl passin Ar arg | 3949 | .It Fl pass Ar arg , Fl passin Ar arg |
| 3980 | The PKCS#12 file | 3950 | The PKCS#12 file |
| 3981 | .Pq i.e. input file | 3951 | .Pq i.e. input file |
| @@ -3992,33 +3962,6 @@ For more information about the format of | |||
| 3992 | see the | 3962 | see the |
| 3993 | .Sx PASS PHRASE ARGUMENTS | 3963 | .Sx PASS PHRASE ARGUMENTS |
| 3994 | section above. | 3964 | section above. |
| 3995 | .It Fl noout | ||
| 3996 | This option inhibits output of the keys and certificates to the output file | ||
| 3997 | version of the PKCS#12 file. | ||
| 3998 | .It Fl clcerts | ||
| 3999 | Only output client certificates | ||
| 4000 | .Pq not CA certificates . | ||
| 4001 | .It Fl cacerts | ||
| 4002 | Only output CA certificates | ||
| 4003 | .Pq not client certificates . | ||
| 4004 | .It Fl nocerts | ||
| 4005 | No certificates at all will be output. | ||
| 4006 | .It Fl nokeys | ||
| 4007 | No private keys will be output. | ||
| 4008 | .It Fl info | ||
| 4009 | Output additional information about the PKCS#12 file structure, | ||
| 4010 | algorithms used and iteration counts. | ||
| 4011 | .It Xo | ||
| 4012 | .Fl des | des3 | aes128 | | ||
| 4013 | .Fl aes192 | aes256 | ||
| 4014 | .Xc | ||
| 4015 | Use DES, triple DES, or AES, respectively, | ||
| 4016 | to encrypt private keys before outputting. | ||
| 4017 | The default is triple DES. | ||
| 4018 | .It Fl nodes | ||
| 4019 | Don't encrypt the private keys at all. | ||
| 4020 | .It Fl nomacver | ||
| 4021 | Don't attempt to verify the integrity MAC before reading the file. | ||
| 4022 | .It Fl twopass | 3965 | .It Fl twopass |
| 4023 | Prompt for separate integrity and encryption passwords: most software | 3966 | Prompt for separate integrity and encryption passwords: most software |
| 4024 | always assumes these are the same so this option will render such | 3967 | always assumes these are the same so this option will render such |
| @@ -4026,41 +3969,12 @@ PKCS#12 files unreadable. | |||
| 4026 | .El | 3969 | .El |
| 4027 | .Sh PKCS12 FILE CREATION OPTIONS | 3970 | .Sh PKCS12 FILE CREATION OPTIONS |
| 4028 | .Bl -tag -width "XXXX" | 3971 | .Bl -tag -width "XXXX" |
| 4029 | .It Fl export | ||
| 4030 | This option specifies that a PKCS#12 file will be created rather than | ||
| 4031 | parsed. | ||
| 4032 | .It Fl out Ar file | ||
| 4033 | This specifies | ||
| 4034 | .Ar file | ||
| 4035 | to write the PKCS#12 file to. | ||
| 4036 | Standard output is used by default. | ||
| 4037 | .It Fl in Ar file | ||
| 4038 | The | ||
| 4039 | .Ar file | ||
| 4040 | to read certificates and private keys from, standard input by default. | ||
| 4041 | They must all be in | ||
| 4042 | .Em PEM | ||
| 4043 | format. | ||
| 4044 | The order doesn't matter but one private key and its corresponding | ||
| 4045 | certificate should be present. | ||
| 4046 | If additional certificates are present, they will also be included | ||
| 4047 | in the PKCS#12 file. | ||
| 4048 | .It Fl inkey Ar file | ||
| 4049 | File to read private key from. | ||
| 4050 | If not present then a private key must be present in the input file. | ||
| 4051 | .It Fl name Ar friendlyname | ||
| 4052 | This specifies the | ||
| 4053 | .Qq friendly name | ||
| 4054 | for the certificate and private key. | ||
| 4055 | This name is typically displayed in list boxes by software importing the file. | ||
| 4056 | .It Fl certfile Ar file | ||
| 4057 | A file to read additional certificates from. | ||
| 4058 | .It Fl CApath Ar directory | ||
| 4059 | Directory of CAs | ||
| 4060 | .Pq PEM format . | ||
| 4061 | .It Fl CAfile Ar file | 3972 | .It Fl CAfile Ar file |
| 4062 | File of CAs | 3973 | File of CAs |
| 4063 | .Pq PEM format . | 3974 | .Pq PEM format . |
| 3975 | .It Fl CApath Ar directory | ||
| 3976 | Directory of CAs | ||
| 3977 | .Pq PEM format . | ||
| 4064 | .It Fl caname Ar friendlyname | 3978 | .It Fl caname Ar friendlyname |
| 4065 | This specifies the | 3979 | This specifies the |
| 4066 | .Qq friendly name | 3980 | .Qq friendly name |
| @@ -4069,22 +3983,8 @@ This option may be used multiple times to specify names for all certificates | |||
| 4069 | in the order they appear. | 3983 | in the order they appear. |
| 4070 | Netscape ignores friendly names on other certificates, | 3984 | Netscape ignores friendly names on other certificates, |
| 4071 | whereas MSIE displays them. | 3985 | whereas MSIE displays them. |
| 4072 | .It Fl pass Ar arg , Fl passout Ar arg | 3986 | .It Fl certfile Ar file |
| 4073 | The PKCS#12 file | 3987 | A file to read additional certificates from. |
| 4074 | .Pq i.e. output file | ||
| 4075 | password source. | ||
| 4076 | For more information about the format of | ||
| 4077 | .Ar arg , | ||
| 4078 | see the | ||
| 4079 | .Sx PASS PHRASE ARGUMENTS | ||
| 4080 | section above. | ||
| 4081 | .It Fl passin Ar password | ||
| 4082 | Pass phrase source to decrypt any input private keys with. | ||
| 4083 | For more information about the format of | ||
| 4084 | .Ar arg , | ||
| 4085 | see the | ||
| 4086 | .Sx PASS PHRASE ARGUMENTS | ||
| 4087 | section above. | ||
| 4088 | .It Fl chain | 3988 | .It Fl chain |
| 4089 | If this option is present, then an attempt is made to include the entire | 3989 | If this option is present, then an attempt is made to include the entire |
| 4090 | certificate chain of the user certificate. | 3990 | certificate chain of the user certificate. |
| @@ -4097,14 +3997,29 @@ file unreadable by some | |||
| 4097 | software. | 3997 | software. |
| 4098 | By default, the private key is encrypted using triple DES and the | 3998 | By default, the private key is encrypted using triple DES and the |
| 4099 | certificate using 40-bit RC2. | 3999 | certificate using 40-bit RC2. |
| 4100 | .It Fl keypbe Ar alg , Fl certpbe Ar alg | 4000 | .It Fl engine Ar id |
| 4101 | These options allow the algorithm used to encrypt the private key and | 4001 | Specifying an engine (by it's unique |
| 4102 | certificates to be selected. | 4002 | .Ar id |
| 4103 | Although any PKCS#5 v1.5 or PKCS#12 algorithms can be selected, | 4003 | string) will cause |
| 4104 | it is advisable to only use PKCS#12 algorithms. | 4004 | .Nm pkcs12 |
| 4105 | See the list in the | 4005 | to attempt to obtain a functional reference to the specified engine, |
| 4106 | .Sx PKCS12 NOTES | 4006 | thus initialising it if needed. |
| 4107 | section for more information. | 4007 | The engine will then be set as the default for all available algorithms. |
| 4008 | .It Fl export | ||
| 4009 | This option specifies that a PKCS#12 file will be created rather than | ||
| 4010 | parsed. | ||
| 4011 | .It Fl in Ar file | ||
| 4012 | The | ||
| 4013 | .Ar file | ||
| 4014 | to read certificates and private keys from, standard input by default. | ||
| 4015 | They must all be in PEM format. | ||
| 4016 | The order doesn't matter but one private key and its corresponding | ||
| 4017 | certificate should be present. | ||
| 4018 | If additional certificates are present, they will also be included | ||
| 4019 | in the PKCS#12 file. | ||
| 4020 | .It Fl inkey Ar file | ||
| 4021 | File to read private key from. | ||
| 4022 | If not present, then a private key must be present in the input file. | ||
| 4108 | .It Fl keyex | keysig | 4023 | .It Fl keyex | keysig |
| 4109 | Specifies that the private key is to be used for key exchange or just signing. | 4024 | Specifies that the private key is to be used for key exchange or just signing. |
| 4110 | This option is only interpreted by MSIE and similar MS software. | 4025 | This option is only interpreted by MSIE and similar MS software. |
| @@ -4120,6 +4035,22 @@ Signing only keys can be used for S/MIME signing, authenticode | |||
| 4120 | and SSL client authentication; | 4035 | and SSL client authentication; |
| 4121 | however, due to a bug only MSIE 5.0 and later support | 4036 | however, due to a bug only MSIE 5.0 and later support |
| 4122 | the use of signing only keys for SSL client authentication. | 4037 | the use of signing only keys for SSL client authentication. |
| 4038 | .It Fl keypbe Ar alg , Fl certpbe Ar alg | ||
| 4039 | These options allow the algorithm used to encrypt the private key and | ||
| 4040 | certificates to be selected. | ||
| 4041 | Although any PKCS#5 v1.5 or PKCS#12 algorithms can be selected, | ||
| 4042 | it is advisable to only use PKCS#12 algorithms. | ||
| 4043 | See the list in the | ||
| 4044 | .Sx PKCS12 NOTES | ||
| 4045 | section for more information. | ||
| 4046 | .It Fl maciter | ||
| 4047 | This option is included for compatibility with previous versions; it used | ||
| 4048 | to be needed to use MAC iterations counts but they are now used by default. | ||
| 4049 | .It Fl name Ar friendlyname | ||
| 4050 | This specifies the | ||
| 4051 | .Qq friendly name | ||
| 4052 | for the certificate and private key. | ||
| 4053 | This name is typically displayed in list boxes by software importing the file. | ||
| 4123 | .It Fl nomaciter , noiter | 4054 | .It Fl nomaciter , noiter |
| 4124 | These options affect the iteration counts on the MAC and key algorithms. | 4055 | These options affect the iteration counts on the MAC and key algorithms. |
| 4125 | Unless you wish to produce files compatible with MSIE 4.0, you should leave | 4056 | Unless you wish to produce files compatible with MSIE 4.0, you should leave |
| @@ -4139,9 +4070,27 @@ Most software supports both MAC and key iteration counts. | |||
| 4139 | MSIE 4.0 doesn't support MAC iteration counts, so it needs the | 4070 | MSIE 4.0 doesn't support MAC iteration counts, so it needs the |
| 4140 | .Fl nomaciter | 4071 | .Fl nomaciter |
| 4141 | option. | 4072 | option. |
| 4142 | .It Fl maciter | 4073 | .It Fl out Ar file |
| 4143 | This option is included for compatibility with previous versions; it used | 4074 | This specifies |
| 4144 | to be needed to use MAC iterations counts but they are now used by default. | 4075 | .Ar file |
| 4076 | to write the PKCS#12 file to. | ||
| 4077 | Standard output is used by default. | ||
| 4078 | .It Fl pass Ar arg , Fl passout Ar arg | ||
| 4079 | The PKCS#12 file | ||
| 4080 | .Pq i.e. output file | ||
| 4081 | password source. | ||
| 4082 | For more information about the format of | ||
| 4083 | .Ar arg , | ||
| 4084 | see the | ||
| 4085 | .Sx PASS PHRASE ARGUMENTS | ||
| 4086 | section above. | ||
| 4087 | .It Fl passin Ar password | ||
| 4088 | Pass phrase source to decrypt any input private keys with. | ||
| 4089 | For more information about the format of | ||
| 4090 | .Ar arg , | ||
| 4091 | see the | ||
| 4092 | .Sx PASS PHRASE ARGUMENTS | ||
| 4093 | section above. | ||
| 4145 | .It Fl rand Ar file ... | 4094 | .It Fl rand Ar file ... |
| 4146 | A file or files | 4095 | A file or files |
| 4147 | containing random data used to seed the random number generator, | 4096 | containing random data used to seed the random number generator, |
| @@ -4149,14 +4098,6 @@ or an EGD socket (see | |||
| 4149 | .Xr RAND_egd 3 ) . | 4098 | .Xr RAND_egd 3 ) . |
| 4150 | Multiple files can be specified separated by a | 4099 | Multiple files can be specified separated by a |
| 4151 | .Sq \&: . | 4100 | .Sq \&: . |
| 4152 | .It Fl engine Ar id | ||
| 4153 | Specifying an engine (by it's unique | ||
| 4154 | .Ar id | ||
| 4155 | string) will cause | ||
| 4156 | .Nm pkcs12 | ||
| 4157 | to attempt to obtain a functional reference to the specified engine, | ||
| 4158 | thus initialising it if needed. | ||
| 4159 | The engine will then be set as the default for all available algorithms. | ||
| 4160 | .El | 4101 | .El |
| 4161 | .Sh PKCS12 NOTES | 4102 | .Sh PKCS12 NOTES |
| 4162 | Although there are a large number of options, | 4103 | Although there are a large number of options, |
| @@ -4395,12 +4336,11 @@ The options are as follows: | |||
| 4395 | This specifies the input format. | 4336 | This specifies the input format. |
| 4396 | The | 4337 | The |
| 4397 | .Ar DER | 4338 | .Ar DER |
| 4398 | argument uses an ASN1 DER encoded | 4339 | argument uses an ASN1 DER-encoded form compatible with the PKCS#10. |
| 4399 | form compatible with the PKCS#10. | ||
| 4400 | The | 4340 | The |
| 4401 | .Ar PEM | 4341 | .Ar PEM |
| 4402 | form is the default format: | 4342 | form is the default format: |
| 4403 | it consists of the DER format base64 encoded with additional header and | 4343 | it consists of the DER format base64-encoded with additional header and |
| 4404 | footer lines. | 4344 | footer lines. |
| 4405 | .It Fl outform Ar DER | PEM | 4345 | .It Fl outform Ar DER | PEM |
| 4406 | This specifies the output format; the options have the same meaning as the | 4346 | This specifies the output format; the options have the same meaning as the |
| @@ -4475,9 +4415,7 @@ generates a DSA key using the parameters in the file | |||
| 4475 | .Ar file . | 4415 | .Ar file . |
| 4476 | .It Fl key Ar file | 4416 | .It Fl key Ar file |
| 4477 | This specifies the file to read the private key from. | 4417 | This specifies the file to read the private key from. |
| 4478 | It also accepts PKCS#8 format private keys for | 4418 | It also accepts PKCS#8 format private keys for PEM format files. |
| 4479 | .Em PEM | ||
| 4480 | format files. | ||
| 4481 | .It Fl keyform Ar DER | PEM | 4419 | .It Fl keyform Ar DER | PEM |
| 4482 | The format of the private key file specified in the | 4420 | The format of the private key file specified in the |
| 4483 | .Fl key | 4421 | .Fl key |
| @@ -4581,9 +4519,8 @@ SET OF, whereas the correct form does. | |||
| 4581 | .Pp | 4519 | .Pp |
| 4582 | It should be noted that very few CAs still require the use of this option. | 4520 | It should be noted that very few CAs still require the use of this option. |
| 4583 | .It Fl newhdr | 4521 | .It Fl newhdr |
| 4584 | Adds the word NEW to the | 4522 | Adds the word NEW to the PEM file header and footer lines |
| 4585 | .Em PEM | 4523 | on the outputed request. |
| 4586 | file header and footer lines on the outputed request. | ||
| 4587 | Some software | 4524 | Some software |
| 4588 | .Pq Netscape certificate server | 4525 | .Pq Netscape certificate server |
| 4589 | and some CAs need this. | 4526 | and some CAs need this. |
| @@ -4953,9 +4890,7 @@ Sample configuration containing all field values: | |||
| 4953 | \& challengePassword = A challenge password | 4890 | \& challengePassword = A challenge password |
| 4954 | .Ed | 4891 | .Ed |
| 4955 | .Sh REQ NOTES | 4892 | .Sh REQ NOTES |
| 4956 | The header and footer lines in the | 4893 | The header and footer lines in the PEM format are normally: |
| 4957 | .Ar PEM | ||
| 4958 | format are normally: | ||
| 4959 | .Bd -unfilled -offset indent | 4894 | .Bd -unfilled -offset indent |
| 4960 | -----BEGIN CERTIFICATE REQUEST----- | 4895 | -----BEGIN CERTIFICATE REQUEST----- |
| 4961 | -----END CERTIFICATE REQUEST----- | 4896 | -----END CERTIFICATE REQUEST----- |
| @@ -5105,12 +5040,12 @@ This specifies the input format. | |||
| 5105 | The | 5040 | The |
| 5106 | .Ar DER | 5041 | .Ar DER |
| 5107 | argument | 5042 | argument |
| 5108 | uses an ASN1 DER encoded form compatible with the PKCS#1 | 5043 | uses an ASN1 DER-encoded form compatible with the PKCS#1 |
| 5109 | RSAPrivateKey or SubjectPublicKeyInfo format. | 5044 | RSAPrivateKey or SubjectPublicKeyInfo format. |
| 5110 | The | 5045 | The |
| 5111 | .Ar PEM | 5046 | .Ar PEM |
| 5112 | form is the default format: it consists of the DER format base64 | 5047 | form is the default format: it consists of the DER format base64-encoded with |
| 5113 | encoded with additional header and footer lines. | 5048 | additional header and footer lines. |
| 5114 | On input PKCS#8 format private keys are also accepted. | 5049 | On input PKCS#8 format private keys are also accepted. |
| 5115 | The | 5050 | The |
| 5116 | .Ar NET | 5051 | .Ar NET |
| @@ -5124,7 +5059,7 @@ option. | |||
| 5124 | .It Fl in Ar file | 5059 | .It Fl in Ar file |
| 5125 | This specifies the input | 5060 | This specifies the input |
| 5126 | .Ar file | 5061 | .Ar file |
| 5127 | to read a key from or standard input if this | 5062 | to read a key from, or standard input if this |
| 5128 | option is not specified. | 5063 | option is not specified. |
| 5129 | If the key is encrypted, a pass phrase will be prompted for. | 5064 | If the key is encrypted, a pass phrase will be prompted for. |
| 5130 | .It Fl passin Ar arg | 5065 | .It Fl passin Ar arg |
| @@ -5166,9 +5101,7 @@ This means that using the | |||
| 5166 | utility to read in an encrypted key with no encryption option can be used | 5101 | utility to read in an encrypted key with no encryption option can be used |
| 5167 | to remove the pass phrase from a key, or by setting the encryption options | 5102 | to remove the pass phrase from a key, or by setting the encryption options |
| 5168 | it can be used to add or change the pass phrase. | 5103 | it can be used to add or change the pass phrase. |
| 5169 | These options can only be used with | 5104 | These options can only be used with PEM format output files. |
| 5170 | .Ar PEM | ||
| 5171 | format output files. | ||
| 5172 | .It Fl text | 5105 | .It Fl text |
| 5173 | Prints out the various public or private key components in | 5106 | Prints out the various public or private key components in |
| 5174 | plain text, in addition to the encoded version. | 5107 | plain text, in addition to the encoded version. |
| @@ -5195,17 +5128,13 @@ thus initialising it if needed. | |||
| 5195 | The engine will then be set as the default for all available algorithms. | 5128 | The engine will then be set as the default for all available algorithms. |
| 5196 | .El | 5129 | .El |
| 5197 | .Sh RSA NOTES | 5130 | .Sh RSA NOTES |
| 5198 | The | 5131 | The PEM private key format uses the header and footer lines: |
| 5199 | .Em PEM | ||
| 5200 | private key format uses the header and footer lines: | ||
| 5201 | .Bd -unfilled -offset indent | 5132 | .Bd -unfilled -offset indent |
| 5202 | -----BEGIN RSA PRIVATE KEY----- | 5133 | -----BEGIN RSA PRIVATE KEY----- |
| 5203 | -----END RSA PRIVATE KEY----- | 5134 | -----END RSA PRIVATE KEY----- |
| 5204 | .Ed | 5135 | .Ed |
| 5205 | .Pp | 5136 | .Pp |
| 5206 | The | 5137 | The PEM public key format uses the header and footer lines: |
| 5207 | .Em PEM | ||
| 5208 | public key format uses the header and footer lines: | ||
| 5209 | .Bd -unfilled -offset indent | 5138 | .Bd -unfilled -offset indent |
| 5210 | -----BEGIN PUBLIC KEY----- | 5139 | -----BEGIN PUBLIC KEY----- |
| 5211 | -----END PUBLIC KEY----- | 5140 | -----END PUBLIC KEY----- |
| @@ -5243,11 +5172,7 @@ To encrypt a private key using triple DES: | |||
| 5243 | .Pp | 5172 | .Pp |
| 5244 | .Dl $ openssl rsa -in key.pem -des3 -out keyout.pem | 5173 | .Dl $ openssl rsa -in key.pem -des3 -out keyout.pem |
| 5245 | .Pp | 5174 | .Pp |
| 5246 | To convert a private key from | 5175 | To convert a private key from PEM to DER format: |
| 5247 | .Em PEM | ||
| 5248 | to | ||
| 5249 | .Em DER | ||
| 5250 | format: | ||
| 5251 | .Pp | 5176 | .Pp |
| 5252 | .Dl $ openssl rsa -in key.pem -outform DER -out keyout.der | 5177 | .Dl $ openssl rsa -in key.pem -outform DER -out keyout.der |
| 5253 | .Pp | 5178 | .Pp |
| @@ -5297,12 +5222,12 @@ The options are as follows: | |||
| 5297 | .It Fl in Ar file | 5222 | .It Fl in Ar file |
| 5298 | This specifies the input | 5223 | This specifies the input |
| 5299 | .Ar file | 5224 | .Ar file |
| 5300 | to read data from or standard input | 5225 | to read data from, or standard input |
| 5301 | if this option is not specified. | 5226 | if this option is not specified. |
| 5302 | .It Fl out Ar file | 5227 | .It Fl out Ar file |
| 5303 | Specifies the output | 5228 | Specifies the output |
| 5304 | .Ar file | 5229 | .Ar file |
| 5305 | to write to or standard output by | 5230 | to write to, or standard output by |
| 5306 | default. | 5231 | default. |
| 5307 | .It Fl inkey Ar file | 5232 | .It Fl inkey Ar file |
| 5308 | The input key file, by default it should be an RSA private key. | 5233 | The input key file, by default it should be an RSA private key. |
| @@ -6033,13 +5958,13 @@ The options are as follows: | |||
| 6033 | This specifies the input format. | 5958 | This specifies the input format. |
| 6034 | The | 5959 | The |
| 6035 | .Ar DER | 5960 | .Ar DER |
| 6036 | argument uses an ASN1 DER encoded | 5961 | argument uses an ASN1 DER-encoded |
| 6037 | format containing session details. | 5962 | format containing session details. |
| 6038 | The precise format can vary from one version to the next. | 5963 | The precise format can vary from one version to the next. |
| 6039 | The | 5964 | The |
| 6040 | .Ar PEM | 5965 | .Ar PEM |
| 6041 | form is the default format: it consists of the DER | 5966 | form is the default format: it consists of the DER |
| 6042 | format base64 encoded with additional header and footer lines. | 5967 | format base64-encoded with additional header and footer lines. |
| 6043 | .It Fl outform Ar DER | PEM | 5968 | .It Fl outform Ar DER | PEM |
| 6044 | This specifies the output format; the options have the same meaning as the | 5969 | This specifies the output format; the options have the same meaning as the |
| 6045 | .Fl inform | 5970 | .Fl inform |
| @@ -6113,9 +6038,7 @@ The timeout in seconds. | |||
| 6113 | This is the return code when an SSL client certificate is verified. | 6038 | This is the return code when an SSL client certificate is verified. |
| 6114 | .El | 6039 | .El |
| 6115 | .Sh SESS_ID NOTES | 6040 | .Sh SESS_ID NOTES |
| 6116 | The | 6041 | The PEM-encoded session format uses the header and footer lines: |
| 6117 | .Em PEM | ||
| 6118 | encoded session format uses the header and footer lines: | ||
| 6119 | .Bd -unfilled -offset indent | 6042 | .Bd -unfilled -offset indent |
| 6120 | -----BEGIN SSL SESSION PARAMETERS----- | 6043 | -----BEGIN SSL SESSION PARAMETERS----- |
| 6121 | -----END SSL SESSION PARAMETERS----- | 6044 | -----END SSL SESSION PARAMETERS----- |
| @@ -6216,9 +6139,7 @@ Verify signed mail. | |||
| 6216 | Expects a signed mail message on input and outputs the signed data. | 6139 | Expects a signed mail message on input and outputs the signed data. |
| 6217 | Both clear text and opaque signing is supported. | 6140 | Both clear text and opaque signing is supported. |
| 6218 | .It Fl pk7out | 6141 | .It Fl pk7out |
| 6219 | Takes an input message and writes out a | 6142 | Takes an input message and writes out a PEM-encoded PKCS#7 structure. |
| 6220 | .Em PEM | ||
| 6221 | encoded PKCS#7 structure. | ||
| 6222 | .It Fl in Ar file | 6143 | .It Fl in Ar file |
| 6223 | The input message to be encrypted or signed or the | 6144 | The input message to be encrypted or signed or the |
| 6224 | .Em MIME | 6145 | .Em MIME |
| @@ -6231,9 +6152,9 @@ The default is | |||
| 6231 | which reads an | 6152 | which reads an |
| 6232 | .Em S/MIME | 6153 | .Em S/MIME |
| 6233 | format message. | 6154 | format message. |
| 6234 | .Em PEM | 6155 | .Ar PEM |
| 6235 | and | 6156 | and |
| 6236 | .Em DER | 6157 | .Ar DER |
| 6237 | format change this to expect PEM and DER format PKCS#7 structures | 6158 | format change this to expect PEM and DER format PKCS#7 structures |
| 6238 | instead. | 6159 | instead. |
| 6239 | This currently only affects the input format of the PKCS#7 | 6160 | This currently only affects the input format of the PKCS#7 |
| @@ -6253,9 +6174,9 @@ The default is | |||
| 6253 | which writes an | 6174 | which writes an |
| 6254 | .Em S/MIME | 6175 | .Em S/MIME |
| 6255 | format message. | 6176 | format message. |
| 6256 | .Em PEM | 6177 | .Ar PEM |
| 6257 | and | 6178 | and |
| 6258 | .Em DER | 6179 | .Ar DER |
| 6259 | format change this to write PEM and DER format PKCS#7 structures | 6180 | format change this to write PEM and DER format PKCS#7 structures |
| 6260 | instead. | 6181 | instead. |
| 6261 | This currently only affects the output format of the PKCS#7 | 6182 | This currently only affects the output format of the PKCS#7 |
| @@ -6361,9 +6282,7 @@ type multipart/signed is used. | |||
| 6361 | Allows additional certificates to be specified. | 6282 | Allows additional certificates to be specified. |
| 6362 | When signing these will be included with the message. | 6283 | When signing these will be included with the message. |
| 6363 | When verifying these will be searched for the signers' certificates. | 6284 | When verifying these will be searched for the signers' certificates. |
| 6364 | The certificates should be in | 6285 | The certificates should be in PEM format. |
| 6365 | .Em PEM | ||
| 6366 | format. | ||
| 6367 | .It Fl signer Ar file | 6286 | .It Fl signer Ar file |
| 6368 | The signer's certificate when signing a message. | 6287 | The signer's certificate when signing a message. |
| 6369 | If a message is being verified, then the signer's certificates will be | 6288 | If a message is being verified, then the signer's certificates will be |
| @@ -6555,7 +6474,7 @@ $ openssl smime -decrypt -in mail.msg -recip mycert.pem \e | |||
| 6555 | The output from Netscape form signing is a PKCS#7 structure with the | 6474 | The output from Netscape form signing is a PKCS#7 structure with the |
| 6556 | detached signature format. | 6475 | detached signature format. |
| 6557 | You can use this program to verify the signature by line wrapping the | 6476 | You can use this program to verify the signature by line wrapping the |
| 6558 | base64 encoded structure and surrounding it with: | 6477 | base64-encoded structure and surrounding it with: |
| 6559 | .Bd -unfilled -offset indent | 6478 | .Bd -unfilled -offset indent |
| 6560 | -----BEGIN PKCS7----- | 6479 | -----BEGIN PKCS7----- |
| 6561 | -----END PKCS7----- | 6480 | -----END PKCS7----- |
| @@ -6703,14 +6622,14 @@ The options are as follows: | |||
| 6703 | .It Fl in Ar file | 6622 | .It Fl in Ar file |
| 6704 | This specifies the input | 6623 | This specifies the input |
| 6705 | .Ar file | 6624 | .Ar file |
| 6706 | to read from or standard input if this option is not specified. | 6625 | to read from, or standard input if this option is not specified. |
| 6707 | Ignored if the | 6626 | Ignored if the |
| 6708 | .Fl key | 6627 | .Fl key |
| 6709 | option is used. | 6628 | option is used. |
| 6710 | .It Fl out Ar file | 6629 | .It Fl out Ar file |
| 6711 | Specifies the output | 6630 | Specifies the output |
| 6712 | .Ar file | 6631 | .Ar file |
| 6713 | to write to or standard output by default. | 6632 | to write to, or standard output by default. |
| 6714 | .It Fl key Ar keyfile | 6633 | .It Fl key Ar keyfile |
| 6715 | Create an SPKAC file using the private key in | 6634 | Create an SPKAC file using the private key in |
| 6716 | .Ar keyfile . | 6635 | .Ar keyfile . |
| @@ -6843,9 +6762,7 @@ A | |||
| 6843 | of trusted certificates. | 6762 | of trusted certificates. |
| 6844 | The | 6763 | The |
| 6845 | .Ar file | 6764 | .Ar file |
| 6846 | should contain multiple certificates in | 6765 | should contain multiple certificates in PEM format, concatenated together. |
| 6847 | .Em PEM | ||
| 6848 | format concatenated together. | ||
| 6849 | .It Fl untrusted Ar file | 6766 | .It Fl untrusted Ar file |
| 6850 | A | 6767 | A |
| 6851 | .Ar file | 6768 | .Ar file |
| @@ -6896,9 +6813,7 @@ One or more | |||
| 6896 | to verify. | 6813 | to verify. |
| 6897 | If no certificate files are included, then an attempt is made to read | 6814 | If no certificate files are included, then an attempt is made to read |
| 6898 | a certificate from standard input. | 6815 | a certificate from standard input. |
| 6899 | They should all be in | 6816 | They should all be in PEM format. |
| 6900 | .Em PEM | ||
| 6901 | format. | ||
| 6902 | .El | 6817 | .El |
| 6903 | .Sh VERIFY OPERATION | 6818 | .Sh VERIFY OPERATION |
| 6904 | The | 6819 | The |
| @@ -7279,11 +7194,11 @@ option. | |||
| 7279 | .It Fl in Ar file | 7194 | .It Fl in Ar file |
| 7280 | This specifies the input | 7195 | This specifies the input |
| 7281 | .Ar file | 7196 | .Ar file |
| 7282 | to read a certificate from or standard input if this option is not specified. | 7197 | to read a certificate from, or standard input if this option is not specified. |
| 7283 | .It Fl out Ar file | 7198 | .It Fl out Ar file |
| 7284 | This specifies the output | 7199 | This specifies the output |
| 7285 | .Ar file | 7200 | .Ar file |
| 7286 | to write to or standard output by default. | 7201 | to write to, or standard output by default. |
| 7287 | .It Fl passin Ar arg | 7202 | .It Fl passin Ar arg |
| 7288 | The key password source. | 7203 | The key password source. |
| 7289 | For more information about the format of | 7204 | For more information about the format of |
| @@ -7385,7 +7300,7 @@ date. | |||
| 7385 | .It Fl dates | 7300 | .It Fl dates |
| 7386 | Prints out the start and expiry dates of a certificate. | 7301 | Prints out the start and expiry dates of a certificate. |
| 7387 | .It Fl fingerprint | 7302 | .It Fl fingerprint |
| 7388 | Prints out the digest of the DER encoded version of the whole certificate | 7303 | Prints out the digest of the DER-encoded version of the whole certificate |
| 7389 | (see | 7304 | (see |
| 7390 | .Sx DIGEST OPTIONS ) . | 7305 | .Sx DIGEST OPTIONS ) . |
| 7391 | .It Fl C | 7306 | .It Fl C |
| @@ -7859,11 +7774,7 @@ Display the certificate SHA1 fingerprint: | |||
| 7859 | .Pp | 7774 | .Pp |
| 7860 | .Dl $ openssl x509 -sha1 -in cert.pem -noout -fingerprint | 7775 | .Dl $ openssl x509 -sha1 -in cert.pem -noout -fingerprint |
| 7861 | .Pp | 7776 | .Pp |
| 7862 | Convert a certificate from | 7777 | Convert a certificate from PEM to DER format: |
| 7863 | .Em PEM | ||
| 7864 | to | ||
| 7865 | .Em DER | ||
| 7866 | format: | ||
| 7867 | .Pp | 7778 | .Pp |
| 7868 | .Dl "$ openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER" | 7779 | .Dl "$ openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER" |
| 7869 | .Pp | 7780 | .Pp |
| @@ -7895,9 +7806,7 @@ $ openssl x509 -in cert.pem -addtrust clientAuth \e | |||
| 7895 | -setalias "Steve's Class 1 CA" -out trust.pem | 7806 | -setalias "Steve's Class 1 CA" -out trust.pem |
| 7896 | .Ed | 7807 | .Ed |
| 7897 | .Sh X509 NOTES | 7808 | .Sh X509 NOTES |
| 7898 | The | 7809 | The PEM format uses the header and footer lines: |
| 7899 | .Em PEM | ||
| 7900 | format uses the header and footer lines: | ||
| 7901 | .Bd -unfilled -offset indent | 7810 | .Bd -unfilled -offset indent |
| 7902 | -----BEGIN CERTIFICATE----- | 7811 | -----BEGIN CERTIFICATE----- |
| 7903 | -----END CERTIFICATE----- | 7812 | -----END CERTIFICATE----- |
| @@ -7923,7 +7832,7 @@ it is more likely to display the majority of certificates correctly. | |||
| 7923 | .Pp | 7832 | .Pp |
| 7924 | The | 7833 | The |
| 7925 | .Fl fingerprint | 7834 | .Fl fingerprint |
| 7926 | option takes the digest of the DER encoded certificate. | 7835 | option takes the digest of the DER-encoded certificate. |
| 7927 | This is commonly called a | 7836 | This is commonly called a |
| 7928 | .Qq fingerprint . | 7837 | .Qq fingerprint . |
| 7929 | Because of the nature of message digests, the fingerprint of a certificate | 7838 | Because of the nature of message digests, the fingerprint of a certificate |
