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

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

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
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
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 RSAPrivateKey; 40 class RSAPrivateKey;
41 } // namespace base 41 } // namespace base
wtc 2011/04/07 05:35:53 base => crypto
42 42
43 namespace net { 43 namespace net {
44 44
45 class CertVerifyResult; 45 class CertVerifyResult;
46 46
47 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; 47 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
48 48
49 // X509Certificate represents an X.509 certificate used by SSL. 49 // X509Certificate represents an X.509 certificate used by SSL.
50 class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> { 50 class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
51 public: 51 public:
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // CN=Michael Wong,O=FooBar Corporation,DC=foobar,DC=com 168 // CN=Michael Wong,O=FooBar Corporation,DC=foobar,DC=com
169 // 169 //
170 // SECURUITY WARNING 170 // SECURUITY WARNING
171 // 171 //
172 // Using self-signed certificates has the following security risks: 172 // Using self-signed certificates has the following security risks:
173 // 1. Encryption without authentication and thus vulnerable to 173 // 1. Encryption without authentication and thus vulnerable to
174 // man-in-the-middle attacks. 174 // man-in-the-middle attacks.
175 // 2. Self-signed certificates cannot be revoked. 175 // 2. Self-signed certificates cannot be revoked.
176 // 176 //
177 // Use this certificate only after the above risks are acknowledged. 177 // Use this certificate only after the above risks are acknowledged.
178 static X509Certificate* CreateSelfSigned(base::RSAPrivateKey* key, 178 static X509Certificate* CreateSelfSigned(crypto::RSAPrivateKey* key,
179 const std::string& subject, 179 const std::string& subject,
180 uint32 serial_number, 180 uint32 serial_number,
181 base::TimeDelta valid_duration); 181 base::TimeDelta valid_duration);
182 182
183 // Appends a representation of this object to the given pickle. 183 // Appends a representation of this object to the given pickle.
184 void Persist(Pickle* pickle); 184 void Persist(Pickle* pickle);
185 185
186 // The subject of the certificate. For HTTPS server certificates, this 186 // The subject of the certificate. For HTTPS server certificates, this
187 // represents the web server. The common name of the subject should match 187 // represents the web server. The common name of the subject should match
188 // the host name of the web server. 188 // the host name of the web server.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 // Where the certificate comes from. 412 // Where the certificate comes from.
413 Source source_; 413 Source source_;
414 414
415 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 415 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
416 }; 416 };
417 417
418 } // namespace net 418 } // namespace net
419 419
420 #endif // NET_BASE_X509_CERTIFICATE_H_ 420 #endif // NET_BASE_X509_CERTIFICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698