2f6410ba4e
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>
32 lines
815 B
Plaintext
32 lines
815 B
Plaintext
EC,126,BIGNUM_OUT_OF_RANGE
|
|
EC,100,BUFFER_TOO_SMALL
|
|
EC,101,COORDINATES_OUT_OF_RANGE
|
|
EC,102,D2I_ECPKPARAMETERS_FAILURE
|
|
EC,128,DECODE_ERROR
|
|
EC,103,EC_GROUP_NEW_BY_NAME_FAILURE
|
|
EC,129,ENCODE_ERROR
|
|
EC,104,GROUP2PKPARAMETERS_FAILURE
|
|
EC,130,GROUP_MISMATCH
|
|
EC,105,I2D_ECPKPARAMETERS_FAILURE
|
|
EC,106,INCOMPATIBLE_OBJECTS
|
|
EC,107,INVALID_COMPRESSED_POINT
|
|
EC,108,INVALID_COMPRESSION_BIT
|
|
EC,109,INVALID_ENCODING
|
|
EC,110,INVALID_FIELD
|
|
EC,111,INVALID_FORM
|
|
EC,112,INVALID_GROUP_ORDER
|
|
EC,113,INVALID_PRIVATE_KEY
|
|
EC,114,MISSING_PARAMETERS
|
|
EC,115,MISSING_PRIVATE_KEY
|
|
EC,116,NON_NAMED_CURVE
|
|
EC,117,NOT_INITIALIZED
|
|
EC,118,PKPARAMETERS2GROUP_FAILURE
|
|
EC,119,POINT_AT_INFINITY
|
|
EC,120,POINT_IS_NOT_ON_CURVE
|
|
EC,121,SLOT_FULL
|
|
EC,122,UNDEFINED_GENERATOR
|
|
EC,123,UNKNOWN_GROUP
|
|
EC,124,UNKNOWN_ORDER
|
|
EC,127,WRONG_CURVE_PARAMETERS
|
|
EC,125,WRONG_ORDER
|