diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/openssl.1 | 322 |
1 files changed, 44 insertions, 278 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index 7a416e74f2..f804dcef83 100644 --- a/src/usr.bin/openssl/openssl.1 +++ b/src/usr.bin/openssl/openssl.1 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: openssl.1,v 1.63 2016/08/27 20:43:05 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.64 2016/08/28 19:34:15 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 | .\" |
| @@ -112,7 +112,7 @@ | |||
| 112 | .\" | 112 | .\" |
| 113 | .\" OPENSSL | 113 | .\" OPENSSL |
| 114 | .\" | 114 | .\" |
| 115 | .Dd $Mdocdate: August 27 2016 $ | 115 | .Dd $Mdocdate: August 28 2016 $ |
| 116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
| 117 | .Os | 117 | .Os |
| 118 | .Sh NAME | 118 | .Sh NAME |
| @@ -971,11 +971,6 @@ Cipher suites using SHA1. | |||
| 971 | The | 971 | The |
| 972 | .Nm crl | 972 | .Nm crl |
| 973 | command processes CRL files in DER or PEM format. | 973 | command processes CRL files in DER or PEM format. |
| 974 | The PEM CRL format uses the header and footer lines: | ||
| 975 | .Bd -unfilled -offset indent | ||
| 976 | -----BEGIN X509 CRL----- | ||
| 977 | -----END X509 CRL----- | ||
| 978 | .Ed | ||
| 979 | .Pp | 974 | .Pp |
| 980 | The options are as follows: | 975 | The options are as follows: |
| 981 | .Bl -tag -width Ds | 976 | .Bl -tag -width Ds |
| @@ -1015,7 +1010,7 @@ The output file to write to, or standard output if not specified. | |||
| 1015 | .It Fl outform Cm der | pem | 1010 | .It Fl outform Cm der | pem |
| 1016 | The output format. | 1011 | The output format. |
| 1017 | .It Fl text | 1012 | .It Fl text |
| 1018 | Print the CRL in text form. | 1013 | Print the CRL in plain text. |
| 1019 | .El | 1014 | .El |
| 1020 | .Sh CRL2PKCS7 | 1015 | .Sh CRL2PKCS7 |
| 1021 | .nr nS 1 | 1016 | .nr nS 1 |
| @@ -1048,7 +1043,7 @@ Read the CRL from | |||
| 1048 | .Ar file , | 1043 | .Ar file , |
| 1049 | or standard input if not specified. | 1044 | or standard input if not specified. |
| 1050 | .It Fl inform Cm der | pem | 1045 | .It Fl inform Cm der | pem |
| 1051 | Specify the CRL input format. | 1046 | The input format. |
| 1052 | .It Fl nocrl | 1047 | .It Fl nocrl |
| 1053 | Normally, a CRL is included in the output file. | 1048 | Normally, a CRL is included in the output file. |
| 1054 | With this option, no CRL is | 1049 | With this option, no CRL is |
| @@ -1058,7 +1053,7 @@ Write the PKCS#7 structure to | |||
| 1058 | .Ar file , | 1053 | .Ar file , |
| 1059 | or standard output if not specified. | 1054 | or standard output if not specified. |
| 1060 | .It Fl outform Cm der | pem | 1055 | .It Fl outform Cm der | pem |
| 1061 | Specify the PKCS#7 structure output format. | 1056 | The output format. |
| 1062 | .El | 1057 | .El |
| 1063 | .Sh DGST | 1058 | .Sh DGST |
| 1064 | .nr nS 1 | 1059 | .nr nS 1 |
| @@ -1227,17 +1222,6 @@ The input file to read from, | |||
| 1227 | or standard input if not specified. | 1222 | or standard input if not specified. |
| 1228 | .It Fl inform Cm der | pem | 1223 | .It Fl inform Cm der | pem |
| 1229 | The input format. | 1224 | The input format. |
| 1230 | .Cm der | ||
| 1231 | uses an ASN1 DER-encoded form compatible with the PKCS#3 DHparameter | ||
| 1232 | structure. | ||
| 1233 | .Cm pem | ||
| 1234 | is the default: | ||
| 1235 | it consists of the DER format base64-encoded with | ||
| 1236 | additional header and footer lines: | ||
| 1237 | .Bd -unfilled -offset indent | ||
| 1238 | -----BEGIN DH PARAMETERS----- | ||
| 1239 | -----END DH PARAMETERS----- | ||
| 1240 | .Ed | ||
| 1241 | .It Fl noout | 1225 | .It Fl noout |
| 1242 | Do not output the encoded version of the parameters. | 1226 | Do not output the encoded version of the parameters. |
| 1243 | .It Fl out Ar file | 1227 | .It Fl out Ar file |
| @@ -1246,7 +1230,7 @@ or standard output if not specified. | |||
| 1246 | .It Fl outform Cm der | pem | 1230 | .It Fl outform Cm der | pem |
| 1247 | The output format. | 1231 | The output format. |
| 1248 | .It Fl text | 1232 | .It Fl text |
| 1249 | Print the DH parameters in human readable form. | 1233 | Print the DH parameters in plain text. |
| 1250 | .It Ar numbits | 1234 | .It Ar numbits |
| 1251 | Generate a parameter set of size | 1235 | Generate a parameter set of size |
| 1252 | .Ar numbits . | 1236 | .Ar numbits . |
| @@ -1288,18 +1272,6 @@ newer applications should use the more secure PKCS#8 format using the | |||
| 1288 | .Nm pkcs8 | 1272 | .Nm pkcs8 |
| 1289 | command. | 1273 | command. |
| 1290 | .Pp | 1274 | .Pp |
| 1291 | The PEM private key format uses the header and footer lines: | ||
| 1292 | .Bd -unfilled -offset indent | ||
| 1293 | -----BEGIN DSA PRIVATE KEY----- | ||
| 1294 | -----END DSA PRIVATE KEY----- | ||
| 1295 | .Ed | ||
| 1296 | .Pp | ||
| 1297 | The PEM public key format uses the header and footer lines: | ||
| 1298 | .Bd -unfilled -offset indent | ||
| 1299 | -----BEGIN PUBLIC KEY----- | ||
| 1300 | -----END PUBLIC KEY----- | ||
| 1301 | .Ed | ||
| 1302 | .Pp | ||
| 1303 | The options are as follows: | 1275 | The options are as follows: |
| 1304 | .Bl -tag -width Ds | 1276 | .Bl -tag -width Ds |
| 1305 | .It Xo | 1277 | .It Xo |
| @@ -1323,21 +1295,6 @@ or standard input if not specified. | |||
| 1323 | If the key is encrypted, a pass phrase will be prompted for. | 1295 | If the key is encrypted, a pass phrase will be prompted for. |
| 1324 | .It Fl inform Cm der | pem | 1296 | .It Fl inform Cm der | pem |
| 1325 | The input format. | 1297 | The input format. |
| 1326 | .Cm der | ||
| 1327 | with a private key uses an ASN1 DER-encoded form of an ASN.1 | ||
| 1328 | SEQUENCE consisting of the values of version | ||
| 1329 | .Pq currently zero , | ||
| 1330 | P, Q, G, | ||
| 1331 | and the public and private key components, respectively, as ASN.1 INTEGERs. | ||
| 1332 | When used with a public key it uses a | ||
| 1333 | .Em SubjectPublicKeyInfo | ||
| 1334 | structure: it is an error if the key is not DSA. | ||
| 1335 | .Pp | ||
| 1336 | .Cm pem | ||
| 1337 | is the default format: | ||
| 1338 | it consists of the DER format base64-encoded with additional header and footer | ||
| 1339 | lines. | ||
| 1340 | In the case of a private key, PKCS#8 format is also accepted. | ||
| 1341 | .It Fl modulus | 1298 | .It Fl modulus |
| 1342 | Print the value of the public key component of the key. | 1299 | Print the value of the public key component of the key. |
| 1343 | .It Fl noout | 1300 | .It Fl noout |
| @@ -1359,7 +1316,7 @@ Read in a public key, not a private key. | |||
| 1359 | Output a public key, not a private key. | 1316 | Output a public key, not a private key. |
| 1360 | Automatically set if the input is a public key. | 1317 | Automatically set if the input is a public key. |
| 1361 | .It Fl text | 1318 | .It Fl text |
| 1362 | Print the public/private key components and parameters. | 1319 | Print the public/private key in plain text. |
| 1363 | .El | 1320 | .El |
| 1364 | .Sh DSAPARAM | 1321 | .Sh DSAPARAM |
| 1365 | .nr nS 1 | 1322 | .nr nS 1 |
| @@ -1379,12 +1336,6 @@ The | |||
| 1379 | .Nm dsaparam | 1336 | .Nm dsaparam |
| 1380 | command is used to manipulate or generate DSA parameter files. | 1337 | command is used to manipulate or generate DSA parameter files. |
| 1381 | .Pp | 1338 | .Pp |
| 1382 | PEM format DSA parameters use the header and footer lines: | ||
| 1383 | .Bd -unfilled -offset indent | ||
| 1384 | -----BEGIN DSA PARAMETERS----- | ||
| 1385 | -----END DSA PARAMETERS----- | ||
| 1386 | .Ed | ||
| 1387 | .Pp | ||
| 1388 | The options are as follows: | 1339 | The options are as follows: |
| 1389 | .Bl -tag -width Ds | 1340 | .Bl -tag -width Ds |
| 1390 | .It Fl C | 1341 | .It Fl C |
| @@ -1403,14 +1354,6 @@ If the | |||
| 1403 | parameter is included, then this option is ignored. | 1354 | parameter is included, then this option is ignored. |
| 1404 | .It Fl inform Cm der | pem | 1355 | .It Fl inform Cm der | pem |
| 1405 | The input format. | 1356 | The input format. |
| 1406 | .Cm der | ||
| 1407 | uses an ASN1 DER-encoded form compatible with RFC 2459 | ||
| 1408 | .Pq PKIX | ||
| 1409 | DSS-Parms that is a SEQUENCE consisting of p, q and g, respectively. | ||
| 1410 | .Cm pem | ||
| 1411 | is the default format: | ||
| 1412 | it consists of the DER format base64-encoded with additional header | ||
| 1413 | and footer lines. | ||
| 1414 | .It Fl noout | 1357 | .It Fl noout |
| 1415 | Do not output the encoded version of the parameters. | 1358 | Do not output the encoded version of the parameters. |
| 1416 | .It Fl out Ar file | 1359 | .It Fl out Ar file |
| @@ -1419,7 +1362,7 @@ or standard output if not specified. | |||
| 1419 | .It Fl outform Cm der | pem | 1362 | .It Fl outform Cm der | pem |
| 1420 | The output format. | 1363 | The output format. |
| 1421 | .It Fl text | 1364 | .It Fl text |
| 1422 | Print the DSA parameters in human readable form. | 1365 | Print the DSA parameters in plain text. |
| 1423 | .It Ar numbits | 1366 | .It Ar numbits |
| 1424 | Generate a parameter set of size | 1367 | Generate a parameter set of size |
| 1425 | .Ar numbits . | 1368 | .Ar numbits . |
| @@ -1459,18 +1402,6 @@ EC private key into the PKCS#8 private key format use the | |||
| 1459 | .Nm pkcs8 | 1402 | .Nm pkcs8 |
| 1460 | command. | 1403 | command. |
| 1461 | .Pp | 1404 | .Pp |
| 1462 | The PEM private key format uses the header and footer lines: | ||
| 1463 | .Bd -literal -offset indent | ||
| 1464 | -----BEGIN EC PRIVATE KEY----- | ||
| 1465 | -----END EC PRIVATE KEY----- | ||
| 1466 | .Ed | ||
| 1467 | .Pp | ||
| 1468 | The PEM public key format uses the header and footer lines: | ||
| 1469 | .Bd -literal -offset indent | ||
| 1470 | -----BEGIN PUBLIC KEY----- | ||
| 1471 | -----END PUBLIC KEY----- | ||
| 1472 | .Ed | ||
| 1473 | .Pp | ||
| 1474 | The options are as follows: | 1405 | The options are as follows: |
| 1475 | .Bl -tag -width Ds | 1406 | .Bl -tag -width Ds |
| 1476 | .It Fl conv_form Ar arg | 1407 | .It Fl conv_form Ar arg |
| @@ -1510,17 +1441,6 @@ or standard input if not specified. | |||
| 1510 | If the key is encrypted a pass phrase will be prompted for. | 1441 | If the key is encrypted a pass phrase will be prompted for. |
| 1511 | .It Fl inform Cm der | pem | 1442 | .It Fl inform Cm der | pem |
| 1512 | The input format. | 1443 | The input format. |
| 1513 | .Cm der | ||
| 1514 | with a private key uses | ||
| 1515 | an ASN.1 DER-encoded SEC1 private key. | ||
| 1516 | When used with a public key it | ||
| 1517 | uses the SubjectPublicKeyInfo structure as specified in RFC 3280. | ||
| 1518 | .Cm pem | ||
| 1519 | is the default format: | ||
| 1520 | it consists of the DER format base64-encoded | ||
| 1521 | with additional header and footer lines. | ||
| 1522 | In the case of a private key | ||
| 1523 | PKCS#8 format is also accepted. | ||
| 1524 | .It Fl noout | 1444 | .It Fl noout |
| 1525 | Do not output the encoded version of the key. | 1445 | Do not output the encoded version of the key. |
| 1526 | .It Fl out Ar file | 1446 | .It Fl out Ar file |
| @@ -1554,7 +1474,7 @@ Read in a public key, not a private key. | |||
| 1554 | Output a public key, not a private key. | 1474 | Output a public key, not a private key. |
| 1555 | Automatically set if the input is a public key. | 1475 | Automatically set if the input is a public key. |
| 1556 | .It Fl text | 1476 | .It Fl text |
| 1557 | Print the public/private key components and parameters. | 1477 | Print the public/private key in plain text. |
| 1558 | .El | 1478 | .El |
| 1559 | .Sh ECPARAM | 1479 | .Sh ECPARAM |
| 1560 | .nr nS 1 | 1480 | .nr nS 1 |
| @@ -1583,12 +1503,6 @@ is not able to generate new groups so | |||
| 1583 | .Nm ecparam | 1503 | .Nm ecparam |
| 1584 | can only create EC parameters from known (named) curves. | 1504 | can only create EC parameters from known (named) curves. |
| 1585 | .Pp | 1505 | .Pp |
| 1586 | PEM format EC parameters use the header and footer lines: | ||
| 1587 | .Bd -literal -offset indent | ||
| 1588 | -----BEGIN EC PARAMETERS----- | ||
| 1589 | -----END EC PARAMETERS----- | ||
| 1590 | .Ed | ||
| 1591 | .Pp | ||
| 1592 | The options are as follows: | 1506 | The options are as follows: |
| 1593 | .Bl -tag -width Ds | 1507 | .Bl -tag -width Ds |
| 1594 | .It Fl C | 1508 | .It Fl C |
| @@ -1623,13 +1537,6 @@ The input file to read from, | |||
| 1623 | or standard input if not specified. | 1537 | or standard input if not specified. |
| 1624 | .It Fl inform Cm der | pem | 1538 | .It Fl inform Cm der | pem |
| 1625 | The input format. | 1539 | The input format. |
| 1626 | .Cm der | ||
| 1627 | uses an ASN.1 DER-encoded | ||
| 1628 | form compatible with RFC 3279 EcpkParameters. | ||
| 1629 | .Cm pem | ||
| 1630 | is the default format: | ||
| 1631 | it consists of the DER format base64-encoded with additional | ||
| 1632 | header and footer lines. | ||
| 1633 | .It Fl list_curves | 1540 | .It Fl list_curves |
| 1634 | Print a list of all | 1541 | Print a list of all |
| 1635 | currently implemented EC parameter names and exit. | 1542 | currently implemented EC parameter names and exit. |
| @@ -1660,7 +1567,7 @@ Note: the | |||
| 1660 | alternative, as specified in RFC 3279, | 1567 | alternative, as specified in RFC 3279, |
| 1661 | is currently not implemented. | 1568 | is currently not implemented. |
| 1662 | .It Fl text | 1569 | .It Fl text |
| 1663 | Print the EC parameters in human readable form. | 1570 | Print the EC parameters in plain text. |
| 1664 | .El | 1571 | .El |
| 1665 | .Sh ENC | 1572 | .Sh ENC |
| 1666 | .nr nS 1 | 1573 | .nr nS 1 |
| @@ -1986,8 +1893,7 @@ The value to use for the generator | |||
| 1986 | The EC curve to use. | 1893 | The EC curve to use. |
| 1987 | .El | 1894 | .El |
| 1988 | .It Fl text | 1895 | .It Fl text |
| 1989 | Print an unencrypted text representation of private and public keys and | 1896 | Print the private/public key in plain text. |
| 1990 | parameters along with the DER or PEM structure. | ||
| 1991 | .El | 1897 | .El |
| 1992 | .Sh GENRSA | 1898 | .Sh GENRSA |
| 1993 | .nr nS 1 | 1899 | .nr nS 1 |
| @@ -2495,18 +2401,6 @@ command processes PKCS#7 files in DER or PEM format. | |||
| 2495 | The PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC 2315. | 2401 | The PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC 2315. |
| 2496 | They cannot currently parse, for example, the new CMS as described in RFC 2630. | 2402 | They cannot currently parse, for example, the new CMS as described in RFC 2630. |
| 2497 | .Pp | 2403 | .Pp |
| 2498 | The PEM PKCS#7 format uses the header and footer lines: | ||
| 2499 | .Bd -unfilled -offset indent | ||
| 2500 | -----BEGIN PKCS7----- | ||
| 2501 | -----END PKCS7----- | ||
| 2502 | .Ed | ||
| 2503 | .Pp | ||
| 2504 | For compatibility with some CAs it will also accept: | ||
| 2505 | .Bd -unfilled -offset indent | ||
| 2506 | -----BEGIN CERTIFICATE----- | ||
| 2507 | -----END CERTIFICATE----- | ||
| 2508 | .Ed | ||
| 2509 | .Pp | ||
| 2510 | The options are as follows: | 2404 | The options are as follows: |
| 2511 | .Bl -tag -width Ds | 2405 | .Bl -tag -width Ds |
| 2512 | .It Fl in Ar file | 2406 | .It Fl in Ar file |
| @@ -2514,11 +2408,6 @@ The input file to read from, | |||
| 2514 | or standard input if not specified. | 2408 | or standard input if not specified. |
| 2515 | .It Fl inform Cm der | pem | 2409 | .It Fl inform Cm der | pem |
| 2516 | The input format. | 2410 | The input format. |
| 2517 | .Cm der | ||
| 2518 | format is a DER-encoded PKCS#7 v1.5 structure. | ||
| 2519 | .Cm pem | ||
| 2520 | (the default) | ||
| 2521 | is a base64-encoded version of the DER form with header and footer lines. | ||
| 2522 | .It Fl noout | 2411 | .It Fl noout |
| 2523 | Don't output the encoded version of the PKCS#7 structure | 2412 | Don't output the encoded version of the PKCS#7 structure |
| 2524 | (or certificates if | 2413 | (or certificates if |
| @@ -2592,10 +2481,6 @@ or standard input if not specified. | |||
| 2592 | If the key is encrypted, a pass phrase will be prompted for. | 2481 | If the key is encrypted, a pass phrase will be prompted for. |
| 2593 | .It Fl inform Cm der | pem | 2482 | .It Fl inform Cm der | pem |
| 2594 | The input format. | 2483 | The input format. |
| 2595 | If a PKCS#8 format key is expected on input, | ||
| 2596 | then either a | ||
| 2597 | DER- or PEM-encoded version of a PKCS#8 key will be expected. | ||
| 2598 | Otherwise the DER or PEM format of the traditional format private key is used. | ||
| 2599 | .It Fl nocrypt | 2484 | .It Fl nocrypt |
| 2600 | Generate an unencrypted PrivateKeyInfo structure. | 2485 | Generate an unencrypted PrivateKeyInfo structure. |
| 2601 | This option does not encrypt private keys at all | 2486 | This option does not encrypt private keys at all |
| @@ -2908,8 +2793,7 @@ Read in a public key, not a private key. | |||
| 2908 | Output a public key, not a private key. | 2793 | Output a public key, not a private key. |
| 2909 | Automatically set if the input is a public key. | 2794 | Automatically set if the input is a public key. |
| 2910 | .It Fl text | 2795 | .It Fl text |
| 2911 | Print out the various public or private key components in plain text | 2796 | Print the public/private key in plain text. |
| 2912 | in addition to the encoded version. | ||
| 2913 | .It Fl text_pub | 2797 | .It Fl text_pub |
| 2914 | Print out only public key components | 2798 | Print out only public key components |
| 2915 | even if a private key is being processed. | 2799 | even if a private key is being processed. |
| @@ -2937,7 +2821,7 @@ Do not output the encoded version of the parameters. | |||
| 2937 | The output file to write to, | 2821 | The output file to write to, |
| 2938 | or standard output if not specified. | 2822 | or standard output if not specified. |
| 2939 | .It Fl text | 2823 | .It Fl text |
| 2940 | Print the parameters in plain text, in addition to the encoded version. | 2824 | Print the parameters in plain text. |
| 2941 | .El | 2825 | .El |
| 2942 | .Sh PKEYUTL | 2826 | .Sh PKEYUTL |
| 2943 | .nr nS 1 | 2827 | .nr nS 1 |
| @@ -3237,12 +3121,6 @@ and | |||
| 3237 | are not specified. | 3121 | are not specified. |
| 3238 | .It Fl inform Cm der | pem | 3122 | .It Fl inform Cm der | pem |
| 3239 | The input format. | 3123 | The input format. |
| 3240 | .Cm der | ||
| 3241 | uses an ASN1 DER-encoded form compatible with the PKCS#10. | ||
| 3242 | .Cm pem | ||
| 3243 | is the default format: | ||
| 3244 | it consists of the DER format base64-encoded with additional header and | ||
| 3245 | footer lines. | ||
| 3246 | .It Fl key Ar keyfile | 3124 | .It Fl key Ar keyfile |
| 3247 | The file to read the private key from. | 3125 | The file to read the private key from. |
| 3248 | It also accepts PKCS#8 format private keys for PEM format files. | 3126 | It also accepts PKCS#8 format private keys for PEM format files. |
| @@ -3365,7 +3243,7 @@ Print the request subject (or certificate subject if | |||
| 3365 | .Fl x509 | 3243 | .Fl x509 |
| 3366 | is specified). | 3244 | is specified). |
| 3367 | .It Fl text | 3245 | .It Fl text |
| 3368 | Print the certificate request in text form. | 3246 | Print the certificate request in plain text. |
| 3369 | .It Fl utf8 | 3247 | .It Fl utf8 |
| 3370 | Interpret field values as UTF8 strings, not ASCII. | 3248 | Interpret field values as UTF8 strings, not ASCII. |
| 3371 | .It Fl verbose | 3249 | .It Fl verbose |
| @@ -3592,18 +3470,6 @@ options in the configuration file. | |||
| 3592 | Any additional fields will be treated as though they were a | 3470 | Any additional fields will be treated as though they were a |
| 3593 | .Cm DirectoryString . | 3471 | .Cm DirectoryString . |
| 3594 | .Pp | 3472 | .Pp |
| 3595 | The header and footer lines in the PEM format are normally: | ||
| 3596 | .Bd -unfilled -offset indent | ||
| 3597 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 3598 | -----END CERTIFICATE REQUEST----- | ||
| 3599 | .Ed | ||
| 3600 | .Pp | ||
| 3601 | Some software instead needs: | ||
| 3602 | .Bd -unfilled -offset indent | ||
| 3603 | -----BEGIN NEW CERTIFICATE REQUEST----- | ||
| 3604 | -----END NEW CERTIFICATE REQUEST----- | ||
| 3605 | .Ed | ||
| 3606 | .Pp | ||
| 3607 | The following messages are frequently asked about: | 3473 | The following messages are frequently asked about: |
| 3608 | .Bd -unfilled -offset indent | 3474 | .Bd -unfilled -offset indent |
| 3609 | Using configuration from /some/path/openssl.cnf | 3475 | Using configuration from /some/path/openssl.cnf |
| @@ -3633,24 +3499,17 @@ then the SET OF is missing and the encoding is technically invalid | |||
| 3633 | See the description | 3499 | See the description |
| 3634 | .Fl asn1-kludge | 3500 | .Fl asn1-kludge |
| 3635 | for more information. | 3501 | for more information. |
| 3636 | .\" | ||
| 3637 | .\" RSA | ||
| 3638 | .\" | ||
| 3639 | .Sh RSA | 3502 | .Sh RSA |
| 3640 | .nr nS 1 | 3503 | .nr nS 1 |
| 3641 | .Nm "openssl rsa" | 3504 | .Nm "openssl rsa" |
| 3642 | .Bk -words | 3505 | .Op Fl aes128 | aes192 | aes256 | des | des3 |
| 3643 | .Oo | ||
| 3644 | .Fl aes128 | aes192 | aes256 | | ||
| 3645 | .Fl des | des3 | ||
| 3646 | .Oc | ||
| 3647 | .Op Fl check | 3506 | .Op Fl check |
| 3648 | .Op Fl in Ar file | 3507 | .Op Fl in Ar file |
| 3649 | .Op Fl inform Ar DER | NET | PEM | 3508 | .Op Fl inform Cm der | net | pem |
| 3650 | .Op Fl modulus | 3509 | .Op Fl modulus |
| 3651 | .Op Fl noout | 3510 | .Op Fl noout |
| 3652 | .Op Fl out Ar file | 3511 | .Op Fl out Ar file |
| 3653 | .Op Fl outform Ar DER | NET | PEM | 3512 | .Op Fl outform Cm der | net | pem |
| 3654 | .Op Fl passin Ar arg | 3513 | .Op Fl passin Ar arg |
| 3655 | .Op Fl passout Ar arg | 3514 | .Op Fl passout Ar arg |
| 3656 | .Op Fl pubin | 3515 | .Op Fl pubin |
| @@ -3658,15 +3517,13 @@ for more information. | |||
| 3658 | .Op Fl sgckey | 3517 | .Op Fl sgckey |
| 3659 | .Op Fl text | 3518 | .Op Fl text |
| 3660 | .nr nS 0 | 3519 | .nr nS 0 |
| 3661 | .Ek | ||
| 3662 | .Pp | 3520 | .Pp |
| 3663 | The | 3521 | The |
| 3664 | .Nm rsa | 3522 | .Nm rsa |
| 3665 | command processes RSA keys. | 3523 | command processes RSA keys. |
| 3666 | They can be converted between various forms and their components printed out. | 3524 | They can be converted between various forms and their components printed out. |
| 3667 | .Pp | 3525 | .Nm rsa |
| 3668 | .Sy Note : | 3526 | uses the traditional |
| 3669 | this command uses the traditional | ||
| 3670 | .Nm SSLeay | 3527 | .Nm SSLeay |
| 3671 | compatible format for private key encryption: | 3528 | compatible format for private key encryption: |
| 3672 | newer applications should use the more secure PKCS#8 format using the | 3529 | newer applications should use the more secure PKCS#8 format using the |
| @@ -3675,11 +3532,8 @@ utility. | |||
| 3675 | .Pp | 3532 | .Pp |
| 3676 | The options are as follows: | 3533 | The options are as follows: |
| 3677 | .Bl -tag -width Ds | 3534 | .Bl -tag -width Ds |
| 3678 | .It Xo | 3535 | .It Fl aes128 | aes192 | aes256 | des | des3 |
| 3679 | .Fl aes128 | aes192 | aes256 | | 3536 | Encrypt the private key with the AES, DES, |
| 3680 | .Fl des | des3 | ||
| 3681 | .Xc | ||
| 3682 | These options encrypt the private key with the AES, DES, | ||
| 3683 | or the triple DES ciphers, respectively, before outputting it. | 3537 | or the triple DES ciphers, respectively, before outputting it. |
| 3684 | A pass phrase is prompted for. | 3538 | A pass phrase is prompted for. |
| 3685 | If none of these options are specified, the key is written in plain text. | 3539 | If none of these options are specified, the key is written in plain text. |
| @@ -3690,128 +3544,39 @@ to remove the pass phrase from a key, or by setting the encryption options | |||
| 3690 | it can be used to add or change the pass phrase. | 3544 | it can be used to add or change the pass phrase. |
| 3691 | These options can only be used with PEM format output files. | 3545 | These options can only be used with PEM format output files. |
| 3692 | .It Fl check | 3546 | .It Fl check |
| 3693 | This option checks the consistency of an RSA private key. | 3547 | Check the consistency of an RSA private key. |
| 3694 | .It Fl in Ar file | 3548 | .It Fl in Ar file |
| 3695 | This specifies the input | 3549 | The input file to read from, |
| 3696 | .Ar file | 3550 | or standard input if not specified. |
| 3697 | to read a key from, or standard input if this | ||
| 3698 | option is not specified. | ||
| 3699 | If the key is encrypted, a pass phrase will be prompted for. | 3551 | If the key is encrypted, a pass phrase will be prompted for. |
| 3700 | .It Fl inform Ar DER | NET | PEM | 3552 | .It Fl inform Cm der | net | pem |
| 3701 | This specifies the input format. | 3553 | The input format. |
| 3702 | The | ||
| 3703 | .Ar DER | ||
| 3704 | argument | ||
| 3705 | uses an ASN1 DER-encoded form compatible with the PKCS#1 | ||
| 3706 | RSAPrivateKey or SubjectPublicKeyInfo format. | ||
| 3707 | The | ||
| 3708 | .Ar PEM | ||
| 3709 | form is the default format: it consists of the DER format base64-encoded with | ||
| 3710 | additional header and footer lines. | ||
| 3711 | On input PKCS#8 format private keys are also accepted. | ||
| 3712 | The | ||
| 3713 | .Ar NET | ||
| 3714 | form is a format described in the | ||
| 3715 | .Sx RSA NOTES | ||
| 3716 | section. | ||
| 3717 | .It Fl noout | 3554 | .It Fl noout |
| 3718 | This option prevents output of the encoded version of the key. | 3555 | Do not output the encoded version of the key. |
| 3719 | .It Fl modulus | 3556 | .It Fl modulus |
| 3720 | This option prints out the value of the modulus of the key. | 3557 | Print the value of the modulus of the key. |
| 3721 | .It Fl out Ar file | 3558 | .It Fl out Ar file |
| 3722 | This specifies the output | 3559 | The output file to write to, |
| 3723 | .Ar file | 3560 | or standard output if not specified. |
| 3724 | to write a key to, or standard output if this option is not specified. | 3561 | .It Fl outform Cm der | net | pem |
| 3725 | If any encryption options are set, a pass phrase will be prompted for. | 3562 | The output format. |
| 3726 | The output filename should | ||
| 3727 | .Em not | ||
| 3728 | be the same as the input filename. | ||
| 3729 | .It Fl outform Ar DER | NET | PEM | ||
| 3730 | This specifies the output format; the options have the same meaning as the | ||
| 3731 | .Fl inform | ||
| 3732 | option. | ||
| 3733 | .It Fl passin Ar arg | 3563 | .It Fl passin Ar arg |
| 3734 | The key password source. | 3564 | The key password source. |
| 3735 | .It Fl passout Ar arg | 3565 | .It Fl passout Ar arg |
| 3736 | The output file password source. | 3566 | The output file password source. |
| 3737 | .It Fl pubin | 3567 | .It Fl pubin |
| 3738 | By default, a private key is read from the input file; with this | 3568 | Read in a public key, |
| 3739 | option a public key is read instead. | 3569 | not a private key. |
| 3740 | .It Fl pubout | 3570 | .It Fl pubout |
| 3741 | By default, a private key is output; | 3571 | Output a public key, |
| 3742 | with this option a public key will be output instead. | 3572 | not a private key. |
| 3743 | This option is automatically set if the input is a public key. | 3573 | Automatically set if the input is a public key. |
| 3744 | .It Fl sgckey | 3574 | .It Fl sgckey |
| 3745 | Use the modified | 3575 | Use the modified NET algorithm used with some versions of Microsoft IIS |
| 3746 | .Em NET | 3576 | and SGC keys. |
| 3747 | algorithm used with some versions of Microsoft IIS and SGC keys. | ||
| 3748 | .It Fl text | 3577 | .It Fl text |
| 3749 | Prints out the various public or private key components in | 3578 | Print the public/private key components in plain text. |
| 3750 | plain text, in addition to the encoded version. | ||
| 3751 | .El | 3579 | .El |
| 3752 | .Sh RSA NOTES | ||
| 3753 | The PEM private key format uses the header and footer lines: | ||
| 3754 | .Bd -unfilled -offset indent | ||
| 3755 | -----BEGIN RSA PRIVATE KEY----- | ||
| 3756 | -----END RSA PRIVATE KEY----- | ||
| 3757 | .Ed | ||
| 3758 | .Pp | ||
| 3759 | The PEM public key format uses the header and footer lines: | ||
| 3760 | .Bd -unfilled -offset indent | ||
| 3761 | -----BEGIN PUBLIC KEY----- | ||
| 3762 | -----END PUBLIC KEY----- | ||
| 3763 | .Ed | ||
| 3764 | .Pp | ||
| 3765 | The | ||
| 3766 | .Em NET | ||
| 3767 | form is a format compatible with older Netscape servers | ||
| 3768 | and Microsoft IIS .key files; this uses unsalted RC4 for its encryption. | ||
| 3769 | It is not very secure and so should only be used when necessary. | ||
| 3770 | .Pp | ||
| 3771 | Some newer version of IIS have additional data in the exported .key files. | ||
| 3772 | To use these with the | ||
| 3773 | .Nm rsa | ||
| 3774 | utility, view the file with a binary editor | ||
| 3775 | and look for the string | ||
| 3776 | .Qq private-key , | ||
| 3777 | then trace back to the byte sequence 0x30, 0x82 | ||
| 3778 | .Pq this is an ASN1 SEQUENCE . | ||
| 3779 | Copy all the data from this point onwards to another file and use that as | ||
| 3780 | the input to the | ||
| 3781 | .Nm rsa | ||
| 3782 | utility with the | ||
| 3783 | .Fl inform Ar NET | ||
| 3784 | option. | ||
| 3785 | If there is an error after entering the password, try the | ||
| 3786 | .Fl sgckey | ||
| 3787 | option. | ||
| 3788 | .Sh RSA EXAMPLES | ||
| 3789 | To remove the pass phrase on an RSA private key: | ||
| 3790 | .Pp | ||
| 3791 | .Dl $ openssl rsa -in key.pem -out keyout.pem | ||
| 3792 | .Pp | ||
| 3793 | To encrypt a private key using triple DES: | ||
| 3794 | .Pp | ||
| 3795 | .Dl $ openssl rsa -in key.pem -des3 -out keyout.pem | ||
| 3796 | .Pp | ||
| 3797 | To convert a private key from PEM to DER format: | ||
| 3798 | .Pp | ||
| 3799 | .Dl $ openssl rsa -in key.pem -outform DER -out keyout.der | ||
| 3800 | .Pp | ||
| 3801 | To print out the components of a private key to standard output: | ||
| 3802 | .Pp | ||
| 3803 | .Dl $ openssl rsa -in key.pem -text -noout | ||
| 3804 | .Pp | ||
| 3805 | To just output the public part of a private key: | ||
| 3806 | .Pp | ||
| 3807 | .Dl $ openssl rsa -in key.pem -pubout -out pubkey.pem | ||
| 3808 | .Sh RSA BUGS | ||
| 3809 | The command line password arguments don't currently work with | ||
| 3810 | .Em NET | ||
| 3811 | format. | ||
| 3812 | .Pp | ||
| 3813 | There should be an option that automatically handles .key files, | ||
| 3814 | without having to manually edit them. | ||
| 3815 | .\" | 3580 | .\" |
| 3816 | .\" RSAUTL | 3581 | .\" RSAUTL |
| 3817 | .\" | 3582 | .\" |
| @@ -7649,19 +7414,20 @@ This can be used to send the data via a pipe, for example. | |||
| 7649 | Read the password from standard input. | 7414 | Read the password from standard input. |
| 7650 | .El | 7415 | .El |
| 7651 | .Pp | 7416 | .Pp |
| 7652 | File formats, | 7417 | Input/output formats, |
| 7653 | typically specified using | 7418 | typically specified using |
| 7654 | .Fl inform | 7419 | .Fl inform |
| 7655 | and | 7420 | and |
| 7656 | .Fl outform , | 7421 | .Fl outform , |
| 7657 | indicate the type of file being read from | 7422 | indicate the format being read from or written to. |
| 7658 | or the file format to write. | ||
| 7659 | The argument is case insensitive. | 7423 | The argument is case insensitive. |
| 7660 | .Pp | 7424 | .Pp |
| 7661 | .Bl -tag -width Ds -offset indent -compact | 7425 | .Bl -tag -width Ds -offset indent -compact |
| 7662 | .It Cm der | 7426 | .It Cm der |
| 7663 | Distinguished Encoding Rules (DER) | 7427 | Distinguished Encoding Rules (DER) |
| 7664 | is a binary format. | 7428 | is a binary format. |
| 7429 | .It Cm net | ||
| 7430 | Insecure legacy format. | ||
| 7665 | .It Cm pem | 7431 | .It Cm pem |
| 7666 | Privacy Enhanced Mail (PEM) | 7432 | Privacy Enhanced Mail (PEM) |
| 7667 | is base64-encoded. | 7433 | is base64-encoded. |
