]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc: document the rsa_oaep_md: pkeyopt
authorPauli <pauli@openssl.org>
Wed, 25 Aug 2021 00:06:11 +0000 (10:06 +1000)
committerPauli <pauli@openssl.org>
Thu, 26 Aug 2021 00:34:01 +0000 (10:34 +1000)
This was missing but essential for using non-SHA1 digests with OAEP.

Fixes #15998

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16410)

doc/man1/openssl-pkeyutl.pod.in

index 06365ef76d6d8475c65086eb5d3e2c5cf31edb7a..b0054ead66f3362e6c852606921030af0757301b 100644 (file)
@@ -262,6 +262,11 @@ B<PSS> block structure.
 For PSS and OAEP padding sets the MGF1 digest. If the MGF1 digest is not
 explicitly set in PSS mode then the signing digest is used.
 
+=item B<rsa_oaep_md:>I<digest>
+
+Sets the digest used for the OAEP hash function. If not explicitly set then
+SHA1 is used.
+
 =back
 
 =head1 RSA-PSS ALGORITHM
@@ -391,6 +396,11 @@ 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 distid:someid
 
+Decrypt some data using a private key with OAEP padding using SHA256:
+
+ openssl pkeyutl -decrypt -in file -inkey key.pem -out secret \
+    -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256
+
 =head1 SEE ALSO
 
 L<openssl(1)>,