boringssl/crypto/err
David Benjamin 2f6410ba4e Rewrite ECPrivateKey serialization.
Functions which lose object reuse and need auditing:
- d2i_ECParameters
- d2i_ECPrivateKey

This adds a handful of bytestring-based APIs to handle EC key
serialization. Deprecate all the old serialization APIs. Notes:

- An EC_KEY has additional state that controls its encoding, enc_flags
  and conv_form. conv_form is left alone, but enc_flags in the new API
  is an explicit parameter.

- d2i_ECPrivateKey interpreted its T** argument unlike nearly every
  other d2i function. This is an explicit EC_GROUP parameter in the new
  function.

- The new specified curve code is much stricter and should parse enough
  to uniquely identify the curve.

- I've not bothered with a new version of i2d_ECParameters. It just
  writes an OID. This may change later when decoupling from the giant
  OID table.

- Likewise, I've not bothered with new APIs for the public key since the
  EC_POINT APIs should suffice.

- Previously, d2i_ECPrivateKey would not call EC_KEY_check_key and it
  was possible for the imported public and private key to mismatch. It
  now calls it.

BUG=499653

Change-Id: I30b4dd2841ae76c56ab0e1808360b2628dee0615
Reviewed-on: https://boringssl-review.googlesource.com/6859
Reviewed-by: Adam Langley <agl@google.com>
2016-02-16 23:51:09 +00:00
..
asn1.errordata Remove ASN1_R_MALLOC_FAILURE. 2015-12-22 00:12:24 +00:00
bio.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
bn.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
cipher.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
CMakeLists.txt Add a run_tests target to run all tests. 2015-10-26 20:33:44 +00:00
conf.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
dh.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
digest.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
dsa.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
ec.errordata Rewrite ECPrivateKey serialization. 2016-02-16 23:51:09 +00:00
ecdh.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
ecdsa.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
engine.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
err_data_generate.go ERR_LIB_USER should be the last error. 2015-07-16 02:03:03 +00:00
err_test.cc Don't bother sampling __func__. 2015-11-03 22:50:59 +00:00
err.c Don't bother sampling __func__. 2015-11-03 22:50:59 +00:00
evp.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
hkdf.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
obj.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
pem.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
pkcs8.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
rsa.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
ssl.errordata Reset ssl error codes. 2015-12-16 18:38:20 +00:00
x509.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00
x509v3.errordata Get rid of err function codes. 2015-07-16 02:02:08 +00:00