boringssl/crypto/rsa
David Benjamin db50299b24 Add tests for RSA objects with only n and d.
Conscrypt, thanks to Java's RSAPrivateKeySpec API, must be able to use RSA keys
with only modulus and exponent. This is kind of silly and breaks the blinding
code so they, both in OpenSSL and BoringSSL, had to explicitly turn blinding
off.

Add a test for this as we're otherwise sure to break it on accident.

We may wish to avoid the silly rsa->flags modification, I'm not sure. For now,
keep the requirement in so other consumers do not accidentally rely on this.

(Also add a few missing ERR_clear_error calls. Functions which are expected to
fail should be followed by an ERR_clear_error so later unexpected failures
don't get confused.)

BUG=boringssl:12

Change-Id: I674349821f1f59292b8edd085f21dc37e8bcaa75
Reviewed-on: https://boringssl-review.googlesource.com/7560
Reviewed-by: David Benjamin <davidben@google.com>
2016-03-25 20:52:17 +00:00
..
blinding.c Clarify lifecycle of |BN_BLINDING|. 2016-03-25 20:08:04 +00:00
CMakeLists.txt Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
internal.h Clarify lifecycle of |BN_BLINDING|. 2016-03-25 20:08:04 +00:00
padding.c Make local functions static. 2016-03-20 16:37:58 +00:00
rsa_asn1.c Fix i2d_RSAPrivateKey, i2d_RSAPublicKey memory leaks 2016-03-07 15:48:21 +00:00
rsa_impl.c Clarify lifecycle of |BN_BLINDING|. 2016-03-25 20:08:04 +00:00
rsa_test.cc Add tests for RSA objects with only n and d. 2016-03-25 20:52:17 +00:00
rsa.c Align with upstream's error strings, take two. 2016-03-15 16:02:12 +00:00