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

Side by Side Diff: net/cert/x509_certificate_ios.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, 3 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 | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | net/cert/x509_certificate_mac.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 <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include <cert.h> 10 #include <cert.h>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (ip_addrs) 96 if (ip_addrs)
97 ip_addrs->clear(); 97 ip_addrs->clear();
98 return; 98 return;
99 } 99 }
100 x509_util::GetSubjectAltName(cert_handle, dns_names, ip_addrs); 100 x509_util::GetSubjectAltName(cert_handle, dns_names, ip_addrs);
101 } 101 }
102 102
103 // static 103 // static
104 bool X509Certificate::GetDEREncoded(OSCertHandle cert_handle, 104 bool X509Certificate::GetDEREncoded(OSCertHandle cert_handle,
105 std::string* encoded) { 105 std::string* encoded) {
106 if (!cert_handle)
107 return false;
106 ScopedCFTypeRef<CFDataRef> der_data(SecCertificateCopyData(cert_handle)); 108 ScopedCFTypeRef<CFDataRef> der_data(SecCertificateCopyData(cert_handle));
107 if (!der_data) 109 if (!der_data)
108 return false; 110 return false;
109 encoded->assign(reinterpret_cast<const char*>(CFDataGetBytePtr(der_data)), 111 encoded->assign(reinterpret_cast<const char*>(CFDataGetBytePtr(der_data)),
110 CFDataGetLength(der_data)); 112 CFDataGetLength(der_data));
111 return true; 113 return true;
112 } 114 }
113 115
114 // static 116 // static
115 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a, 117 bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 228
227 // static 229 // static
228 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 230 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
229 size_t* size_bits, 231 size_t* size_bits,
230 PublicKeyType* type) { 232 PublicKeyType* type) {
231 x509_util_ios::NSSCertificate nss_cert(cert_handle); 233 x509_util_ios::NSSCertificate nss_cert(cert_handle);
232 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type); 234 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type);
233 } 235 }
234 236
235 } // namespace net 237 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | net/cert/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698