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

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

Issue 584463005: Add debugging information to the SSL blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Brackets for multi-line if Created 6 years, 2 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/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('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/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <cryptohi.h> 8 #include <cryptohi.h>
9 #include <keyhi.h> 9 #include <keyhi.h>
10 #include <nss.h> 10 #include <nss.h>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 arena.get(), 134 arena.get(),
135 &issuers)) { 135 &issuers)) {
136 return false; 136 return false;
137 } 137 }
138 return x509_util::IsCertificateIssuedBy(cert_chain, issuers); 138 return x509_util::IsCertificateIssuedBy(cert_chain, issuers);
139 } 139 }
140 140
141 // static 141 // static
142 bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle, 142 bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle,
143 std::string* encoded) { 143 std::string* encoded) {
144 if (!cert_handle->derCert.len) 144 if (!cert_handle || !cert_handle->derCert.len)
145 return false; 145 return false;
146 encoded->assign(reinterpret_cast<char*>(cert_handle->derCert.data), 146 encoded->assign(reinterpret_cast<char*>(cert_handle->derCert.data),
147 cert_handle->derCert.len); 147 cert_handle->derCert.len);
148 return true; 148 return true;
149 } 149 }
150 150
151 // static 151 // static
152 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a, 152 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a,
153 X509Certificate::OSCertHandle b) { 153 X509Certificate::OSCertHandle b) {
154 DCHECK(a && b); 154 DCHECK(a && b);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 // static 262 // static
263 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 263 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
264 size_t* size_bits, 264 size_t* size_bits,
265 PublicKeyType* type) { 265 PublicKeyType* type) {
266 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type); 266 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type);
267 } 267 }
268 268
269 } // namespace net 269 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698