diff options
author | Petr Gotthard <petr.gotthard@centrum.cz> | 2021-01-10 21:26:32 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-02-22 12:30:49 +0100 |
commit | 6ceaf67257bb33544867d0faa2d0c50ec862eba2 (patch) | |
tree | e7d9524d9c6e7102321ed3eed6f775b43fe8b2f7 /test | |
parent | 7f90026b3fca9cfd3d9098d358d949d37509a2e5 (diff) |
Fix -pkeyopt handling in apps/pkeyutl -rawin
The EVP_DigestSignInit and EVP_DigestVerifyInit actually have to
be initialized before EVP_PKEY_CTX_ctrl_str is invoked.
Otherwise, when the ctx not initialized, the ctrl command fails.
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13828)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/20-test_pkeyutl.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/recipes/20-test_pkeyutl.t b/test/recipes/20-test_pkeyutl.t index 8c0614bc42..618088a577 100644 --- a/test/recipes/20-test_pkeyutl.t +++ b/test/recipes/20-test_pkeyutl.t @@ -16,7 +16,7 @@ use OpenSSL::Test::Utils; setup("test_pkeyutl"); -plan tests => 11; +plan tests => 12; # For the tests below we use the cert itself as the TBS file @@ -125,6 +125,14 @@ SKIP: { srctop_file("test","testrsapub.pem"), "-rawin", "-digest", "sha256"); }; + + subtest "RSA CLI signature and verification with pkeyopt" => sub { + tsignverify("RSA", + srctop_file("test","testrsa.pem"), + srctop_file("test","testrsapub.pem"), + "-rawin", "-digest", "sha256", + "-pkeyopt", "rsa_padding_mode:pss"); + }; } SKIP: { |