boringssl/crypto/x509
David Benjamin 74f711083d Parse RSAPrivateKey with CBS.
This removes the version field from RSA and instead handles versioning
as part of parsing. (As a bonus, we now correctly limit multi-prime RSA
to version 1 keys.)

Most consumers are also converted. old_rsa_priv_{de,en}code are left
alone for now. Those hooks are passed in parameters which match the old
d2i/i2d pattern (they're only used in d2i_PrivateKey and
i2d_PrivateKey).

Include a test which, among other things, checks that public keys being
serialized as private keys are handled properly.

BUG=499653

Change-Id: Icdd5f0382c4a84f9c8867024f29756e1a306ba08
Reviewed-on: https://boringssl-review.googlesource.com/5273
Reviewed-by: Adam Langley <agl@google.com>
2015-07-07 22:50:53 +00:00
..
a_digest.c
a_sign.c
a_strex.c
a_verify.c
asn1_gen.c Enable MSVC warning C4701, use of potentially uninitialized variable. 2015-04-13 20:32:26 +00:00
by_dir.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
by_file.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
charmap.h
CMakeLists.txt Restore |X509_REQ_print| and friends, from OpenSSL at ce7e647b. 2015-06-23 22:36:52 +00:00
i2d_pr.c
pkcs7_test.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
pkcs7.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
t_crl.c
t_req.c Fix signed/unsigned warnings for MSVC. 2015-06-23 15:46:00 -07:00
t_x509.c
t_x509a.c
vpm_int.h Update API to use (char *) for email addresses and hostnames. 2015-02-13 11:00:48 -08:00
x509_att.c Fix some missing OBJ_dup failure checks. 2015-05-04 23:17:01 +00:00
x509_cmp.c
x509_d2.c
x509_def.c
x509_ext.c
x509_lu.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
x509_obj.c
x509_r2x.c
x509_req.c Check public key is not NULL. 2015-03-06 18:55:32 +00:00
x509_set.c
x509_trs.c
x509_txt.c
x509_v3.c Fix some missing OBJ_dup failure checks. 2015-05-04 23:17:01 +00:00
x509_vfy.c Fix length checks in X509_cmp_time to avoid out-of-bounds reads. 2015-06-16 19:07:15 +00:00
x509_vpm.c Require that FOO_free functions do nothing on NULL. 2015-05-04 22:58:13 +00:00
x509.c
x509cset.c
x509name.c
x509rset.c
x509spki.c
x509type.c
x_algor.c
x_all.c Parse RSAPrivateKey with CBS. 2015-07-07 22:50:53 +00:00
x_attrib.c
x_crl.c Remove last references to named locks. 2015-05-20 19:18:30 +00:00
x_exten.c
x_info.c Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
x_name.c
x_pkey.c Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
x_pubkey.c Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
x_req.c Remove last references to named locks. 2015-05-20 19:18:30 +00:00
x_sig.c
x_spki.c
x_val.c
x_x509.c Remove last references to named locks. 2015-05-20 19:18:30 +00:00
x_x509a.c