| 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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
| 6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
| 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
| 8 | 8 |
| 9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
| 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 // chain to be a copy of the chain stored in |nss_fd|. | 323 // chain to be a copy of the chain stored in |nss_fd|. |
| 324 // If |nss_fd| is NULL, then the current certificate chain will be freed. | 324 // If |nss_fd| is NULL, then the current certificate chain will be freed. |
| 325 void Reset(PRFileDesc* nss_fd); | 325 void Reset(PRFileDesc* nss_fd); |
| 326 | 326 |
| 327 // Returns the current certificate chain as a vector of DER-encoded | 327 // Returns the current certificate chain as a vector of DER-encoded |
| 328 // base::StringPieces. The returned vector remains valid until Reset is | 328 // base::StringPieces. The returned vector remains valid until Reset is |
| 329 // called. | 329 // called. |
| 330 std::vector<base::StringPiece> AsStringPieceVector() const; | 330 std::vector<base::StringPiece> AsStringPieceVector() const; |
| 331 | 331 |
| 332 bool empty() const { return certs_.empty(); } | 332 bool empty() const { return certs_.empty(); } |
| 333 size_t size() const { return certs_.size(); } | |
| 334 | 333 |
| 335 CERTCertificate* operator[](size_t index) const { | 334 CERTCertificate* operator[](size_t index) const { |
| 336 DCHECK_LT(index, certs_.size()); | 335 DCHECK_LT(index, certs_.size()); |
| 337 return certs_[index]; | 336 return certs_[index]; |
| 338 } | 337 } |
| 339 | 338 |
| 340 private: | 339 private: |
| 341 std::vector<CERTCertificate*> certs_; | 340 std::vector<CERTCertificate*> certs_; |
| 342 }; | 341 }; |
| 343 | 342 |
| (...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3592 scoped_refptr<X509Certificate> | 3591 scoped_refptr<X509Certificate> |
| 3593 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { | 3592 SSLClientSocketNSS::GetUnverifiedServerCertificateChain() const { |
| 3594 return core_->state().server_cert.get(); | 3593 return core_->state().server_cert.get(); |
| 3595 } | 3594 } |
| 3596 | 3595 |
| 3597 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { | 3596 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { |
| 3598 return server_bound_cert_service_; | 3597 return server_bound_cert_service_; |
| 3599 } | 3598 } |
| 3600 | 3599 |
| 3601 } // namespace net | 3600 } // namespace net |
| OLD | NEW |