Skip to content

Commit 62792e5

Browse files
davidbeneranmes
authored andcommitted
Roll BoringSSL forward and remove temporary ifdefs. (google#1166)
Sync to the BoringSSL revision used in current Chromium stable.
1 parent be0af45 commit 62792e5

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ vars = {
77

88
# SSL implementation alternatives:
99
"openssl": "https://github.com/openssl/openssl.git@OpenSSL_1_0_2d",
10-
"boringssl": "https://boringssl.googlesource.com/boringssl.git@2661"
10+
"boringssl": "https://boringssl.googlesource.com/boringssl.git@2883"
1111
}
1212

1313
deps = {

cpp/log/cert.cc

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -476,24 +476,8 @@ StatusOr<bool> Cert::IsSignedBy(const Cert& issuer) const {
476476
unsigned long err = ERR_peek_last_error();
477477
const int reason = ERR_GET_REASON(err);
478478
const int lib = ERR_GET_LIB(err);
479-
#if defined(OPENSSL_IS_BORINGSSL) && !defined(BORINGSSL_201603)
480-
// BoringSSL returns only 0 and 1. This is an attempt to
481-
// approximate the circumstances that in OpenSSL cause a 0 return,
482-
// and that are too boring/spammy to log, e.g. malformed inputs.
483-
if (err == 0 || lib == ERR_LIB_ASN1 || lib == ERR_LIB_X509) {
484-
ClearOpenSSLErrors();
485-
return false;
486-
}
487-
488-
if (lib == ERR_LIB_EVP &&
489-
(reason == EVP_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM ||
490-
reason == EVP_R_UNKNOWN_SIGNATURE_ALGORITHM)) {
491-
return LogUnsupportedAlgorithm();
492-
}
493-
#else
494-
// OpenSSL and recent versions of BoringSSL use ERR_R_EVP_LIB when a
495-
// signature fails to verify. Clear errors in this case, but log
496-
// unusual failures.
479+
// OpenSSL and BoringSSL use ERR_R_EVP_LIB when a signature fails to verify.
480+
// Clear errors in this case, but log unusual failures.
497481
if (err == 0 || ((lib == ERR_LIB_X509 || lib == ERR_LIB_ASN1) &&
498482
reason == ERR_R_EVP_LIB)) {
499483
ClearOpenSSLErrors();
@@ -504,7 +488,6 @@ StatusOr<bool> Cert::IsSignedBy(const Cert& issuer) const {
504488
reason == ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM)) {
505489
return LogUnsupportedAlgorithm();
506490
}
507-
#endif
508491
LOG(ERROR) << "OpenSSL X509_verify returned " << ret;
509492
LOG_OPENSSL_ERRORS(ERROR);
510493
return util::Status(Code::INTERNAL, "X509 verify error");

cpp/log/cert_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,7 @@ TEST_F(CertTest, SignatureAlgorithmMatches) {
493493
TEST_F(CertTest, IllegalSignatureAlgorithmParameter) {
494494
const unique_ptr<Cert> cert(
495495
Cert::FromPemString(kIllegalSigAlgParameterCertString));
496-
#if defined(OPENSSL_IS_BORINGSSL) && \
497-
(defined(BORINGSSL_201603) || defined(BORINGSSL_201512))
496+
#if defined(OPENSSL_IS_BORINGSSL)
498497
EXPECT_FALSE(cert.get());
499498
#else
500499
EXPECT_TRUE(cert.get());

0 commit comments

Comments
 (0)