diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/openssl.1 | 123 |
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 |
| 2940 | Print the parameters in plain text, in addition to the encoded version. | 2940 | Print 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 |
| 2972 | The | 2967 | The |
| @@ -2992,59 +2987,37 @@ Encrypt the input data using a public key. | |||
| 2992 | .It Fl hexdump | 2987 | .It Fl hexdump |
| 2993 | Hex dump the output data. | 2988 | Hex dump the output data. |
| 2994 | .It Fl in Ar file | 2989 | .It Fl in Ar file |
| 2995 | Specify the input filename to read data from, | 2990 | The input file to read from, |
| 2996 | or standard input if this option is not specified. | 2991 | or standard input if not specified. |
| 2997 | .It Fl inkey Ar file | 2992 | .It Fl inkey Ar file |
| 2998 | The input key file. | 2993 | The input key file. |
| 2999 | By default it should be a private key. | 2994 | By default it should be a private key. |
| 3000 | .It Fl keyform Ar DER | PEM | 2995 | .It Fl keyform Cm der | pem |
| 3001 | The key format DER or PEM. | 2996 | The key format. |
| 3002 | .It Fl out Ar file | 2997 | .It Fl out Ar file |
| 3003 | Specify the output filename to write to, | 2998 | The output file to write to, |
| 3004 | or standard output by default. | 2999 | or standard output if not specified. |
| 3005 | .It Fl passin Ar arg | 3000 | .It Fl passin Ar arg |
| 3006 | The key password source. | 3001 | The key password source. |
| 3007 | .It Fl peerform Ar DER | PEM | 3002 | .It Fl peerform Cm der | pem |
| 3008 | The peer key format DER or PEM. | 3003 | The peer key format. |
| 3009 | .It Fl peerkey Ar file | 3004 | .It Fl peerkey Ar file |
| 3010 | The peer key file, used by key derivation (agreement) operations. | 3005 | The 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 |
| 3012 | Public key options. | 3007 | Set the public key algorithm option |
| 3013 | .It Fl pubin | 3008 | .Ar opt |
| 3014 | The input file is a public key. | 3009 | to |
| 3015 | .It Fl rev | 3010 | .Ar value . |
| 3016 | Reverse the order of the input buffer. | 3011 | Unless otherwise mentioned, all algorithms support the format |
| 3017 | This is useful for some libraries (such as CryptoAPI) | 3012 | .Ar digest : Ns Ar alg , |
| 3018 | which represent the buffer in little endian format. | 3013 | which specifies the digest to use |
| 3019 | .It Fl sigfile Ar file | ||
| 3020 | Signature file (verify operation only). | ||
| 3021 | .It Fl sign | ||
| 3022 | Sign the input data and output the signed result. | ||
| 3023 | This requires a private key. | ||
| 3024 | .It Fl verify | ||
| 3025 | Verify the input data against the signature file and indicate if the | ||
| 3026 | verification succeeded or failed. | ||
| 3027 | .It Fl verifyrecover | ||
| 3028 | Verify the input data and output the recovered data. | ||
| 3029 | .El | ||
| 3030 | .Sh PKEYUTL NOTES | ||
| 3031 | The operations and options supported vary according to the key algorithm | ||
| 3032 | and its implementation. | ||
| 3033 | The | ||
| 3034 | .Nm OpenSSL | ||
| 3035 | operations and options are indicated below. | ||
| 3036 | .Pp | ||
| 3037 | Unless otherwise mentioned all algorithms support the | ||
| 3038 | .Ar digest : Ns Ar alg | ||
| 3039 | option which specifies the digest in use | ||
| 3040 | for sign, verify, and verifyrecover operations. | 3014 | for sign, verify, and verifyrecover operations. |
| 3041 | The value | 3015 | The value |
| 3042 | .Ar alg | 3016 | .Ar alg |
| 3043 | should represent a digest name as used in the | 3017 | should represent a digest name as used in the |
| 3044 | .Fn EVP_get_digestbyname | 3018 | .Xr EVP_get_digestbyname 3 |
| 3045 | function, for example | 3019 | function. |
| 3046 | .Cm sha1 . | 3020 | .Pp |
| 3047 | .Ss RSA algorithm | ||
| 3048 | The RSA algorithm supports the | 3021 | The RSA algorithm supports the |
| 3049 | encrypt, decrypt, sign, verify, and verifyrecover operations in general. | 3022 | encrypt, decrypt, sign, verify, and verifyrecover operations in general. |
| 3050 | Some padding modes only support some of these | 3023 | Some padding modes only support some of these |
| @@ -3072,13 +3045,10 @@ signed or verified directly instead of using a DigestInfo structure. | |||
| 3072 | If a digest is set then a DigestInfo | 3045 | If a digest is set then a DigestInfo |
| 3073 | structure is used and its length | 3046 | structure is used and its length |
| 3074 | must correspond to the digest type. | 3047 | must correspond to the digest type. |
| 3075 | .Pp | ||
| 3076 | For oeap mode only encryption and decryption is supported. | 3048 | For oeap mode only encryption and decryption is supported. |
| 3077 | .Pp | ||
| 3078 | For x931 if the digest type is set it is used to format the block data; | 3049 | For x931 if the digest type is set it is used to format the block data; |
| 3079 | otherwise the first byte is used to specify the X9.31 digest ID. | 3050 | otherwise the first byte is used to specify the X9.31 digest ID. |
| 3080 | Sign, verify, and verifyrecover can be performed in this mode. | 3051 | Sign, verify, and verifyrecover can be performed in this mode. |
| 3081 | .Pp | ||
| 3082 | For pss mode only sign and verify are supported and the digest type must be | 3052 | For pss mode only sign and verify are supported and the digest type must be |
| 3083 | specified. | 3053 | specified. |
| 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. | |||
| 3090 | When verifying -2 causes the salt length to be automatically determined | 3060 | When verifying -2 causes the salt length to be automatically determined |
| 3091 | based on the PSS block structure. | 3061 | based on the PSS block structure. |
| 3092 | .El | 3062 | .El |
| 3093 | .Ss DSA algorithm | 3063 | .Pp |
| 3094 | The DSA algorithm supports the sign and verify operations. | 3064 | The DSA algorithm supports the sign and verify operations. |
| 3095 | Currently there are no additional options other than | 3065 | Currently there are no additional options other than |
| 3096 | .Ar digest . | 3066 | .Ar digest . |
| 3097 | Only the SHA1 digest can be used and this digest is assumed by default. | 3067 | Only the SHA1 digest can be used and this digest is assumed by default. |
| 3098 | .Ss DH algorithm | 3068 | .Pp |
| 3099 | The DH algorithm supports the derive operation | 3069 | The DH algorithm supports the derive operation |
| 3100 | and no additional options. | 3070 | and no additional options. |
| 3101 | .Ss EC algorithm | 3071 | .Pp |
| 3102 | The EC algorithm supports the sign, verify, and derive operations. | 3072 | The EC algorithm supports the sign, verify, and derive operations. |
| 3103 | The sign and verify operations use ECDSA and derive uses ECDH. | 3073 | The sign and verify operations use ECDSA and derive uses ECDH. |
| 3104 | Currently there are no additional options other than | 3074 | Currently there are no additional options other than |
| 3105 | .Ar digest . | 3075 | .Ar digest . |
| 3106 | Only the SHA1 digest can be used and this digest is assumed by default. | 3076 | Only the SHA1 digest can be used and this digest is assumed by default. |
| 3107 | .Sh PKEYUTL EXAMPLES | 3077 | .It Fl pubin |
| 3108 | Sign some data using a private key: | 3078 | The 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 | 3080 | Reverse the order of the input buffer. |
| 3111 | .Ed | 3081 | .It Fl sigfile Ar file |
| 3112 | .Pp | 3082 | Signature file (verify operation only). |
| 3113 | Recover the signed data (e.g. if an RSA key is used): | 3083 | .It Fl sign |
| 3114 | .Bd -literal -offset indent | 3084 | Sign the input data and output the signed result. |
| 3115 | $ openssl pkeyutl -verifyrecover -in sig -inkey key.pem | 3085 | This requires a private key. |
| 3116 | .Ed | 3086 | .It Fl verify |
| 3117 | .Pp | 3087 | Verify the input data against the signature file and indicate if the |
| 3118 | Verify the signature (e.g. a DSA key): | 3088 | verification succeeded or failed. |
| 3119 | .Bd -literal -offset indent | 3089 | .It Fl verifyrecover |
| 3120 | $ openssl pkeyutl -verify -in file -sigfile sig \e | 3090 | Verify the input data and output the recovered data. |
| 3121 | -inkey key.pem | 3091 | .El |
| 3122 | .Ed | ||
| 3123 | .Pp | ||
| 3124 | Sign 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 | ||
| 3130 | Derive 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 | .\" |
