boringssl/crypto/evp
David Benjamin 87897a8cea Implement ECDSA_SIG_{parse,marshal} with crypto/bytestring.
This is the first structure to be implemented with the new BIGNUM ASN.1
routines. Object reuse in the legacy d2i/i2d functions is implemented by
releasing whatever was in *out before and setting it to the
newly-allocated object. As with the new d2i_SSL_SESSION, this is a
weaker form of object reuse, but should suffice for reasonable callers.

As ECDSA_SIG is more likely to be parsed alone than as part of another
structure (and using CBB is slightly tedious), add convenient functions
which take byte arrays. For consistency with SSL_SESSION, they are named
to/from_bytes. from_bytes, unlike the CBS variant, rejects trailing
data.

Note this changes some test expectations: BER signatures now push an
error code. That they didn't do this was probably a mistake.

BUG=499653

Change-Id: I9ec74db53e70d9a989412cc9e2b599be0454caec
Reviewed-on: https://boringssl-review.googlesource.com/5269
Reviewed-by: Adam Langley <agl@google.com>
2015-07-07 02:28:42 +00:00
..
algorithm.c
asn1.c Remove unnecessary NULL checks, part 3. 2015-05-04 23:12:04 +00:00
CMakeLists.txt Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
digestsign.c Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
evp_ctx.c Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
evp_extra_test.cc Rename evp_test to evp_extra_test. 2015-05-11 21:35:00 +00:00
evp_test.cc Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
evp_tests.txt Implement ECDSA_SIG_{parse,marshal} with crypto/bytestring. 2015-07-07 02:28:42 +00:00
evp.c Remove EVP_PKEY_dup. 2015-07-01 21:38:39 +00:00
internal.h Make pem_str const-correct. 2015-07-07 01:11:58 +00:00
p_dsa_asn1.c Remove info field on EVP_PKEY_ASN1_METHOD. 2015-07-07 01:11:46 +00:00
p_ec_asn1.c Remove info field on EVP_PKEY_ASN1_METHOD. 2015-07-07 01:11:46 +00:00
p_ec.c Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
p_rsa_asn1.c Remove info field on EVP_PKEY_ASN1_METHOD. 2015-07-07 01:11:46 +00:00
p_rsa.c Remove EVP_PKEY_HMAC. 2015-06-25 00:03:02 +00:00
pbkdf_test.cc Rename BIO_print_errors_fp back to ERR_print_errors_fp & refactor it. 2015-04-13 20:23:29 +00:00
pbkdf.c
sign.c Take advantage of normalized return values. 2015-03-13 19:40:42 +00:00