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
by_dir.c
by_file.c
charmap.h
CMakeLists.txt
i2d_pr.c
pkcs7_test.c
pkcs7.c
t_crl.c
t_req.c
t_x509.c
t_x509a.c
vpm_int.h
x509_att.c
x509_cmp.c
x509_d2.c
x509_def.c
x509_ext.c
x509_lu.c
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c
x509_vpm.c
x509.c
x509cset.c
x509name.c
x509rset.c
x509spki.c
x509type.c
x_algor.c
x_all.c
x_attrib.c
x_crl.c
x_exten.c
x_info.c
x_name.c
x_pkey.c
x_pubkey.c
x_req.c
x_sig.c
x_spki.c
x_val.c
x_x509.c
x_x509a.c