Latest update
This commit is contained in:
@@ -411,7 +411,7 @@ based on client preferences. An equal-preference is specified with square
|
||||
brackets, combining multiple selectors separated by |. For example:
|
||||
|
||||
[ECDHE-ECDSA-CHACHA20-POLY1305|ECDHE-ECDSA-AES128-GCM-SHA256]
|
||||
|
||||
|
||||
Once an equal-preference group is used, future directives must be
|
||||
opcode-less.
|
||||
|
||||
|
||||
@@ -531,6 +531,74 @@ Read the password from standard input.
|
||||
|
||||
=back
|
||||
|
||||
=head1 ENVIRONMENT
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<OPENSSL_TRACE=>I<name,...>
|
||||
|
||||
Enable tracing output of OpenSSL library, by name.
|
||||
This output will only make sense if you know OpenSSL internals well.
|
||||
Also, it might not give you any output at all, depending on how
|
||||
OpenSSL was built.
|
||||
|
||||
The value is a comma separated list of names, with the following
|
||||
available:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<TRACE>
|
||||
|
||||
The tracing functionality.
|
||||
|
||||
=item B<TLS>
|
||||
|
||||
General SSL/TLS.
|
||||
|
||||
=item B<TLS_CIPHER>
|
||||
|
||||
SSL/TLS cipher.
|
||||
|
||||
=item B<ENGINE_CONF>
|
||||
|
||||
ENGINE configuration.
|
||||
|
||||
=item B<ENGINE_TABLE>
|
||||
|
||||
The function that is used by RSA, DSA (etc) code to select registered
|
||||
ENGINEs, cache defaults and functional references (etc), will generate
|
||||
debugging summaries.
|
||||
|
||||
=item B<ENGINE_REF_COUNT>
|
||||
|
||||
Reference counts in the ENGINE structure will be monitored with a line
|
||||
of generated for each change.
|
||||
|
||||
=item B<PKCS5V2>
|
||||
|
||||
PKCS#5 v2 keygen.
|
||||
|
||||
=item B<PKCS12_KEYGEN>
|
||||
|
||||
PKCS#12 key generation.
|
||||
|
||||
=item B<PKCS12_DECRYPT>
|
||||
|
||||
PKCS#12 decryption.
|
||||
|
||||
=item B<X509V3_POLICY>
|
||||
|
||||
Generates the complete policy tree at various point during X.509 v3
|
||||
policy evaluation.
|
||||
|
||||
=item B<BN_CTX>
|
||||
|
||||
BIGNUM context.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<asn1parse(1)>, L<ca(1)>, L<ciphers(1)>, L<cms(1)>, L<config(5)>,
|
||||
|
||||
@@ -10,6 +10,8 @@ pkeyutl - public key algorithm utility
|
||||
B<openssl> B<pkeyutl>
|
||||
[B<-help>]
|
||||
[B<-in file>]
|
||||
[B<-rawin>]
|
||||
[B<-digest algorithm>]
|
||||
[B<-out file>]
|
||||
[B<-sigfile file>]
|
||||
[B<-inkey file>]
|
||||
@@ -55,6 +57,23 @@ Print out a usage message.
|
||||
This specifies the input filename to read data from or standard input
|
||||
if this option is not specified.
|
||||
|
||||
=item B<-rawin>
|
||||
|
||||
This indicates that the input data is raw data, which is not hashed by any
|
||||
message digest algorithm. The user can specify a digest algorithm by using
|
||||
the B<-digest> option. This option can only be used with B<-sign> and
|
||||
B<-verify>.
|
||||
|
||||
=item B<-digest algorithm>
|
||||
|
||||
This specifies the digest algorithm which is used to hash the input data before
|
||||
signing or verifying it with the input key. This option could be omitted if the
|
||||
signature algorithm does not require one (for instance, EdDSA). If this option
|
||||
is omitted but the signature algorithm requires one, a default value will be
|
||||
used. For signature algorithms like RSA, DSA and ECDSA, SHA-256 will be the
|
||||
default digest algorithm. For SM2, it will be SM3. If this option is present,
|
||||
then the B<-rawin> option must be also specified to B<pkeyutl>.
|
||||
|
||||
=item B<-out filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
@@ -300,6 +319,22 @@ this digest is assumed by default.
|
||||
The X25519 and X448 algorithms support key derivation only. Currently there are
|
||||
no additional options.
|
||||
|
||||
=head1 SM2
|
||||
|
||||
The SM2 algorithm supports sign, verify, encrypt and decrypt operations. For
|
||||
the sign and verify operations, SM2 requires an ID string to be passed in. The
|
||||
following B<pkeyopt> value is supported:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<sm2_id:string>
|
||||
|
||||
This sets the ID string used in SM2 sign or verify operations. While verifying
|
||||
an SM2 signature, the ID string must be the same one used when signing the data.
|
||||
Otherwise the verification will fail.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Sign some data using a private key:
|
||||
@@ -338,6 +373,16 @@ Derive using the same algorithm, but read key from environment variable MYPASS:
|
||||
openssl pkeyutl -kdf scrypt -kdflen 16 -pkeyopt_passin pass:env:MYPASS \
|
||||
-pkeyopt hexsalt:aabbcc -pkeyopt N:16384 -pkeyopt r:8 -pkeyopt p:1
|
||||
|
||||
Sign some data using an L<SM2(7)> private key and a specific ID:
|
||||
|
||||
openssl pkeyutl -sign -in file -inkey sm2.key -out sig -rawin -digest sm3 \
|
||||
-pkeyopt sm2_id:someid
|
||||
|
||||
Verify some data using an L<SM2(7)> certificate and a specific ID:
|
||||
|
||||
openssl pkeyutl -verify -certin -in file -inkey sm2.cert -sigfile sig \
|
||||
-rawin -digest sm3 -pkeyopt sm2_id:someid
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<genpkey(1)>, L<pkey(1)>, L<rsautl(1)>
|
||||
|
||||
+16
-20
@@ -52,7 +52,7 @@ B<openssl> B<x509>
|
||||
[B<-CAkey filename>]
|
||||
[B<-CAcreateserial>]
|
||||
[B<-CAserial filename>]
|
||||
[B<-force_pubkey key>]
|
||||
[B<-force_pubkey filename>]
|
||||
[B<-text>]
|
||||
[B<-ext extensions>]
|
||||
[B<-certopt option>]
|
||||
@@ -140,8 +140,9 @@ for all available algorithms.
|
||||
|
||||
=item B<-preserve_dates>
|
||||
|
||||
When signing a certificate, preserve the "notBefore" and "notAfter" dates instead
|
||||
of adjusting them to current time and duration. Cannot be used with the B<-days> option.
|
||||
When signing a certificate, preserve the "notBefore" and "notAfter" dates
|
||||
instead of adjusting them to current time and duration.
|
||||
Cannot be used with the B<-days> option.
|
||||
|
||||
=back
|
||||
|
||||
@@ -354,17 +355,12 @@ can thus behave like a "mini CA".
|
||||
This option causes the input file to be self signed using the supplied
|
||||
private key.
|
||||
|
||||
If the input file is a certificate it sets the issuer name to the
|
||||
subject name (i.e. makes it self signed) changes the public key to the
|
||||
supplied value and changes the start and end dates. The start date is
|
||||
set to the current time and the end date is set to a value determined
|
||||
by the B<-days> option. Any certificate extensions are retained unless
|
||||
the B<-clrext> option is supplied; this includes, for example, any existing
|
||||
key identifier extensions.
|
||||
|
||||
If the input is a certificate request then a self signed certificate
|
||||
is created using the supplied private key using the subject name in
|
||||
the request.
|
||||
It sets the issuer name to the subject name (i.e., makes it self-issued)
|
||||
and changes the public key to the supplied value (unless overridden by
|
||||
B<-force_pubkey>). It sets the validity start date to the current time
|
||||
and the end date to a value determined by the B<-days> option.
|
||||
It retains any certificate extensions unless the B<-clrext> option is supplied;
|
||||
this includes, for example, any existing key identifier extensions.
|
||||
|
||||
=item B<-passin arg>
|
||||
|
||||
@@ -458,14 +454,14 @@ specified then the extensions should either be contained in the unnamed
|
||||
L<x509v3_config(5)> manual page for details of the
|
||||
extension section format.
|
||||
|
||||
=item B<-force_pubkey key>
|
||||
=item B<-force_pubkey filename>
|
||||
|
||||
When a certificate is created set its public key to B<key> instead of the
|
||||
key in the certificate or certificate request. This option is useful for
|
||||
creating certificates where the algorithm can't normally sign requests, for
|
||||
example DH.
|
||||
When a certificate is created set its public key to the key in B<filename>
|
||||
instead of the key contained in the input or given with the B<-signkey> option.
|
||||
This option is useful for creating self-issued certificates that are not
|
||||
self-signed, for instance when the key cannot be used for signing, such as DH.
|
||||
|
||||
The format or B<key> can be specified using the B<-keyform> option.
|
||||
The format of the key file can be specified using the B<-keyform> option.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
Reference in New Issue
Block a user