openssl/crypto/rsa
Matt Caswell dffe51091f Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verify
The function int_rsa_verify is an internal function used for verifying an
RSA signature. It takes an argument |dtype| which indicates the digest type
that was used. Dependant on that digest type the processing of the
signature data will vary. In particular if |dtype == NID_mdc2| and the
signature data is a bare OCTETSTRING then it is treated differently to the
default case where the signature data is treated as a DigestInfo (X509_SIG).

Due to a missing "else" keyword the logic actually correctly processes the
OCTETSTRING format signature first, and then attempts to continue and
process it as DigestInfo. This will invariably fail because we already know
that it is a bare OCTETSTRING.

This failure doesn't actualy make a real difference because it ends up at
the |err| label regardless and still returns a "success" result. This patch
just cleans things up to make it look a bit more sane.

RT#4076

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-08 13:50:41 +01:00
..
Makefile Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
rsa_ameth.c RT3674: Make no-cms build work. 2015-09-03 14:45:15 -04:00
rsa_asn1.c More secure storage of key material. 2015-06-23 17:09:35 -04:00
rsa_chk.c free NULL cleanup 7 2015-04-30 21:37:06 -04:00
rsa_crpt.c Properly check certificate in case of export ciphers. 2015-06-09 00:46:59 +02:00
rsa_depr.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_eay.c Move BN_CTX_start() call so the error case can always call BN_CTX_end(). 2015-10-07 18:54:13 +02:00
rsa_err.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
rsa_gen.c More secure storage of key material. 2015-06-23 17:09:35 -04:00
rsa_lib.c remove 0 assignments. 2015-09-03 16:26:34 -04:00
rsa_locl.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
rsa_none.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_null.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_oaep.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_pk1.c Add and use OPENSSL_zalloc 2015-09-02 22:05:37 -04:00
rsa_pmeth.c remove 0 assignments. 2015-09-03 16:26:34 -04:00
rsa_prn.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_pss.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_saos.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_sign.c Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verify 2015-10-08 13:50:41 +01:00
rsa_ssl.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_x931.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
rsa_x931g.c free NULL cleanup 7 2015-04-30 21:37:06 -04:00