| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <string.h> | 9 #include <string.h> | 
| 10 | 10 | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 29 // Forward declaration; real one in <x509.h> | 29 // Forward declaration; real one in <x509.h> | 
| 30 struct x509_st; | 30 struct x509_st; | 
| 31 typedef struct x509_store_st X509_STORE; | 31 typedef struct x509_store_st X509_STORE; | 
| 32 #elif defined(USE_NSS) | 32 #elif defined(USE_NSS) | 
| 33 // Forward declaration; real one in <cert.h> | 33 // Forward declaration; real one in <cert.h> | 
| 34 struct CERTCertificateStr; | 34 struct CERTCertificateStr; | 
| 35 #endif | 35 #endif | 
| 36 | 36 | 
| 37 class Pickle; | 37 class Pickle; | 
| 38 | 38 | 
| 39 namespace base { | 39 namespace crypto { | 
| 40 class StringPiece; | 40 class StringPiece; | 
| 41 class RSAPrivateKey; | 41 class RSAPrivateKey; | 
| 42 }  // namespace base | 42 }  // namespace crypto | 
| 43 | 43 | 
| 44 namespace net { | 44 namespace net { | 
| 45 | 45 | 
| 46 class CertVerifyResult; | 46 class CertVerifyResult; | 
| 47 | 47 | 
| 48 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; | 48 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; | 
| 49 | 49 | 
| 50 // X509Certificate represents an X.509 certificate used by SSL. | 50 // X509Certificate represents an X.509 certificate used by SSL. | 
| 51 class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> { | 51 class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> { | 
| 52  public: | 52  public: | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169   // CN=Michael Wong,O=FooBar Corporation,DC=foobar,DC=com | 169   // CN=Michael Wong,O=FooBar Corporation,DC=foobar,DC=com | 
| 170   // | 170   // | 
| 171   // SECURITY WARNING | 171   // SECURITY WARNING | 
| 172   // | 172   // | 
| 173   // Using self-signed certificates has the following security risks: | 173   // Using self-signed certificates has the following security risks: | 
| 174   // 1. Encryption without authentication and thus vulnerable to | 174   // 1. Encryption without authentication and thus vulnerable to | 
| 175   //    man-in-the-middle attacks. | 175   //    man-in-the-middle attacks. | 
| 176   // 2. Self-signed certificates cannot be revoked. | 176   // 2. Self-signed certificates cannot be revoked. | 
| 177   // | 177   // | 
| 178   // Use this certificate only after the above risks are acknowledged. | 178   // Use this certificate only after the above risks are acknowledged. | 
| 179   static X509Certificate* CreateSelfSigned(base::RSAPrivateKey* key, | 179   static X509Certificate* CreateSelfSigned(crypto::RSAPrivateKey* key, | 
| 180                                            const std::string& subject, | 180                                            const std::string& subject, | 
| 181                                            uint32 serial_number, | 181                                            uint32 serial_number, | 
| 182                                            base::TimeDelta valid_duration); | 182                                            base::TimeDelta valid_duration); | 
| 183 | 183 | 
| 184   // Appends a representation of this object to the given pickle. | 184   // Appends a representation of this object to the given pickle. | 
| 185   void Persist(Pickle* pickle); | 185   void Persist(Pickle* pickle); | 
| 186 | 186 | 
| 187   // The subject of the certificate.  For HTTPS server certificates, this | 187   // The subject of the certificate.  For HTTPS server certificates, this | 
| 188   // represents the web server.  The common name of the subject should match | 188   // represents the web server.  The common name of the subject should match | 
| 189   // the host name of the web server. | 189   // the host name of the web server. | 
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 422 | 422 | 
| 423   // Where the certificate comes from. | 423   // Where the certificate comes from. | 
| 424   Source source_; | 424   Source source_; | 
| 425 | 425 | 
| 426   DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 426   DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 
| 427 }; | 427 }; | 
| 428 | 428 | 
| 429 }  // namespace net | 429 }  // namespace net | 
| 430 | 430 | 
| 431 #endif  // NET_BASE_X509_CERTIFICATE_H_ | 431 #endif  // NET_BASE_X509_CERTIFICATE_H_ | 
| OLD | NEW | 
|---|