summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/usr.sbin/openssl/openssl.1221
1 files changed, 111 insertions, 110 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1
index a181d5f8bb..0b01b82d22 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.36 2004/02/18 21:06:40 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.37 2004/02/25 13:43: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.\"
@@ -5003,24 +5003,24 @@ should be input by the user.
5003.Sh RSA 5003.Sh RSA
5004.Cm openssl rsa 5004.Cm openssl rsa
5005.Bk -words 5005.Bk -words
5006.Op Fl inform Ar DER | NET | PEM
5007.Op Fl outform Ar DER | NET | PEM
5008.Op Fl in Ar file
5009.Op Fl passin Ar arg
5010.Op Fl out Ar file
5011.Op Fl passout Ar arg
5012.Op Fl sgckey
5013.Oo 5006.Oo
5014.Fl des | des3 | aes128 | 5007.Fl aes128 | aes192 | aes256 |
5015.Fl aes192 | aes256 5008.Fl des | des3
5016.Oc 5009.Oc
5017.Op Fl text
5018.Op Fl noout
5019.Op Fl modulus
5020.Op Fl check 5010.Op Fl check
5011.Op Fl modulus
5012.Op Fl noout
5021.Op Fl pubin 5013.Op Fl pubin
5022.Op Fl pubout 5014.Op Fl pubout
5015.Op Fl sgckey
5016.Op Fl text
5023.Op Fl engine Ar id 5017.Op Fl engine Ar id
5018.Op Fl in Ar file
5019.Op Fl inform Ar DER | NET | PEM
5020.Op Fl out Ar file
5021.Op Fl outform Ar DER | NET | PEM
5022.Op Fl passin Ar arg
5023.Op Fl passout Ar arg
5024.Ek 5024.Ek
5025.Pp 5025.Pp
5026The 5026The
@@ -5038,6 +5038,36 @@ utility.
5038.Pp 5038.Pp
5039The options are as follows: 5039The options are as follows:
5040.Bl -tag -width "XXXX" 5040.Bl -tag -width "XXXX"
5041.It Xo
5042.Fl aes128 | aes192 | aes256 |
5043.Fl des | des3
5044.Xc
5045These options encrypt the private key with the AES, DES,
5046or the triple DES ciphers, respectively, before outputting it.
5047A pass phrase is prompted for.
5048If none of these options is specified the key is written in plain text.
5049This means that using the
5050.Nm rsa
5051utility to read in an encrypted key with no encryption option can be used
5052to remove the pass phrase from a key, or by setting the encryption options
5053it can be used to add or change the pass phrase.
5054These options can only be used with PEM format output files.
5055.It Fl check
5056This option checks the consistency of an RSA private key.
5057.It Fl engine Ar id
5058Specifying an engine (by it's unique
5059.Ar id
5060string) will cause
5061.Nm rsa
5062to attempt to obtain a functional reference to the specified engine,
5063thus initialising it if needed.
5064The engine will then be set as the default for all available algorithms.
5065.It Fl in Ar file
5066This specifies the input
5067.Ar file
5068to read a key from, or standard input if this
5069option is not specified.
5070If the key is encrypted, a pass phrase will be prompted for.
5041.It Fl inform Ar DER | NET | PEM 5071.It Fl inform Ar DER | NET | PEM
5042This specifies the input format. 5072This specifies the input format.
5043The 5073The
@@ -5055,16 +5085,22 @@ The
5055form is a format described in the 5085form is a format described in the
5056.Sx RSA NOTES 5086.Sx RSA NOTES
5057section. 5087section.
5088.It Fl noout
5089This option prevents output of the encoded version of the key.
5090.It Fl modulus
5091This option prints out the value of the modulus of the key.
5092.It Fl out Ar file
5093This specifies the output
5094.Ar file
5095to write a key to, or standard output if this option is not specified.
5096If any encryption options are set, then a pass phrase will be prompted for.
5097The output filename should
5098.Em not
5099be the same as the input filename.
5058.It Fl outform Ar DER | NET | PEM 5100.It Fl outform Ar DER | NET | PEM
5059This specifies the output format; the options have the same meaning as the 5101This specifies the output format; the options have the same meaning as the
5060.Fl inform 5102.Fl inform
5061option. 5103option.
5062.It Fl in Ar file
5063This specifies the input
5064.Ar file
5065to read a key from, or standard input if this
5066option is not specified.
5067If the key is encrypted, a pass phrase will be prompted for.
5068.It Fl passin Ar arg 5104.It Fl passin Ar arg
5069The input file password source. 5105The input file password source.
5070For more information about the format of 5106For more information about the format of
@@ -5072,63 +5108,27 @@ For more information about the format of
5072see the 5108see the
5073.Sx PASS PHRASE ARGUMENTS 5109.Sx PASS PHRASE ARGUMENTS
5074section above. 5110section above.
5075.It Fl out Ar file 5111.It Fl passout Ar arg
5076This specifies the output
5077.Ar file
5078to write a key to, or standard output if this option is not specified.
5079If any encryption options are set then, a pass phrase will be prompted for.
5080The output filename should
5081.Em not
5082be the same as the input filename.
5083.It Fl passout Ar password
5084The output file password source. 5112The output file password source.
5085For more information about the format of 5113For more information about the format of
5086.Ar arg , 5114.Ar arg ,
5087see the 5115see the
5088.Sx PASS PHRASE ARGUMENTS 5116.Sx PASS PHRASE ARGUMENTS
5089section above. 5117section above.
5118.It Fl pubin
5119By default, a private key is read from the input file; with this
5120option a public key is read instead.
5121.It Fl pubout
5122By default, a private key is output;
5123with this option a public key will be output instead.
5124This option is automatically set if the input is a public key.
5090.It Fl sgckey 5125.It Fl sgckey
5091Use the modified 5126Use the modified
5092.Em NET 5127.Em NET
5093algorithm used with some versions of Microsoft IIS and SGC keys. 5128algorithm used with some versions of Microsoft IIS and SGC keys.
5094.It Xo
5095.Fl des | des3 | aes128 |
5096.Fl aes192 | aes256
5097.Xc
5098These options encrypt the private key with the DES, triple DES, or the
5099AES ciphers, respectively, before outputting it.
5100A pass phrase is prompted for.
5101If none of these options is specified the key is written in plain text.
5102This means that using the
5103.Nm rsa
5104utility to read in an encrypted key with no encryption option can be used
5105to remove the pass phrase from a key, or by setting the encryption options
5106it can be used to add or change the pass phrase.
5107These options can only be used with PEM format output files.
5108.It Fl text 5129.It Fl text
5109Prints out the various public or private key components in 5130Prints out the various public or private key components in
5110plain text, in addition to the encoded version. 5131plain text, in addition to the encoded version.
5111.It Fl noout
5112This option prevents output of the encoded version of the key.
5113.It Fl modulus
5114This option prints out the value of the modulus of the key.
5115.It Fl check
5116This option checks the consistency of an RSA private key.
5117.It Fl pubin
5118By default, a private key is read from the input file: with this
5119option a public key is read instead.
5120.It Fl pubout
5121By default, a private key is output:
5122with this option a public key will be output instead.
5123This option is automatically set if the input is a public key.
5124.It Fl engine Ar id
5125Specifying an engine (by it's unique
5126.Ar id
5127string) will cause
5128.Nm rsa
5129to attempt to obtain a functional reference to the specified engine,
5130thus initialising it if needed.
5131The engine will then be set as the default for all available algorithms.
5132.El 5132.El
5133.Sh RSA NOTES 5133.Sh RSA NOTES
5134The PEM private key format uses the header and footer lines: 5134The PEM private key format uses the header and footer lines:
@@ -5199,20 +5199,20 @@ without having to manually edit them.
5199.Sh RSAUTL 5199.Sh RSAUTL
5200.Nm openssl rsautl 5200.Nm openssl rsautl
5201.Bk -words 5201.Bk -words
5202.Op Fl in Ar file 5202.Op Fl asn1parse
5203.Op Fl out Ar file
5204.Op Fl inkey Ar file
5205.Op Fl keyform Ar DER | PEM
5206.Op Fl pubin
5207.Op Fl certin 5203.Op Fl certin
5208.Op Fl sign
5209.Op Fl verify
5210.Op Fl encrypt
5211.Op Fl decrypt 5204.Op Fl decrypt
5212.Op Fl pkcs | oaep | ssl | raw 5205.Op Fl encrypt
5213.Op Fl hexdump 5206.Op Fl hexdump
5214.Op Fl asn1parse 5207.Op Fl oaep | pkcs | raw | ssl
5208.Op Fl pubin
5209.Op Fl sign
5210.Op Fl verify
5215.Op Fl engine Ar id 5211.Op Fl engine Ar id
5212.Op Fl in Ar file
5213.Op Fl inkey Ar file
5214.Op Fl keyform Ar DER | PEM
5215.Op Fl out Ar file
5216.Ek 5216.Ek
5217.Pp 5217.Pp
5218The 5218The
@@ -5222,59 +5222,60 @@ data using the RSA algorithm.
5222.Pp 5222.Pp
5223The options are as follows: 5223The options are as follows:
5224.Bl -tag -width "XXXX" 5224.Bl -tag -width "XXXX"
5225.It Fl asn1parse
5226Asn1parse the output data; this is useful when combined with the
5227.Fl verify
5228option.
5229.It Fl certin
5230The input is a certificate containing an RSA public key.
5231.It Fl decrypt
5232Decrypt the input data using an RSA private key.
5233.It Fl encrypt
5234Encrypt the input data using an RSA public key.
5235.It Fl engine Ar id
5236Specifying an engine (by it's unique
5237.Ar id
5238string) will cause
5239.Nm rsautl
5240to attempt to obtain a functional reference to the specified engine,
5241thus initialising it if needed.
5242The engine will then be set as the default for all available algorithms.
5243.It Fl hexdump
5244Hex dump the output data.
5225.It Fl in Ar file 5245.It Fl in Ar file
5226This specifies the input 5246This specifies the input
5227.Ar file 5247.Ar file
5228to read data from, or standard input 5248to read data from, or standard input
5229if this option is not specified. 5249if this option is not specified.
5230.It Fl out Ar file
5231Specifies the output
5232.Ar file
5233to write to, or standard output by
5234default.
5235.It Fl inkey Ar file 5250.It Fl inkey Ar file
5236The input key file, by default it should be an RSA private key. 5251The input key file, by default it should be an RSA private key.
5237.It Fl keyform Ar DER | PEM 5252.It Fl keyform Ar DER | PEM
5238Private ket format. 5253Private ket format.
5239Default is 5254Default is
5240.Ar PEM . 5255.Ar PEM .
5256.It Fl oaep | pkcs | raw | ssl
5257The padding to use:
5258PKCS#1 OAEP, PKCS#1 v1.5
5259.Pq the default ,
5260no padding,
5261or special padding used in SSL v2 backwards compatible handshakes, respectively.
5262For signatures, only
5263.Fl pkcs
5264and
5265.Fl raw
5266can be used.
5267.It Fl out Ar file
5268Specifies the output
5269.Ar file
5270to write to, or standard output by
5271default.
5241.It Fl pubin 5272.It Fl pubin
5242The input file is an RSA public key. 5273The input file is an RSA public key.
5243.It Fl certin
5244The input is a certificate containing an RSA public key.
5245.It Fl sign 5274.It Fl sign
5246Sign the input data and output the signed result. 5275Sign the input data and output the signed result.
5247This requires an RSA private key. 5276This requires an RSA private key.
5248.It Fl verify 5277.It Fl verify
5249Verify the input data and output the recovered data. 5278Verify the input data and output the recovered data.
5250.It Fl encrypt
5251Encrypt the input data using an RSA public key.
5252.It Fl decrypt
5253Decrypt the input data using an RSA private key.
5254.It Fl pkcs | oaep | ssl | raw
5255The padding to use: PKCS#1 v1.5
5256.Pq the default ,
5257PKCS#1 OAEP, special padding used in SSL v2 backwards compatible handshakes,
5258or no padding, respectively.
5259For signatures, only
5260.Fl pkcs
5261and
5262.Fl raw
5263can be used.
5264.It Fl hexdump
5265Hex dump the output data.
5266.It Fl asn1parse
5267Asn1parse the output data; this is useful when combined with the
5268.Fl verify
5269option.
5270.It Fl engine Ar id
5271Specifying an engine (by it's unique
5272.Ar id
5273string) will cause
5274.Nm rsautl
5275to attempt to obtain a functional reference to the specified engine,
5276thus initialising it if needed.
5277The engine will then be set as the default for all available algorithms.
5278.El 5279.El
5279.Sh RSAUTL NOTES 5280.Sh RSAUTL NOTES
5280.Nm rsautl , 5281.Nm rsautl ,
@@ -5346,7 +5347,7 @@ It can be extracted with:
5346.Pp 5347.Pp
5347The certificate public key can be extracted with: 5348The certificate public key can be extracted with:
5348.Pp 5349.Pp
5349.Dl $ openssl x509 -in test/testx509.pem -pubout -noout >pubkey.pem 5350.Dl $ openssl x509 -in test/testx509.pem -pubkey -noout >pubkey.pem
5350.Pp 5351.Pp
5351The signature can be analysed with: 5352The signature can be analysed with:
5352.Pp 5353.Pp
@@ -5363,7 +5364,7 @@ The signature can be analysed with:
5363This is the parsed version of an ASN1 5364This is the parsed version of an ASN1
5364.Em DigestInfo 5365.Em DigestInfo
5365structure. 5366structure.
5366It can be seen that the digest used was md5. 5367It can be seen that the digest used was MD5.
5367The actual part of the certificate that was signed can be extracted with: 5368The actual part of the certificate that was signed can be extracted with:
5368.Pp 5369.Pp
5369.Dl "$ openssl asn1parse -in pca-cert.pem -out tbs -noout -strparse 4" 5370.Dl "$ openssl asn1parse -in pca-cert.pem -out tbs -noout -strparse 4"