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

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

Issue 21071: Add X509Certificate::Verify stubs for Mac and Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « net/base/ssl_client_socket_win.cc ('k') | net/base/x509_certificate_mac.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) 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 }; 128 };
129 129
130 // Create an X509Certificate from a handle to the certificate object 130 // Create an X509Certificate from a handle to the certificate object
131 // in the underlying crypto library. This is a transfer of ownership; 131 // in the underlying crypto library. This is a transfer of ownership;
132 // X509Certificate will properly dispose of |cert_handle| for you. 132 // X509Certificate will properly dispose of |cert_handle| for you.
133 // |source| specifies where |cert_handle| comes from. Given two 133 // |source| specifies where |cert_handle| comes from. Given two
134 // certificate handles for the same certificate, our certificate cache 134 // certificate handles for the same certificate, our certificate cache
135 // prefers the handle from the network because our HTTP cache isn't 135 // prefers the handle from the network because our HTTP cache isn't
136 // caching the corresponding intermediate CA certificates yet 136 // caching the corresponding intermediate CA certificates yet
137 // (http://crbug.com/7065). 137 // (http://crbug.com/7065).
138 //
139 // The returned pointer must be stored in a scoped_refptr<X509Certificate>.
138 static X509Certificate* CreateFromHandle(OSCertHandle cert_handle, 140 static X509Certificate* CreateFromHandle(OSCertHandle cert_handle,
139 Source source); 141 Source source);
140 142
141 // Create an X509Certificate from the BER-encoded representation. 143 // Create an X509Certificate from the BER-encoded representation.
142 // Returns NULL on failure. 144 // Returns NULL on failure.
145 //
146 // The returned pointer must be stored in a scoped_refptr<X509Certificate>.
143 static X509Certificate* CreateFromBytes(const char* data, int length); 147 static X509Certificate* CreateFromBytes(const char* data, int length);
144 148
145 // Create an X509Certificate from the representation stored in the given 149 // Create an X509Certificate from the representation stored in the given
146 // pickle. The data for this object is found relative to the given 150 // pickle. The data for this object is found relative to the given
147 // pickle_iter, which should be passed to the pickle's various Read* methods. 151 // pickle_iter, which should be passed to the pickle's various Read* methods.
148 // Returns NULL on failure. 152 // Returns NULL on failure.
153 //
154 // The returned pointer must be stored in a scoped_refptr<X509Certificate>.
149 static X509Certificate* CreateFromPickle(const Pickle& pickle, 155 static X509Certificate* CreateFromPickle(const Pickle& pickle,
150 void** pickle_iter); 156 void** pickle_iter);
151 157
152 // Creates a X509Certificate from the ground up. Used by tests that simulate 158 // Creates a X509Certificate from the ground up. Used by tests that simulate
153 // SSL connections. 159 // SSL connections.
154 X509Certificate(const std::string& subject, const std::string& issuer, 160 X509Certificate(const std::string& subject, const std::string& issuer,
155 base::Time start_date, base::Time expiration_date); 161 base::Time start_date, base::Time expiration_date);
156 162
157 // Appends a representation of this object to the given pickle. 163 // Appends a representation of this object to the given pickle.
158 void Persist(Pickle* pickle); 164 void Persist(Pickle* pickle);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // Where the certificate comes from. 285 // Where the certificate comes from.
280 Source source_; 286 Source source_;
281 287
282 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 288 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
283 }; 289 };
284 290
285 } // namespace net 291 } // namespace net
286 292
287 #endif // NET_BASE_X509_CERTIFICATE_H_ 293 #endif // NET_BASE_X509_CERTIFICATE_H_
288 294
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket_win.cc ('k') | net/base/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698