boringssl/crypto/err
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
..
asn1.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
bio.errordata Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
bn.errordata Add crypto/bytestring-based BIGNUM DER functions. 2015-07-07 00:47:39 +00:00
buf.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
cipher.errordata Add AEADs for AES-CTR with HMAC-SHA256. 2015-03-18 21:16:55 +00:00
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
conf.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
crypto.errordata Remove the ability to set custom ex_data implementations. 2015-04-15 23:23:50 +00:00
dh.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
digest.errordata Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
dsa.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
ec.errordata Support arbitrary elliptic curve groups. 2015-05-15 00:59:37 +00:00
ecdh.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
ecdsa.errordata Implement ECDSA_SIG_{parse,marshal} with crypto/bytestring. 2015-07-07 02:28:42 +00:00
engine.errordata Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
err_data_generate.go Generate error data at build time. 2015-03-06 18:59:25 +00:00
err_test.cc Convert err_test to C++. 2015-04-01 19:59:44 +00:00
err.c Define compatibility function |ERR_remove_state|. 2015-05-12 19:06:18 +00:00
evp.errordata Add DSA support to EVP. 2015-04-06 16:58:45 -07:00
hkdf.errordata Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
obj.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
pem.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
pkcs8.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00
rsa.errordata Export pkcs1_prefixed_msg as RSA_add_pkcs1_prefix. 2015-06-16 19:09:45 +00:00
ssl.errordata Convert the renegotiation extension to the new system. 2015-07-01 19:30:53 +00:00
x509.errordata Restore |X509_REQ_print| and friends, from OpenSSL at ce7e647b. 2015-06-23 22:36:52 +00:00
x509v3.errordata Reset all the error codes. 2015-02-11 23:12:08 +00:00