openssl/crypto
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
..
aes Skylake performance results. 2015-09-26 19:50:11 +02:00
asn1 Don't check pointer we just freed, always set it to NULL. 2015-10-07 18:54:13 +02:00
bf RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
bio Harmonize pointer printing and size_t-fy casts. 2015-10-05 09:26:19 +02:00
bn Set flags to 0 before calling BN_with_flags() 2015-10-07 18:54:12 +02:00
buffer BUF_strndup: tidy 2015-09-22 19:51:18 +02:00
camellia RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
cast RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
cmac Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
cms Add GOST12 cms/smime capabilities 2015-09-30 11:39:24 +01:00
comp remove 0 assignments. 2015-09-03 16:26:34 -04:00
conf Fix no-stdio build 2015-09-29 21:59:19 -04:00
des Fix no-stdio build 2015-09-29 21:59:19 -04:00
dh Make update / libeay.num fix 2015-09-30 11:15:14 -04:00
dsa Move BN_CTX_start() call so the error case can always call BN_CTX_end(). 2015-10-07 18:54:13 +02:00
dso Fix pedantic warnings in mingw builds. 2015-09-29 18:05:40 +02:00
ec Fix no-stdio build 2015-09-29 21:59:19 -04:00
ecdh RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
ecdsa Constify ECDSA_METHOD_new. 2015-09-12 01:53:52 +01:00
engine When ENGINE_add finds that id or name is missing, actually return 2015-10-08 11:53:07 +02:00
err Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
evp make depend 2015-09-22 16:37:07 +01:00
hmac remove 0 assignments. 2015-09-03 16:26:34 -04:00
idea RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
include/internal Fix no-stdio build 2015-09-29 21:59:19 -04:00
jpake Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
lhash remove 0 assignments. 2015-09-03 16:26:34 -04:00
md2 RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
md4 RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
md5 RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
mdc2 Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
modes Skylake performance results. 2015-09-26 19:50:11 +02:00
objects New cipher and cipher modes standardized in Russia 2015-10-05 21:55:10 +01:00
ocsp Enable -Wmissing-variable-declarations and 2015-09-11 04:51:55 +01:00
pem Fix no-stdio build 2015-09-29 21:59:19 -04:00
perlasm Add assembly support for 32-bit iOS. 2015-04-20 15:06:22 +02:00
pkcs7 Add GOST12 cms/smime capabilities 2015-09-30 11:39:24 +01:00
pkcs12 GOST PKCS12 support 2015-09-21 10:34:55 +01:00
pqueue Add and use OPENSSL_zalloc 2015-09-02 22:05:37 -04:00
rand Fix -Wshadow warnings in mingw builds. 2015-09-29 18:05:55 +02:00
rc2 RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
rc4 Skylake performance results. 2015-09-26 19:50:11 +02:00
rc5 RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
ripemd RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
rsa Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verify 2015-10-08 13:50:41 +01:00
seed Fix the update target and remove duplicate file updates 2015-05-22 18:44:33 +02:00
sha Skylake performance results. 2015-09-26 19:50:11 +02:00
srp Fix SRP memory leaks 2015-09-21 10:17:58 +01:00
stack More zalloc nits 2015-09-04 11:45:44 -04:00
store Add and use OPENSSL_zalloc 2015-09-02 22:05:37 -04:00
threads Cleanup mttest.c : because we no longer use stdio here, don't include it 2015-06-21 21:45:48 +02:00
ts Fix no-stdio build 2015-09-29 21:59:19 -04:00
txt_db RT3999: Remove sub-component version strings 2015-08-10 12:13:32 -04:00
ui Fix no-stdio build 2015-09-29 21:59:19 -04:00
whrlpool Conversion to UTF-8 where needed 2015-07-14 01:10:01 +02:00
x509 Fix more d2i cases to properly update the input pointer 2015-10-03 13:22:52 +02:00
x509v3 make update 2015-09-22 21:15:55 +01:00
alphacpuid.pl alphacpuid.pl: fix alignment bug. 2011-08-12 12:28:52 +00:00
arm64cpuid.pl Add assembly support to ios64-cross. 2015-01-23 15:38:41 +01:00
arm_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
armcap.c Add assembly support for 32-bit iOS. 2015-04-20 15:06:22 +02:00
armv4cpuid.pl ARMv4 assembly pack: implement support for Thumb2. 2015-09-25 13:34:02 +02:00
c64xpluscpuid.pl C64x+ assembly pack: make it work with older toolchain. 2014-05-04 16:38:32 +02:00
cpt_err.c Rewrite crypto/ex_data 2015-07-20 01:16:28 -04:00
cryptlib.c Fix no-stdio build 2015-09-29 21:59:19 -04:00
crypto-lib.com Remove obsolete key formats. 2015-07-16 01:06:48 -04:00
cversion.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
ebcdic.c Appease clang -Wempty-translation-unit 2015-04-04 17:05:49 +02:00
ex_data.c Rewrite crypto/ex_data 2015-07-20 01:16:28 -04:00
fips_err.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
fips_ers.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
ia64cpuid.S IA-64 assembler pack: fix typos and make it work on HP-UX. 2011-05-07 20:36:05 +00:00
install-crypto.com Remove remaining Kerberos references 2015-05-13 15:08:10 +01:00
lock.c Fix no-stdio build 2015-09-29 21:59:19 -04:00
LPdir_nyi.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
LPdir_unix.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_vms.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_win32.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
LPdir_win.c memset, memcpy, sizeof consistency fixes 2015-05-05 22:18:59 -04:00
LPdir_wince.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
Makefile More secure storage of key material. 2015-06-23 17:09:35 -04:00
mem_clr.c Make sure OPENSSL_cleanse checks for NULL 2015-09-17 22:29:08 +01:00
mem_dbg.c Harmonize pointer printing and size_t-fy casts. 2015-10-05 09:26:19 +02:00
mem.c Add and use OPENSSL_zalloc 2015-09-02 22:05:37 -04:00
o_dir_test.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_dir.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_fips.c Identify and move common internal libcrypto header files 2015-05-14 17:21:40 +02:00
o_init.c Dead code cleanup: crypto/*.c, x509v3, demos 2015-02-02 11:08:16 -05:00
o_str.c Identify and move OpenSSL internal header files 2015-05-14 15:13:49 +02:00
o_time.c Check OPENSSL_gmtime_diff 2015-09-02 23:03:43 -04:00
opensslconf.h.in RT3969: Add OPENSSL_SYS_UEFI 2015-09-08 23:14:36 -04:00
pariscid.pl PA-RISC assembler pack: switch to bve in 64-bit builds. 2013-06-18 10:37:00 +02:00
ppc_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
ppccap.c RT3990: Fix #include path. 2015-08-05 22:06:01 -04:00
ppccpuid.pl aesp8-ppc.pl: fix typos. 2014-06-04 08:34:18 +02:00
s390xcap.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
s390xcpuid.S Multiple assembler packs: add experimental memory bus instrumentation. 2011-04-17 12:46:00 +00:00
sec_mem.c Enable -Wmissing-variable-declarations and 2015-09-11 04:51:55 +01:00
sparc_arch.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
sparccpuid.S Conversion to UTF-8 where needed 2015-07-14 01:10:01 +02:00
sparcv9cap.c Dead code cleanup: crypto/*.c, x509v3, demos 2015-02-02 11:08:16 -05:00
thr_id.c Harmonize pointer printing and size_t-fy casts. 2015-10-05 09:26:19 +02:00
uid.c Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
vms_rms.h Run util/openssl-format-source -v -c . 2015-01-22 09:20:09 +00:00
x86_64cpuid.pl x86[_64]cpuid.pl: add low-level RDSEED. 2014-02-14 17:24:12 +01:00
x86cpuid.pl Undo a90081576c 2014-08-09 08:02:20 -04:00