Fix -pkeyopt handling in apps/pkeyutl -rawin
authorPetr Gotthard <petr.gotthard@centrum.cz>
Sun, 10 Jan 2021 20:26:32 +0000 (21:26 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 22 Feb 2021 11:30:49 +0000 (12:30 +0100)
commit6ceaf67257bb33544867d0faa2d0c50ec862eba2
treee7d9524d9c6e7102321ed3eed6f775b43fe8b2f7
parent7f90026b3fca9cfd3d9098d358d949d37509a2e5
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)
apps/pkeyutl.c
test/recipes/20-test_pkeyutl.t