boringssl/crypto/bn
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
..
asm Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
add.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
bn_asn1.c Work around broken Estonian smart cards. Again. 2015-09-15 21:18:15 +00:00
bn_test.cc Work around broken Estonian smart cards. Again. 2015-09-15 21:18:15 +00:00
bn.c Get overflow checks right in BN_bin2bn. 2015-08-17 20:30:00 +00:00
CMakeLists.txt Move arm_arch.h and fix up lots of include paths. 2015-08-26 01:57:59 +00:00
cmp.c Inital import. 2014-06-20 13:17:32 -07:00
convert.c Re-add |BN_bn2mpi| and |BN_mpi2bn| from OpenSSL at fd682e4c. 2015-08-18 23:49:31 +00:00
ctx.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
div.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
exponentiation.c BN_mod_exp_mont_consttime: check for zero modulus. 2015-09-01 19:12:28 +00:00
gcd.c Stop using |ERR_peek_last_error| in RSA blinding. 2015-09-08 23:32:48 +00:00
generic.c Add in missing curly braces part 1. 2015-02-11 19:31:01 +00:00
internal.h Get overflow checks right in BN_bin2bn. 2015-08-17 20:30:00 +00:00
kronecker.c Inital import. 2014-06-20 13:17:32 -07:00
montgomery.c Check for 0 modulus in BN_MONT_CTX_set. 2015-08-17 20:32:38 +00:00
mul.c Check for BN_copy failures. 2015-06-15 17:52:40 +00:00
prime.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
random.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
rsaz_exp.c Support building with PNaCl. 2014-07-11 19:04:04 +00:00
rsaz_exp.h Fix license on rsaz_exp.h. 2015-07-27 22:21:11 +00:00
shift.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
sqrt.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00