| OLD | NEW |
| 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_util_ios.h" | 5 #include "net/cert/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/cert/x509_certificate.h" | 14 #include "net/cert/x509_certificate.h" |
| 15 #include "net/cert/x509_util_nss.h" | 15 #include "net/cert/x509_util_nss.h" |
| 16 | 16 |
| 17 using base::mac::ScopedCFTypeRef; | 17 using base::ScopedCFTypeRef; |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 namespace x509_util_ios { | 20 namespace x509_util_ios { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 // 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 |
| 25 // size. | 25 // size. |
| 26 CERTCertificate* CreateNSSCertHandleFromBytes(const char* data, | 26 CERTCertificate* CreateNSSCertHandleFromBytes(const char* data, |
| 27 int length) { | 27 int length) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 CERTCertificate* NSSCertChain::cert_handle() const { | 132 CERTCertificate* NSSCertChain::cert_handle() const { |
| 133 return certs_.empty() ? NULL : certs_.front(); | 133 return certs_.empty() ? NULL : certs_.front(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 const std::vector<CERTCertificate*>& NSSCertChain::cert_chain() const { | 136 const std::vector<CERTCertificate*>& NSSCertChain::cert_chain() const { |
| 137 return certs_; | 137 return certs_; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace x509_util_ios | 140 } // namespace x509_util_ios |
| 141 } // namespace net | 141 } // namespace net |
| OLD | NEW |