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

Side by Side Diff: net/ssl/openssl_client_key_store.h

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/ssl/default_channel_id_store.cc ('k') | net/test/android/OWNERS » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_SSL_OPENSSL_CLIENT_KEY_STORE_H_ 5 #ifndef NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_
6 #define NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_ 6 #define NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_
7 7
8 #include <openssl/evp.h> 8 #include <openssl/evp.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 // private key. This method should be called _before_ 36 // private key. This method should be called _before_
37 // FetchClientCertPrivateKey to ensure that the private key is returned 37 // FetchClientCertPrivateKey to ensure that the private key is returned
38 // when it is called later. The association is recorded in memory 38 // when it is called later. The association is recorded in memory
39 // exclusively. 39 // exclusively.
40 // |cert| is a handle to a certificate object. 40 // |cert| is a handle to a certificate object.
41 // |private_key| is an OpenSSL EVP_PKEY that corresponds to the 41 // |private_key| is an OpenSSL EVP_PKEY that corresponds to the
42 // certificate's private key. 42 // certificate's private key.
43 // Returns false if an error occured. 43 // Returns false if an error occured.
44 // This function does not take ownership of the private_key, but may 44 // This function does not take ownership of the private_key, but may
45 // increment its internal reference count. 45 // increment its internal reference count.
46 NET_EXPORT bool RecordClientCertPrivateKey(const X509Certificate* cert, 46 bool RecordClientCertPrivateKey(const X509Certificate* cert,
47 EVP_PKEY* private_key); 47 EVP_PKEY* private_key);
48 48
49 // Given a certificate's |public_key|, return the corresponding private 49 // Given a certificate's |public_key|, return the corresponding private
50 // key that has been recorded previously by RecordClientCertPrivateKey(). 50 // key that has been recorded previously by RecordClientCertPrivateKey().
51 // |cert| is a client certificate. 51 // |cert| is a client certificate.
52 // Returns its matching private key on success, NULL otherwise. 52 // Returns its matching private key on success, NULL otherwise.
53 crypto::ScopedEVP_PKEY FetchClientCertPrivateKey(const X509Certificate* cert); 53 crypto::ScopedEVP_PKEY FetchClientCertPrivateKey(const X509Certificate* cert);
54 54
55 // Flush all recorded keys. 55 // Flush all recorded keys.
56 void Flush(); 56 void Flush();
57 57
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 std::vector<KeyPair> pairs_; 91 std::vector<KeyPair> pairs_;
92 92
93 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>; 93 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>;
94 94
95 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore); 95 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore);
96 }; 96 };
97 97
98 } // namespace net 98 } // namespace net
99 99
100 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_ 100 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_
OLDNEW
« no previous file with comments | « net/ssl/default_channel_id_store.cc ('k') | net/test/android/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698