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

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

Issue 2758803003: Make X509Certificate creation fail if X509Certificate::Initialize fails. (Closed)
Patch Set: test updatess 2 Created 3 years, 8 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
« no previous file with comments | « no previous file | net/cert/x509_certificate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); 382 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers);
383 383
384 // Construct an X509Certificate from a handle to the certificate object 384 // Construct an X509Certificate from a handle to the certificate object
385 // in the underlying crypto library. 385 // in the underlying crypto library.
386 X509Certificate(OSCertHandle cert_handle, 386 X509Certificate(OSCertHandle cert_handle,
387 const OSCertHandles& intermediates); 387 const OSCertHandles& intermediates);
388 388
389 ~X509Certificate(); 389 ~X509Certificate();
390 390
391 // Common object initialization code. Called by the constructors only. 391 // Common object initialization code. Called by the constructors only.
392 void Initialize(); 392 bool Initialize();
393 393
394 #if defined(USE_OPENSSL_CERTS) 394 #if defined(USE_OPENSSL_CERTS)
395 // Resets the store returned by cert_store() to default state. Used by 395 // Resets the store returned by cert_store() to default state. Used by
396 // TestRootCerts to undo modifications. 396 // TestRootCerts to undo modifications.
397 static void ResetCertStore(); 397 static void ResetCertStore();
398 #endif 398 #endif
399 399
400 // Verifies that |hostname| matches one of the certificate names or IP 400 // Verifies that |hostname| matches one of the certificate names or IP
401 // addresses supplied, based on TLS name matching rules - specifically, 401 // addresses supplied, based on TLS name matching rules - specifically,
402 // following http://tools.ietf.org/html/rfc6125. 402 // following http://tools.ietf.org/html/rfc6125.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // Untrusted intermediate certificates associated with this certificate 451 // Untrusted intermediate certificates associated with this certificate
452 // that may be needed for chain building. 452 // that may be needed for chain building.
453 OSCertHandles intermediate_ca_certs_; 453 OSCertHandles intermediate_ca_certs_;
454 454
455 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 455 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
456 }; 456 };
457 457
458 } // namespace net 458 } // namespace net
459 459
460 #endif // NET_CERT_X509_CERTIFICATE_H_ 460 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW
« no previous file with comments | « no previous file | net/cert/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698