boringssl/crypto
David Benjamin 231cb82145 Work around broken Estonian smart cards. Again.
Estonian IDs issued between September 2014 to September 2015 are broken and use
negative moduli. They last five years and are common enough that we need to
work around this bug.

Add parallel "buggy" versions of BN_cbs2unsigned and RSA_parse_public_key which
tolerate this mistake, to align with OpenSSL's previous behavior. This code is
currently hooked up to rsa_pub_decode in RSA_ASN1_METHOD so that d2i_X509 is
tolerant. (This isn't a huge deal as the rest of that stack still uses the
legacy ASN.1 code which is overly lenient in many other ways.)

In future, when Chromium isn't using crypto/x509 and has more unified
certificate handling code, we can put client certificates under a slightly
different codepath, so this needn't hold for all certificates forever. Then in
September 2019, when the broken Estonian certificates all expire, we can purge
this codepath altogether.

BUG=532048

Change-Id: Iadb245048c71dba2eec45dd066c4a6e077140751
Reviewed-on: https://boringssl-review.googlesource.com/5894
Reviewed-by: Adam Langley <agl@google.com>
2015-09-15 21:18:15 +00:00
..
aes Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
asn1 Fix the type of ASN1_i2d_bio's last argument. 2015-08-28 22:03:54 +00:00
base64 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
bio fread returns a size_t, not int. 2015-08-28 22:46:40 +00:00
bn Work around broken Estonian smart cards. Again. 2015-09-15 21:18:15 +00:00
buf Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
bytestring Allow out_present to be NULL in CBS_get_optional_asn1 2015-09-03 18:46:17 +00:00
chacha Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
cipher Restore the NULL-SHA ciphersuite. (Alas.) 2015-09-11 22:18:08 +00:00
cmac Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
conf Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
des Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
dh Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
digest Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
dsa Fix dsa keygen for too-short seed 2015-09-01 19:09:22 +00:00
ec Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
ecdh Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
ecdsa Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
engine Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
err Forbid a server from negotiating both ALPN and NPN. 2015-09-01 20:46:42 +00:00
evp Work around broken Estonian smart cards. Again. 2015-09-15 21:18:15 +00:00
hkdf Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
hmac Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
lhash Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
md4 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
md5 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
modes Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
obj Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
pem Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
perlasm Emit #if guards for ARM assembly files. 2015-06-23 21:00:32 +00:00
pkcs8 pkcs8.c: Add PBES2 to list of password-based encryption methods. 2015-08-28 20:33:33 +00:00
poly1305 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
rand Drop urandom_test. 2015-09-08 18:10:15 -07:00
rc4 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
rsa Work around broken Estonian smart cards. Again. 2015-09-15 21:18:15 +00:00
sha Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
stack Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
test pkcs8.c: Add PBES2 to list of password-based encryption methods. 2015-08-28 20:33:33 +00:00
x509 Add X509_CRL_up_ref. 2015-09-01 19:12:56 +00:00
x509v3 Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
CMakeLists.txt Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
constant_time_test.c Update constant-time operations. 2014-11-10 13:48:30 -08:00
cpu-arm-asm.S Don't probe for NEON with SIGILL on aarch64. 2015-02-03 19:56:25 +00:00
cpu-arm.c Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
cpu-intel.c Surround immintrin.h includes with warning pragmas. 2015-07-20 20:08:26 +00:00
crypto.c Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
directory_posix.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory_win.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory.h Add visibility rules. 2014-07-31 22:03:11 +00:00
ex_data.c Reserve ex_data index zero for app_data. 2015-07-20 16:56:34 +00:00
header_removed.h Add ISC header to a handful of files. 2014-06-26 10:26:42 -07:00
internal.h Buffer reads of urandom, if you promise no forking. 2015-09-09 01:02:54 +00:00
mem.c Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_pthread.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_test.c Use the correct case for Windows headers. 2015-06-09 21:38:04 +00:00
thread_win.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread.c Remove leftovers of the old-style locks. 2015-05-20 19:18:44 +00:00
time_support.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00