| Index: net/cert/cert_verify_proc_openssl.cc
|
| diff --git a/net/cert/cert_verify_proc_openssl.cc b/net/cert/cert_verify_proc_openssl.cc
|
| index 0f21daa13f3c78a39b6dd7418f5b690389829374..63d698db72b99b8d3acf6a586a5456062a64fcc8 100644
|
| --- a/net/cert/cert_verify_proc_openssl.cc
|
| +++ b/net/cert/cert_verify_proc_openssl.cc
|
| @@ -91,7 +91,7 @@ CertStatus MapCertErrorToCertStatus(int err) {
|
|
|
| // sk_X509_free is a function-style macro, so can't be used as a template
|
| // param directly.
|
| -void sk_X509_free_fn(STACK_OF(X509)* st) {
|
| +void sk_X509_free_fn(STACK_OF(X509) * st) {
|
| sk_X509_free(st);
|
| }
|
|
|
| @@ -142,13 +142,12 @@ void GetCertChainInfo(X509_STORE_CTX* store_ctx,
|
| }
|
| TestRootCerts* root_certs = TestRootCerts::GetInstance();
|
| if (root_certs->Contains(root))
|
| - verify_result->is_issued_by_known_root = false;
|
| + verify_result->is_issued_by_known_root = false;
|
| }
|
| }
|
| }
|
|
|
| -void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx,
|
| - HashValueVector* hashes) {
|
| +void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx, HashValueVector* hashes) {
|
| STACK_OF(X509)* chain = X509_STORE_CTX_get_chain(store_ctx);
|
| for (int i = 0; i < sk_X509_num(chain); ++i) {
|
| X509* cert = sk_X509_value(chain, i);
|
| @@ -164,7 +163,8 @@ void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx,
|
|
|
| HashValue sha1(HASH_VALUE_SHA1);
|
| base::SHA1HashBytes(reinterpret_cast<const uint8*>(spki_bytes.data()),
|
| - spki_bytes.size(), sha1.data());
|
| + spki_bytes.size(),
|
| + sha1.data());
|
| hashes->push_back(sha1);
|
|
|
| HashValue sha256(HASH_VALUE_SHA256);
|
| @@ -175,9 +175,11 @@ void AppendPublicKeyHashes(X509_STORE_CTX* store_ctx,
|
|
|
| } // namespace
|
|
|
| -CertVerifyProcOpenSSL::CertVerifyProcOpenSSL() {}
|
| +CertVerifyProcOpenSSL::CertVerifyProcOpenSSL() {
|
| +}
|
|
|
| -CertVerifyProcOpenSSL::~CertVerifyProcOpenSSL() {}
|
| +CertVerifyProcOpenSSL::~CertVerifyProcOpenSSL() {
|
| +}
|
|
|
| bool CertVerifyProcOpenSSL::SupportsAdditionalTrustAnchors() const {
|
| return false;
|
| @@ -208,12 +210,16 @@ int CertVerifyProcOpenSSL::VerifyInternal(
|
| const X509Certificate::OSCertHandles& os_intermediates =
|
| cert->GetIntermediateCertificates();
|
| for (X509Certificate::OSCertHandles::const_iterator it =
|
| - os_intermediates.begin(); it != os_intermediates.end(); ++it) {
|
| + os_intermediates.begin();
|
| + it != os_intermediates.end();
|
| + ++it) {
|
| if (!sk_X509_push(intermediates.get(), *it))
|
| return ERR_OUT_OF_MEMORY;
|
| }
|
| - if (X509_STORE_CTX_init(ctx.get(), X509Certificate::cert_store(),
|
| - cert->os_cert_handle(), intermediates.get()) != 1) {
|
| + if (X509_STORE_CTX_init(ctx.get(),
|
| + X509Certificate::cert_store(),
|
| + cert->os_cert_handle(),
|
| + intermediates.get()) != 1) {
|
| NOTREACHED();
|
| return ERR_FAILED;
|
| }
|
| @@ -222,10 +228,10 @@ int CertVerifyProcOpenSSL::VerifyInternal(
|
| int x509_error = X509_STORE_CTX_get_error(ctx.get());
|
| CertStatus cert_status = MapCertErrorToCertStatus(x509_error);
|
| LOG(ERROR) << "X509 Verification error "
|
| - << X509_verify_cert_error_string(x509_error)
|
| - << " : " << x509_error
|
| - << " : " << X509_STORE_CTX_get_error_depth(ctx.get())
|
| - << " : " << cert_status;
|
| + << X509_verify_cert_error_string(x509_error) << " : "
|
| + << x509_error << " : "
|
| + << X509_STORE_CTX_get_error_depth(ctx.get()) << " : "
|
| + << cert_status;
|
| verify_result->cert_status |= cert_status;
|
| }
|
|
|
|
|