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

Side by Side Diff: net/base/x509_util_ios.cc

Issue 11579002: Add X509Certificate::IsIssuedByEncoded() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add X509CertificateTest.IsIssuedByEncoded unit test Created 7 years, 11 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
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/base/x509_util_ios.h" 5 #include "net/base/x509_util_ios.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <CommonCrypto/CommonDigest.h> 8 #include <CommonCrypto/CommonDigest.h>
9 #include <nss.h> 9 #include <nss.h>
10 #include <prtypes.h> 10 #include <prtypes.h>
11 11
12 #include "base/mac/scoped_cftyperef.h" 12 #include "base/mac/scoped_cftyperef.h"
13 #include "crypto/nss_util.h" 13 #include "crypto/nss_util.h"
14 #include "net/base/x509_certificate.h" 14 #include "net/base/x509_certificate.h"
15 #include "net/base/x509_util_nss.h"
15 16
16 using base::mac::ScopedCFTypeRef; 17 using base::mac::ScopedCFTypeRef;
17 18
18 namespace net { 19 namespace net {
19 namespace x509_util_ios { 20 namespace x509_util_ios {
20 21
21 namespace { 22 namespace {
22 23
23 // Creates an NSS certificate handle from |data|, which is |length| bytes in 24 // Creates an NSS certificate handle from |data|, which is |length| bytes in
24 // size. 25 // size.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 NSSCertChain::~NSSCertChain() { 127 NSSCertChain::~NSSCertChain() {
127 for (size_t i = 0; i < certs_.size(); ++i) 128 for (size_t i = 0; i < certs_.size(); ++i)
128 CERT_DestroyCertificate(certs_[i]); 129 CERT_DestroyCertificate(certs_[i]);
129 } 130 }
130 131
131 CERTCertificate* NSSCertChain::cert_handle() const { 132 CERTCertificate* NSSCertChain::cert_handle() const {
132 return certs_.empty() ? NULL : certs_.front(); 133 return certs_.empty() ? NULL : certs_.front();
133 } 134 }
134 135
136 const std::vector<CERTCertificate*>& NSSCertChain::cert_chain() const {
137 return certs_;
138 }
139
135 } // namespace x509_util_ios 140 } // namespace x509_util_ios
136 } // namespace net 141 } // namespace net
137
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698