EVP: Adjust EVP_PKEY_size(), EVP_PKEY_bits() and EVP_PKEY_security_bits()
authorRichard Levitte <levitte@openssl.org>
Fri, 4 Dec 2020 08:34:25 +0000 (09:34 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 5 Dec 2020 10:06:05 +0000 (11:06 +0100)
commit030da84412c5e01c070a580ad237e713c2057626
treeb72cb2560df0d78bae045156c9a97ae46f96b091
parentecfbe2f0461b399b6bf99bdaa95c460ece8e693e
EVP: Adjust EVP_PKEY_size(), EVP_PKEY_bits() and EVP_PKEY_security_bits()

These functions are documented to return 0 if the size they are
supposed to return 0 if the size isn't available.  They needed a bit
of adjustment to actually do so, since the backend functions they call
might return negative numbers in that case.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13611)
crypto/evp/p_lib.c