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

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

Issue 1082123003: Rename USE_NSS to USE_NSS_CERTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-nss-certs
Patch Set: rebase 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_unittest.cc ('k') | net/cert/ev_root_ca_metadata.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ct_objects_extractor.h" 5 #include "net/cert/ct_objects_extractor.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <secasn1.h> 8 #include <secasn1.h>
9 #include <secitem.h> 9 #include <secitem.h>
10 #include <secoid.h> 10 #include <secoid.h>
(...skipping 23 matching lines...) Expand all
34 // platforms where X509Certificate::OSCertHandle refers to a different type 34 // platforms where X509Certificate::OSCertHandle refers to a different type
35 // than a CERTCertificate*. 35 // than a CERTCertificate*.
36 struct NSSCertWrapper { 36 struct NSSCertWrapper {
37 explicit NSSCertWrapper(X509Certificate::OSCertHandle cert_handle); 37 explicit NSSCertWrapper(X509Certificate::OSCertHandle cert_handle);
38 ~NSSCertWrapper() {} 38 ~NSSCertWrapper() {}
39 39
40 ScopedCERTCertificate cert; 40 ScopedCERTCertificate cert;
41 }; 41 };
42 42
43 NSSCertWrapper::NSSCertWrapper(X509Certificate::OSCertHandle cert_handle) { 43 NSSCertWrapper::NSSCertWrapper(X509Certificate::OSCertHandle cert_handle) {
44 #if defined(USE_NSS) 44 #if defined(USE_NSS_CERTS)
45 cert.reset(CERT_DupCertificate(cert_handle)); 45 cert.reset(CERT_DupCertificate(cert_handle));
46 #else 46 #else
47 SECItem der_cert; 47 SECItem der_cert;
48 std::string der_data; 48 std::string der_data;
49 if (!X509Certificate::GetDEREncoded(cert_handle, &der_data)) 49 if (!X509Certificate::GetDEREncoded(cert_handle, &der_data))
50 return; 50 return;
51 der_cert.data = 51 der_cert.data =
52 reinterpret_cast<unsigned char*>(const_cast<char*>(der_data.data())); 52 reinterpret_cast<unsigned char*>(const_cast<char*>(der_data.data()));
53 der_cert.len = der_data.size(); 53 der_cert.len = der_data.size();
54 54
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if (!match) 608 if (!match)
609 return false; 609 return false;
610 610
611 return GetSCTListFromOCSPExtension(arena.get(), match->single_extensions, 611 return GetSCTListFromOCSPExtension(arena.get(), match->single_extensions,
612 sct_list); 612 sct_list);
613 } 613 }
614 614
615 } // namespace ct 615 } // namespace ct
616 616
617 } // namespace net 617 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | net/cert/ev_root_ca_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698