summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2016-08-25 14:37:28 +0000
committerjmc <>2016-08-25 14:37:28 +0000
commit7d913550e2b3d855803499686353249b7b60f893 (patch)
treed4586b226afb84299f238ac10909a8e887ee5221
parent804e1745894e0a49080141121506198a0bfa17d7 (diff)
downloadopenbsd-7d913550e2b3d855803499686353249b7b60f893.tar.gz
openbsd-7d913550e2b3d855803499686353249b7b60f893.tar.bz2
openbsd-7d913550e2b3d855803499686353249b7b60f893.zip
shorten the pkeyutl text;
help/ok guenther
-rw-r--r--src/usr.bin/openssl/openssl.1123
1 files changed, 40 insertions, 83 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1
index 5f5f73131d..9fabe16cd9 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.61 2016/08/24 08:17:24 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.62 2016/08/25 14:37:28 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 24 2016 $ 115.Dd $Mdocdate: August 25 2016 $
116.Dt OPENSSL 1 116.Dt OPENSSL 1
117.Os 117.Os
118.Sh NAME 118.Sh NAME
@@ -2939,13 +2939,9 @@ or standard output if not specified.
2939.It Fl text 2939.It Fl text
2940Print the parameters in plain text, in addition to the encoded version. 2940Print the parameters in plain text, in addition to the encoded version.
2941.El 2941.El
2942.\"
2943.\" PKEYUTL
2944.\"
2945.Sh PKEYUTL 2942.Sh PKEYUTL
2946.nr nS 1 2943.nr nS 1
2947.Nm "openssl pkeyutl" 2944.Nm "openssl pkeyutl"
2948.Bk -words
2949.Op Fl asn1parse 2945.Op Fl asn1parse
2950.Op Fl certin 2946.Op Fl certin
2951.Op Fl decrypt 2947.Op Fl decrypt
@@ -2954,10 +2950,10 @@ Print the parameters in plain text, in addition to the encoded version.
2954.Op Fl hexdump 2950.Op Fl hexdump
2955.Op Fl in Ar file 2951.Op Fl in Ar file
2956.Op Fl inkey Ar file 2952.Op Fl inkey Ar file
2957.Op Fl keyform Ar DER | PEM 2953.Op Fl keyform Cm der | pem
2958.Op Fl out Ar file 2954.Op Fl out Ar file
2959.Op Fl passin Ar arg 2955.Op Fl passin Ar arg
2960.Op Fl peerform Ar DER | PEM 2956.Op Fl peerform Cm der | pem
2961.Op Fl peerkey Ar file 2957.Op Fl peerkey Ar file
2962.Op Fl pkeyopt Ar opt : Ns Ar value 2958.Op Fl pkeyopt Ar opt : Ns Ar value
2963.Op Fl pubin 2959.Op Fl pubin
@@ -2966,7 +2962,6 @@ Print the parameters in plain text, in addition to the encoded version.
2966.Op Fl sign 2962.Op Fl sign
2967.Op Fl verify 2963.Op Fl verify
2968.Op Fl verifyrecover 2964.Op Fl verifyrecover
2969.Ek
2970.nr nS 0 2965.nr nS 0
2971.Pp 2966.Pp
2972The 2967The
@@ -2992,59 +2987,37 @@ Encrypt the input data using a public key.
2992.It Fl hexdump 2987.It Fl hexdump
2993Hex dump the output data. 2988Hex dump the output data.
2994.It Fl in Ar file 2989.It Fl in Ar file
2995Specify the input filename to read data from, 2990The input file to read from,
2996or standard input if this option is not specified. 2991or standard input if not specified.
2997.It Fl inkey Ar file 2992.It Fl inkey Ar file
2998The input key file. 2993The input key file.
2999By default it should be a private key. 2994By default it should be a private key.
3000.It Fl keyform Ar DER | PEM 2995.It Fl keyform Cm der | pem
3001The key format DER or PEM. 2996The key format.
3002.It Fl out Ar file 2997.It Fl out Ar file
3003Specify the output filename to write to, 2998The output file to write to,
3004or standard output by default. 2999or standard output if not specified.
3005.It Fl passin Ar arg 3000.It Fl passin Ar arg
3006The key password source. 3001The key password source.
3007.It Fl peerform Ar DER | PEM 3002.It Fl peerform Cm der | pem
3008The peer key format DER or PEM. 3003The peer key format.
3009.It Fl peerkey Ar file 3004.It Fl peerkey Ar file
3010The peer key file, used by key derivation (agreement) operations. 3005The peer key file, used by key derivation (agreement) operations.
3011.It Fl pkeyopt Ar opt : Ns Ar value 3006.It Fl pkeyopt Ar opt : Ns Ar value
3012Public key options. 3007Set the public key algorithm option
3013.It Fl pubin 3008.Ar opt
3014The input file is a public key. 3009to
3015.It Fl rev 3010.Ar value .
3016Reverse the order of the input buffer. 3011Unless otherwise mentioned, all algorithms support the format
3017This is useful for some libraries (such as CryptoAPI) 3012.Ar digest : Ns Ar alg ,
3018which represent the buffer in little endian format. 3013which specifies the digest to use
3019.It Fl sigfile Ar file
3020Signature file (verify operation only).
3021.It Fl sign
3022Sign the input data and output the signed result.
3023This requires a private key.
3024.It Fl verify
3025Verify the input data against the signature file and indicate if the
3026verification succeeded or failed.
3027.It Fl verifyrecover
3028Verify the input data and output the recovered data.
3029.El
3030.Sh PKEYUTL NOTES
3031The operations and options supported vary according to the key algorithm
3032and its implementation.
3033The
3034.Nm OpenSSL
3035operations and options are indicated below.
3036.Pp
3037Unless otherwise mentioned all algorithms support the
3038.Ar digest : Ns Ar alg
3039option which specifies the digest in use
3040for sign, verify, and verifyrecover operations. 3014for sign, verify, and verifyrecover operations.
3041The value 3015The value
3042.Ar alg 3016.Ar alg
3043should represent a digest name as used in the 3017should represent a digest name as used in the
3044.Fn EVP_get_digestbyname 3018.Xr EVP_get_digestbyname 3
3045function, for example 3019function.
3046.Cm sha1 . 3020.Pp
3047.Ss RSA algorithm
3048The RSA algorithm supports the 3021The RSA algorithm supports the
3049encrypt, decrypt, sign, verify, and verifyrecover operations in general. 3022encrypt, decrypt, sign, verify, and verifyrecover operations in general.
3050Some padding modes only support some of these 3023Some padding modes only support some of these
@@ -3072,13 +3045,10 @@ signed or verified directly instead of using a DigestInfo structure.
3072If a digest is set then a DigestInfo 3045If a digest is set then a DigestInfo
3073structure is used and its length 3046structure is used and its length
3074must correspond to the digest type. 3047must correspond to the digest type.
3075.Pp
3076For oeap mode only encryption and decryption is supported. 3048For oeap mode only encryption and decryption is supported.
3077.Pp
3078For x931 if the digest type is set it is used to format the block data; 3049For x931 if the digest type is set it is used to format the block data;
3079otherwise the first byte is used to specify the X9.31 digest ID. 3050otherwise the first byte is used to specify the X9.31 digest ID.
3080Sign, verify, and verifyrecover can be performed in this mode. 3051Sign, verify, and verifyrecover can be performed in this mode.
3081.Pp
3082For pss mode only sign and verify are supported and the digest type must be 3052For pss mode only sign and verify are supported and the digest type must be
3083specified. 3053specified.
3084.It rsa_pss_saltlen : Ns Ar len 3054.It rsa_pss_saltlen : Ns Ar len
@@ -3090,48 +3060,35 @@ When signing -2 sets the salt length to the maximum permissible value.
3090When verifying -2 causes the salt length to be automatically determined 3060When verifying -2 causes the salt length to be automatically determined
3091based on the PSS block structure. 3061based on the PSS block structure.
3092.El 3062.El
3093.Ss DSA algorithm 3063.Pp
3094The DSA algorithm supports the sign and verify operations. 3064The DSA algorithm supports the sign and verify operations.
3095Currently there are no additional options other than 3065Currently there are no additional options other than
3096.Ar digest . 3066.Ar digest .
3097Only the SHA1 digest can be used and this digest is assumed by default. 3067Only the SHA1 digest can be used and this digest is assumed by default.
3098.Ss DH algorithm 3068.Pp
3099The DH algorithm supports the derive operation 3069The DH algorithm supports the derive operation
3100and no additional options. 3070and no additional options.
3101.Ss EC algorithm 3071.Pp
3102The EC algorithm supports the sign, verify, and derive operations. 3072The EC algorithm supports the sign, verify, and derive operations.
3103The sign and verify operations use ECDSA and derive uses ECDH. 3073The sign and verify operations use ECDSA and derive uses ECDH.
3104Currently there are no additional options other than 3074Currently there are no additional options other than
3105.Ar digest . 3075.Ar digest .
3106Only the SHA1 digest can be used and this digest is assumed by default. 3076Only the SHA1 digest can be used and this digest is assumed by default.
3107.Sh PKEYUTL EXAMPLES 3077.It Fl pubin
3108Sign some data using a private key: 3078The input file is a public key.
3109.Bd -literal -offset indent 3079.It Fl rev
3110$ openssl pkeyutl -sign -in file -inkey key.pem -out sig 3080Reverse the order of the input buffer.
3111.Ed 3081.It Fl sigfile Ar file
3112.Pp 3082Signature file (verify operation only).
3113Recover the signed data (e.g. if an RSA key is used): 3083.It Fl sign
3114.Bd -literal -offset indent 3084Sign the input data and output the signed result.
3115$ openssl pkeyutl -verifyrecover -in sig -inkey key.pem 3085This requires a private key.
3116.Ed 3086.It Fl verify
3117.Pp 3087Verify the input data against the signature file and indicate if the
3118Verify the signature (e.g. a DSA key): 3088verification succeeded or failed.
3119.Bd -literal -offset indent 3089.It Fl verifyrecover
3120$ openssl pkeyutl -verify -in file -sigfile sig \e 3090Verify the input data and output the recovered data.
3121 -inkey key.pem 3091.El
3122.Ed
3123.Pp
3124Sign data using a message digest value (this is currently only valid for RSA):
3125.Bd -literal -offset indent
3126$ openssl pkeyutl -sign -in file -inkey key.pem \e
3127 -out sig -pkeyopt digest:sha256
3128.Ed
3129.Pp
3130Derive a shared secret value:
3131.Bd -literal -offset indent
3132$ openssl pkeyutl -derive -inkey key.pem \e
3133 -peerkey pubkey.pem -out secret
3134.Ed
3135.\" 3092.\"
3136.\" PRIME 3093.\" PRIME
3137.\" 3094.\"