boringssl/crypto/evp
David Benjamin e0ba4dddf6 Normalize all EVP_PKEY_CTX_ctrl return values.
No code within BoringSSL or Google (grep for EVP_PKEY_CTX_(ctrl|get|set)) is
sensitive to the various failure cases. Normalize it all to 0/1 for simplicity.

This does carry a slight risk: any new ctrl hooks we import from upstream that,
like EVP_PKEY_CTX_get_rsa_oaep_md, return something other than success/failure
cannot be called directly via EVP_PKEY_CTX_ctrl. They instead need to
internally be routed through a struct like CBS and only called through the
wrappers. To that end, unexport EVP_PKEY_CTX_ctrl and require that callers use
the wrappers. No code in Google uses it directly and, if need be, switching to
the wrapper would be an incredibly upstreamable patch.

Change-Id: I3fd4e5a1a0f3d4d1c4122c52d4c74a5105b99cd5
Reviewed-on: https://boringssl-review.googlesource.com/3874
Reviewed-by: Adam Langley <agl@google.com>
2015-03-13 19:39:42 +00:00
..
algorithm.c Don't mix and match libraries and errors. 2014-10-13 22:56:28 +00:00
asn1.c Allow PKCS#8 in d2i_AutoPrivateKey. 2014-11-05 00:42:58 +00:00
CMakeLists.txt Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
digestsign.c Remove EVP_PKEY_CTRL_DIGESTINIT -2 special-case in md_begin_digest. 2015-03-13 19:17:59 +00:00
evp_ctx.c Normalize all EVP_PKEY_CTX_ctrl return values. 2015-03-13 19:39:42 +00:00
evp_test.c Fix memory-leak in evp_test. 2015-02-06 20:56:18 +00:00
evp.c Add in missing curly braces part 3. 2015-02-11 15:14:46 -08:00
internal.h Normalize all EVP_PKEY_CTX_ctrl return values. 2015-03-13 19:39:42 +00:00
p_ec_asn1.c EC_GROUP_cmp should return zero if the groups match. 2015-02-25 21:13:02 +00:00
p_ec.c Normalize all EVP_PKEY_CTX_ctrl return values. 2015-03-13 19:39:42 +00:00
p_hmac_asn1.c Add EVP_PKEY_supports_digest. 2014-11-18 22:18:36 +00:00
p_hmac.c Normalize all EVP_PKEY_CTX_ctrl return values. 2015-03-13 19:39:42 +00:00
p_rsa_asn1.c Add in missing curly braces part 3. 2015-02-11 15:14:46 -08:00
p_rsa.c Normalize all EVP_PKEY_CTX_ctrl return values. 2015-03-13 19:39:42 +00:00
pbkdf_test.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
pbkdf.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
sign.c Remove remnants of EVP_MD_FLAG_PKEY_METHOD_SIGNATURE. 2014-11-04 00:27:19 +00:00