diff options
-rw-r--r-- | src/usr.bin/openssl/openssl.1 | 104 |
1 files changed, 35 insertions, 69 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1 index ee384aa20f..cd0b057ac0 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.44 2016/08/03 06:43:21 jmc Exp $ | 1 | .\" $OpenBSD: openssl.1,v 1.45 2016/08/05 08:12:12 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 3 2016 $ | 115 | .Dd $Mdocdate: August 5 2016 $ |
116 | .Dt OPENSSL 1 | 116 | .Dt OPENSSL 1 |
117 | .Os | 117 | .Os |
118 | .Sh NAME | 118 | .Sh NAME |
@@ -1255,29 +1255,24 @@ If not present, a value of 2048 is used. | |||
1255 | If this value is present, the input file is ignored and | 1255 | If this value is present, the input file is ignored and |
1256 | parameters are generated instead. | 1256 | parameters are generated instead. |
1257 | .El | 1257 | .El |
1258 | .\" | ||
1259 | .\" DSA | ||
1260 | .\" | ||
1261 | .Sh DSA | 1258 | .Sh DSA |
1262 | .nr nS 1 | 1259 | .nr nS 1 |
1263 | .Nm "openssl dsa" | 1260 | .Nm "openssl dsa" |
1264 | .Bk -words | ||
1265 | .Oo | 1261 | .Oo |
1266 | .Fl aes128 | aes192 | aes256 | | 1262 | .Fl aes128 | aes192 | aes256 | |
1267 | .Fl des | des3 | 1263 | .Fl des | des3 |
1268 | .Oc | 1264 | .Oc |
1269 | .Op Fl in Ar file | 1265 | .Op Fl in Ar file |
1270 | .Op Fl inform Ar DER | PEM | 1266 | .Op Fl inform Cm der | pem |
1271 | .Op Fl modulus | 1267 | .Op Fl modulus |
1272 | .Op Fl noout | 1268 | .Op Fl noout |
1273 | .Op Fl out Ar file | 1269 | .Op Fl out Ar file |
1274 | .Op Fl outform Ar DER | PEM | 1270 | .Op Fl outform Cm der | pem |
1275 | .Op Fl passin Ar arg | 1271 | .Op Fl passin Ar arg |
1276 | .Op Fl passout Ar arg | 1272 | .Op Fl passout Ar arg |
1277 | .Op Fl pubin | 1273 | .Op Fl pubin |
1278 | .Op Fl pubout | 1274 | .Op Fl pubout |
1279 | .Op Fl text | 1275 | .Op Fl text |
1280 | .Ek | ||
1281 | .nr nS 0 | 1276 | .nr nS 0 |
1282 | .Pp | 1277 | .Pp |
1283 | The | 1278 | The |
@@ -1293,33 +1288,43 @@ newer applications should use the more secure PKCS#8 format using the | |||
1293 | .Nm pkcs8 | 1288 | .Nm pkcs8 |
1294 | command. | 1289 | command. |
1295 | .Pp | 1290 | .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 | ||
1296 | The options are as follows: | 1303 | The options are as follows: |
1297 | .Bl -tag -width Ds | 1304 | .Bl -tag -width Ds |
1298 | .It Xo | 1305 | .It Xo |
1299 | .Fl aes128 | aes192 | aes256 | | 1306 | .Fl aes128 | aes192 | aes256 | |
1300 | .Fl des | des3 | 1307 | .Fl des | des3 |
1301 | .Xc | 1308 | .Xc |
1302 | These options encrypt the private key with the AES, DES, or the triple DES | 1309 | Encrypt the private key with the AES, DES, or the triple DES |
1303 | ciphers, respectively, before outputting it. | 1310 | ciphers, respectively, before outputting it. |
1304 | A pass phrase is prompted for. | 1311 | A pass phrase is prompted for. |
1305 | If none of these options is specified, the key is written in plain text. | 1312 | If none of these options are specified, the key is written in plain text. |
1306 | This means that using the | 1313 | This means that using the |
1307 | .Nm dsa | 1314 | .Nm dsa |
1308 | utility to read in an encrypted key with no encryption option can be used to | 1315 | utility to read an encrypted key with no encryption option can be used to |
1309 | remove the pass phrase from a key, | 1316 | remove the pass phrase from a key, |
1310 | or by setting the encryption options it can be use to add or change | 1317 | or by setting the encryption options it can be used to add or change |
1311 | the pass phrase. | 1318 | the pass phrase. |
1312 | These options can only be used with PEM format output files. | 1319 | These options can only be used with PEM format output files. |
1313 | .It Fl in Ar file | 1320 | .It Fl in Ar file |
1314 | This specifies the input | 1321 | The input file to read from, |
1315 | .Ar file | 1322 | or standard input if not specified. |
1316 | to read a key from, or standard input if this option is not specified. | ||
1317 | If the key is encrypted, a pass phrase will be prompted for. | 1323 | If the key is encrypted, a pass phrase will be prompted for. |
1318 | .It Fl inform Ar DER | PEM | 1324 | .It Fl inform Cm der | pem |
1319 | This specifies the input format. | 1325 | The input format. |
1320 | The | 1326 | .Cm der |
1321 | .Ar DER | 1327 | with a private key uses an ASN1 DER-encoded form of an ASN.1 |
1322 | argument with a private key uses an ASN1 DER-encoded form of an ASN.1 | ||
1323 | SEQUENCE consisting of the values of version | 1328 | SEQUENCE consisting of the values of version |
1324 | .Pq currently zero , | 1329 | .Pq currently zero , |
1325 | P, Q, G, | 1330 | P, Q, G, |
@@ -1328,29 +1333,22 @@ When used with a public key it uses a | |||
1328 | .Em SubjectPublicKeyInfo | 1333 | .Em SubjectPublicKeyInfo |
1329 | structure: it is an error if the key is not DSA. | 1334 | structure: it is an error if the key is not DSA. |
1330 | .Pp | 1335 | .Pp |
1331 | The | 1336 | .Cm pem |
1332 | .Ar PEM | 1337 | is the default format: |
1333 | form is the default format: | ||
1334 | it consists of the DER format base64-encoded with additional header and footer | 1338 | it consists of the DER format base64-encoded with additional header and footer |
1335 | lines. | 1339 | lines. |
1336 | In the case of a private key, PKCS#8 format is also accepted. | 1340 | In the case of a private key, PKCS#8 format is also accepted. |
1337 | .It Fl modulus | 1341 | .It Fl modulus |
1338 | This option prints out the value of the public key component of the key. | 1342 | Print the value of the public key component of the key. |
1339 | .It Fl noout | 1343 | .It Fl noout |
1340 | This option prevents output of the encoded version of the key. | 1344 | Prevent output of the encoded version of the key. |
1341 | .It Fl out Ar file | 1345 | .It Fl out Ar file |
1342 | This specifies the output | 1346 | The output file to write to, |
1343 | .Ar file | 1347 | or standard output if not specified. |
1344 | to write a key to, or standard output if not specified. | ||
1345 | If any encryption options are set then a pass phrase will be | 1348 | If any encryption options are set then a pass phrase will be |
1346 | prompted for. | 1349 | prompted for. |
1347 | The output filename should | 1350 | .It Fl outform Cm der | pem |
1348 | .Em not | 1351 | The output format. |
1349 | be the same as the input filename. | ||
1350 | .It Fl outform Ar DER | PEM | ||
1351 | This specifies the output format; the options have the same meaning as the | ||
1352 | .Fl inform | ||
1353 | option. | ||
1354 | .It Fl passin Ar arg | 1352 | .It Fl passin Ar arg |
1355 | The key password source. | 1353 | The key password source. |
1356 | .It Fl passout Ar arg | 1354 | .It Fl passout Ar arg |
@@ -1363,40 +1361,8 @@ By default, a private key is output. | |||
1363 | With this option a public key will be output instead. | 1361 | With this option a public key will be output instead. |
1364 | This option is automatically set if the input is a public key. | 1362 | This option is automatically set if the input is a public key. |
1365 | .It Fl text | 1363 | .It Fl text |
1366 | Prints out the public/private key components and parameters. | 1364 | Print out the public/private key components and parameters. |
1367 | .El | 1365 | .El |
1368 | .Sh DSA NOTES | ||
1369 | The PEM private key format uses the header and footer lines: | ||
1370 | .Bd -unfilled -offset indent | ||
1371 | -----BEGIN DSA PRIVATE KEY----- | ||
1372 | -----END DSA PRIVATE KEY----- | ||
1373 | .Ed | ||
1374 | .Pp | ||
1375 | The PEM public key format uses the header and footer lines: | ||
1376 | .Bd -unfilled -offset indent | ||
1377 | -----BEGIN PUBLIC KEY----- | ||
1378 | -----END PUBLIC KEY----- | ||
1379 | .Ed | ||
1380 | .Sh DSA EXAMPLES | ||
1381 | To remove the pass phrase on a DSA private key: | ||
1382 | .Pp | ||
1383 | .Dl $ openssl dsa -in key.pem -out keyout.pem | ||
1384 | .Pp | ||
1385 | To encrypt a private key using triple DES: | ||
1386 | .Pp | ||
1387 | .Dl $ openssl dsa -in key.pem -des3 -out keyout.pem | ||
1388 | .Pp | ||
1389 | To convert a private key from PEM to DER format: | ||
1390 | .Pp | ||
1391 | .Dl $ openssl dsa -in key.pem -outform DER -out keyout.der | ||
1392 | .Pp | ||
1393 | To print out the components of a private key to standard output: | ||
1394 | .Pp | ||
1395 | .Dl $ openssl dsa -in key.pem -text -noout | ||
1396 | .Pp | ||
1397 | To just output the public part of a private key: | ||
1398 | .Pp | ||
1399 | .Dl $ openssl dsa -in key.pem -pubout -out pubkey.pem | ||
1400 | .\" | 1366 | .\" |
1401 | .\" DSAPARAM | 1367 | .\" DSAPARAM |
1402 | .\" | 1368 | .\" |