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

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

Issue 174102: Enable SSLClientSocketTest unit tests on Mac OS X by implementing our own cer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « no previous file | net/base/x509_certificate.cc » ('j') | net/base/x509_certificate_mac.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_BASE_X509_CERTIFICATE_H_ 5 #ifndef NET_BASE_X509_CERTIFICATE_H_
6 #define NET_BASE_X509_CERTIFICATE_H_ 6 #define NET_BASE_X509_CERTIFICATE_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1 202 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1
203 // Server Identity, if the certificate has a subjectAltName extension of 203 // Server Identity, if the certificate has a subjectAltName extension of
204 // type dNSName, this method gets the DNS names in that extension. 204 // type dNSName, this method gets the DNS names in that extension.
205 // Otherwise, it gets the common name in the subject field. 205 // Otherwise, it gets the common name in the subject field.
206 void GetDNSNames(std::vector<std::string>* dns_names) const; 206 void GetDNSNames(std::vector<std::string>* dns_names) const;
207 207
208 // Convenience method that returns whether this certificate has expired as of 208 // Convenience method that returns whether this certificate has expired as of
209 // now. 209 // now.
210 bool HasExpired() const; 210 bool HasExpired() const;
211 211
212 #if defined(OS_MACOSX)
213 // Adds an untrusted intermediate certificate that may be needed for
wtc 2009/08/27 00:14:18 Nit: Fix indentation.
214 // chain building.
215 void AddIntermediateCertificate(SecCertificateRef cert);
216 #endif
217
212 // Verifies the certificate against the given hostname. Returns OK if 218 // Verifies the certificate against the given hostname. Returns OK if
213 // successful or an error code upon failure. 219 // successful or an error code upon failure.
214 // 220 //
215 // The |*verify_result| structure, including the |verify_result->cert_status| 221 // The |*verify_result| structure, including the |verify_result->cert_status|
216 // bitmask, is always filled out regardless of the return value. If the 222 // bitmask, is always filled out regardless of the return value. If the
217 // certificate has multiple errors, the corresponding status flags are set in 223 // certificate has multiple errors, the corresponding status flags are set in
218 // |verify_result->cert_status|, and the error code for the most serious 224 // |verify_result->cert_status|, and the error code for the most serious
219 // error is returned. 225 // error is returned.
220 // 226 //
221 // |flags| is bitwise OR'd of VerifyFlags. 227 // |flags| is bitwise OR'd of VerifyFlags.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 298
293 // This certificate is not valid after |valid_expiry_| 299 // This certificate is not valid after |valid_expiry_|
294 base::Time valid_expiry_; 300 base::Time valid_expiry_;
295 301
296 // The fingerprint of this certificate. 302 // The fingerprint of this certificate.
297 Fingerprint fingerprint_; 303 Fingerprint fingerprint_;
298 304
299 // A handle to the certificate object in the underlying crypto library. 305 // A handle to the certificate object in the underlying crypto library.
300 OSCertHandle cert_handle_; 306 OSCertHandle cert_handle_;
301 307
308 #if defined(OS_MACOSX)
309 // Untrusted intermediate certificates associated with this certificate
310 // that may be needed for chain building.
311 CFMutableArrayRef intermediate_ca_certs_;
wtc 2009/08/27 00:14:18 intermediate_certs_ is fine. I found that Mac OS
312 #endif
313
302 // Where the certificate comes from. 314 // Where the certificate comes from.
303 Source source_; 315 Source source_;
304 316
305 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 317 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
306 }; 318 };
307 319
308 } // namespace net 320 } // namespace net
309 321
310 #endif // NET_BASE_X509_CERTIFICATE_H_ 322 #endif // NET_BASE_X509_CERTIFICATE_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/x509_certificate.cc » ('j') | net/base/x509_certificate_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698