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

Side by Side Diff: net/cert/x509_certificate.h

Issue 376753002: Fix webui cert viewer showing wrong cert chain on NSS and no chain on OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | Annotate | Revision Log
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 #ifndef NET_CERT_X509_CERTIFICATE_H_ 5 #ifndef NET_CERT_X509_CERTIFICATE_H_
6 #define NET_CERT_X509_CERTIFICATE_H_ 6 #define NET_CERT_X509_CERTIFICATE_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Returns true if this object and |other| represent the same certificate. 242 // Returns true if this object and |other| represent the same certificate.
243 bool Equals(const X509Certificate* other) const; 243 bool Equals(const X509Certificate* other) const;
244 244
245 // Returns intermediate certificates added via AddIntermediateCertificate(). 245 // Returns intermediate certificates added via AddIntermediateCertificate().
246 // Ownership follows the "get" rule: it is the caller's responsibility to 246 // Ownership follows the "get" rule: it is the caller's responsibility to
247 // retain the elements of the result. 247 // retain the elements of the result.
248 const OSCertHandles& GetIntermediateCertificates() const { 248 const OSCertHandles& GetIntermediateCertificates() const {
249 return intermediate_ca_certs_; 249 return intermediate_ca_certs_;
250 } 250 }
251 251
252 // Convenience method that fills |cert_chain| with the os_cert_handle()
253 // followed by GetIntermediateCertificates(). Ownership follows the "get"
254 // rule: it is the caller's responsibility to retain the elements of the
255 // result.
256 void GetCertificateChain(OSCertHandles* cert_chain) const;
Ryan Sleevi 2014/07/11 22:55:49 I realize you added this based on msw's comments,
msw 2014/07/11 23:01:15 I'll defer to you, my concern was duplicated code,
257
252 #if defined(OS_MACOSX) 258 #if defined(OS_MACOSX)
253 // Does this certificate's usage allow SSL client authentication? 259 // Does this certificate's usage allow SSL client authentication?
254 bool SupportsSSLClientAuth() const; 260 bool SupportsSSLClientAuth() const;
255 261
256 // Returns a new CFArrayRef containing this certificate and its intermediate 262 // Returns a new CFArrayRef containing this certificate and its intermediate
257 // certificates in the form expected by Security.framework and Keychain 263 // certificates in the form expected by Security.framework and Keychain
258 // Services, or NULL on failure. 264 // Services, or NULL on failure.
259 // The first item in the array will be this certificate, followed by its 265 // The first item in the array will be this certificate, followed by its
260 // intermediates, if any. 266 // intermediates, if any.
261 CFArrayRef CreateOSCertChainForCert() const; 267 CFArrayRef CreateOSCertChainForCert() const;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 // based on the type of the certificate. 491 // based on the type of the certificate.
486 std::string default_nickname_; 492 std::string default_nickname_;
487 #endif 493 #endif
488 494
489 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 495 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
490 }; 496 };
491 497
492 } // namespace net 498 } // namespace net
493 499
494 #endif // NET_CERT_X509_CERTIFICATE_H_ 500 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698