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

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

Issue 16946002: Resolve certificate references in ONC by PEM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed automation part. Created 7 years, 6 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Does not verify that the certificate is valid, only that the certificate 340 // Does not verify that the certificate is valid, only that the certificate
341 // matches this host. 341 // matches this host.
342 // Returns true if it matches. 342 // Returns true if it matches.
343 bool VerifyNameMatch(const std::string& hostname) const; 343 bool VerifyNameMatch(const std::string& hostname) const;
344 344
345 // Obtains the DER encoded certificate data for |cert_handle|. On success, 345 // Obtains the DER encoded certificate data for |cert_handle|. On success,
346 // returns true and writes the DER encoded certificate to |*der_encoded|. 346 // returns true and writes the DER encoded certificate to |*der_encoded|.
347 static bool GetDEREncoded(OSCertHandle cert_handle, 347 static bool GetDEREncoded(OSCertHandle cert_handle,
348 std::string* der_encoded); 348 std::string* der_encoded);
349 349
350 // Returns the PEM encoded data from an OSCertHandle. If the return value is 350 // Encodes the this certificate (ignoring intermediate certificates stored in
Mattias Nissler (ping if slow) 2013/06/14 12:56:44 remove "the"
pneubeck (no reviews) 2013/06/21 12:53:56 Done.
351 // true, then the PEM encoded certificate is written to |pem_encoded|. 351 // |intermediate_ca_certs_|) as a PEM encoded string. Returns true if the
352 static bool GetPEMEncoded(OSCertHandle cert_handle, 352 // certificates was encoded, storig the result in |*pem_encoded|.
353 std::string* pem_encoded); 353 bool GetPEMEncoded(std::string* pem_encoded) const;
354 354
355 // Encodes the entire certificate chain (this certificate and any 355 // Encodes the entire certificate chain (this certificate and any
356 // intermediate certificates stored in |intermediate_ca_certs_|) as a series 356 // intermediate certificates stored in |intermediate_ca_certs_|) as a series
357 // of PEM encoded strings. Returns true if all certificates were encoded, 357 // of PEM encoded strings. Returns true if all certificates were encoded,
358 // storig the result in |*pem_encoded|, with this certificate stored as 358 // storig the result in |*pem_encoded|, with this certificate stored as
359 // the first element. 359 // the first element.
360 bool GetPEMEncodedChain(std::vector<std::string>* pem_encoded) const; 360 bool GetPEMEncodedChain(std::vector<std::string>* pem_encoded) const;
361 361
362 // Sets |*size_bits| to be the length of the public key in bits, and sets 362 // Sets |*size_bits| to be the length of the public key in bits, and sets
363 // |*type| to one of the |PublicKeyType| values. In case of 363 // |*type| to one of the |PublicKeyType| values. In case of
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // based on the type of the certificate. 498 // based on the type of the certificate.
499 std::string default_nickname_; 499 std::string default_nickname_;
500 #endif 500 #endif
501 501
502 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 502 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
503 }; 503 };
504 504
505 } // namespace net 505 } // namespace net
506 506
507 #endif // NET_CERT_X509_CERTIFICATE_H_ 507 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698