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

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

Issue 7538029: Upstream certificate and mime Android implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS Created 9 years, 4 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Returns a handle to a global, in-memory certificate store. We use it for 288 // Returns a handle to a global, in-memory certificate store. We use it for
289 // two purposes: 289 // two purposes:
290 // 1. Import server certificates into this store so that we can verify and 290 // 1. Import server certificates into this store so that we can verify and
291 // display the certificates using CryptoAPI. 291 // display the certificates using CryptoAPI.
292 // 2. Copy client certificates from the "MY" system certificate store into 292 // 2. Copy client certificates from the "MY" system certificate store into
293 // this store so that we can close the system store when we finish 293 // this store so that we can close the system store when we finish
294 // searching for client certificates. 294 // searching for client certificates.
295 static HCERTSTORE cert_store(); 295 static HCERTSTORE cert_store();
296 #endif 296 #endif
297 297
298 #if defined(OS_ANDROID)
299 // |chain| will contain the chain (including this certificate) encoded using
300 // GetDEREncodedBytes below.
wtc 2011/08/09 18:47:22 |chain| => |chain_bytes| GetDEREncodedBytes => Ge
michaelbai 2011/08/11 16:10:18 Done.
301 void GetChainDEREncodedBytes(std::vector<std::string>* chain_bytes) const;
302 #endif
303
298 #if defined(USE_OPENSSL) 304 #if defined(USE_OPENSSL)
299 // Returns a handle to a global, in-memory certificate store. We 305 // Returns a handle to a global, in-memory certificate store. We
300 // use it for test code, e.g. importing the test server's certificate. 306 // use it for test code, e.g. importing the test server's certificate.
301 static X509_STORE* cert_store(); 307 static X509_STORE* cert_store();
302 #endif 308 #endif
303 309
304 // Verifies the certificate against the given hostname. Returns OK if 310 // Verifies the certificate against the given hostname. Returns OK if
305 // successful or an error code upon failure. 311 // successful or an error code upon failure.
306 // 312 //
307 // The |*verify_result| structure, including the |verify_result->cert_status| 313 // The |*verify_result| structure, including the |verify_result->cert_status|
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // (Marked mutable because it's used in a const method.) 475 // (Marked mutable because it's used in a const method.)
470 mutable base::Lock verification_lock_; 476 mutable base::Lock verification_lock_;
471 #endif 477 #endif
472 478
473 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 479 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
474 }; 480 };
475 481
476 } // namespace net 482 } // namespace net
477 483
478 #endif // NET_BASE_X509_CERTIFICATE_H_ 484 #endif // NET_BASE_X509_CERTIFICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698