Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: net/cert/cert_verify_proc_android.cc

Issue 1081913003: Route OCSP stapling through CertVerifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: yet another CrOS-only Verify call Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/cert_verify_proc_android.h ('k') | net/cert/cert_verify_proc_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/cert_verify_proc_android.h" 5 #include "net/cert/cert_verify_proc_android.h"
6 6
7 #include <openssl/x509v3.h> 7 #include <openssl/x509v3.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } // namespace 148 } // namespace
149 149
150 CertVerifyProcAndroid::CertVerifyProcAndroid() {} 150 CertVerifyProcAndroid::CertVerifyProcAndroid() {}
151 151
152 CertVerifyProcAndroid::~CertVerifyProcAndroid() {} 152 CertVerifyProcAndroid::~CertVerifyProcAndroid() {}
153 153
154 bool CertVerifyProcAndroid::SupportsAdditionalTrustAnchors() const { 154 bool CertVerifyProcAndroid::SupportsAdditionalTrustAnchors() const {
155 return false; 155 return false;
156 } 156 }
157 157
158 bool CertVerifyProcAndroid::SupportsOCSPStapling() const {
159 return false;
160 }
161
158 int CertVerifyProcAndroid::VerifyInternal( 162 int CertVerifyProcAndroid::VerifyInternal(
159 X509Certificate* cert, 163 X509Certificate* cert,
160 const std::string& hostname, 164 const std::string& hostname,
165 const std::string& ocsp_response,
161 int flags, 166 int flags,
162 CRLSet* crl_set, 167 CRLSet* crl_set,
163 const CertificateList& additional_trust_anchors, 168 const CertificateList& additional_trust_anchors,
164 CertVerifyResult* verify_result) { 169 CertVerifyResult* verify_result) {
165 if (!cert->VerifyNameMatch(hostname, 170 if (!cert->VerifyNameMatch(hostname,
166 &verify_result->common_name_fallback_used)) { 171 &verify_result->common_name_fallback_used)) {
167 verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID; 172 verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID;
168 } 173 }
169 174
170 std::vector<std::string> cert_bytes; 175 std::vector<std::string> cert_bytes;
171 if (!GetChainDEREncodedBytes(cert, &cert_bytes)) 176 if (!GetChainDEREncodedBytes(cert, &cert_bytes))
172 return ERR_CERT_INVALID; 177 return ERR_CERT_INVALID;
173 if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, verify_result)) { 178 if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, verify_result)) {
174 NOTREACHED(); 179 NOTREACHED();
175 return ERR_FAILED; 180 return ERR_FAILED;
176 } 181 }
177 if (IsCertStatusError(verify_result->cert_status)) 182 if (IsCertStatusError(verify_result->cert_status))
178 return MapCertStatusToNetError(verify_result->cert_status); 183 return MapCertStatusToNetError(verify_result->cert_status);
179 184
180 return OK; 185 return OK;
181 } 186 }
182 187
183 } // namespace net 188 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_android.h ('k') | net/cert/cert_verify_proc_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698