external/boringssl: Sync to 2c45fa0b90f61b27973fa81893e014fc8c8e8999.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/faa539f877432814d0f2de19846eb99f2ea1e207..2c45fa0b90f61b27973fa81893e014fc8c8e8999
Test: BoringSSL CTS Presubmits
Change-Id: Ie6dc40e0c979168ec73fa1165cbc6e6b83793439
diff --git a/src/crypto/evp/evp_test.cc b/src/crypto/evp/evp_test.cc
index 6ca250e..baf41fe 100644
--- a/src/crypto/evp/evp_test.cc
+++ b/src/crypto/evp/evp_test.cc
@@ -110,6 +110,9 @@
if (name == "DSA") {
return EVP_PKEY_DSA;
}
+ if (name == "Ed25519") {
+ return EVP_PKEY_ED25519;
+ }
t->PrintLine("Unknown key type: '%s'", name.c_str());
return EVP_PKEY_NONE;
}
@@ -201,16 +204,24 @@
int (*key_op_init)(EVP_PKEY_CTX *ctx);
int (*key_op)(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out_len,
- const uint8_t *in, size_t in_len);
+ const uint8_t *in, size_t in_len) = nullptr;
+ int (*verify_op)(EVP_PKEY_CTX * ctx, const uint8_t *sig, size_t sig_len,
+ const uint8_t *in, size_t in_len) = nullptr;
if (t->GetType() == "Decrypt") {
key_op_init = EVP_PKEY_decrypt_init;
key_op = EVP_PKEY_decrypt;
} else if (t->GetType() == "Sign") {
key_op_init = EVP_PKEY_sign_init;
key_op = EVP_PKEY_sign;
+ } else if (t->GetType() == "SignMessage") {
+ key_op_init = EVP_PKEY_sign_init;
+ key_op = EVP_PKEY_sign_message;
} else if (t->GetType() == "Verify") {
key_op_init = EVP_PKEY_verify_init;
- key_op = nullptr; // EVP_PKEY_verify is handled differently.
+ verify_op = EVP_PKEY_verify;
+ } else if (t->GetType() == "VerifyMessage") {
+ key_op_init = EVP_PKEY_verify_init;
+ verify_op = EVP_PKEY_verify_message;
} else {
t->PrintLine("Unknown test '%s'", t->GetType().c_str());
return false;
@@ -261,11 +272,11 @@
}
}
- if (t->GetType() == "Verify") {
+ if (verify_op != nullptr) {
std::vector<uint8_t> output;
if (!t->GetBytes(&output, "Output") ||
- !EVP_PKEY_verify(ctx.get(), output.data(), output.size(), input.data(),
- input.size())) {
+ !verify_op(ctx.get(), output.data(), output.size(), input.data(),
+ input.size())) {
// ECDSA sometimes doesn't push an error code. Push one on the error queue
// so it's distinguishable from other errors.
OPENSSL_PUT_ERROR(USER, ERR_R_EVP_LIB);