Merge "Fix OpenSSL Builds"

This commit is contained in:
TreeHugger Robot
2020-10-28 21:47:37 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -336,11 +336,12 @@ bool ExtractExtensionValueFromCertificate(const std::string& cert,
STACK_OF(X509)* certs = pkcs7->d.sign->cert;
// Find the desired certificate from the stack.
if (cert_index >= static_cast<size_t>(sk_X509_num(certs))) {
const size_t num_certs = static_cast<size_t>(sk_X509_num(certs));
if (cert_index >= num_certs) {
LOGE(
"Unexpected number of certificates in chain: "
"count = %zu, minimum = %zu",
sk_X509_num(certs), cert_index + 1);
num_certs, cert_index + 1);
return false;
}

View File

@@ -9,6 +9,7 @@
#include <stdint.h>
#include <map>
#include <memory>
#include <string>
#include <vector>