@@ -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" );
0 commit comments