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

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

Issue 396803002: Implement TLS client auth in the OS X OpenSSL port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « net/socket/ssl_server_socket_openssl.cc ('k') | net/ssl/openssl_client_key_store.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) 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 NET_EXPORT 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 // |*private_key| will be reset to its matching private key on success. 52 // Returns its matching private key on success, NULL otherwise.
53 // Returns true on success, false otherwise. This increments the reference 53 crypto::ScopedEVP_PKEY FetchClientCertPrivateKey(const X509Certificate* cert);
54 // count of the private key on success.
55 bool FetchClientCertPrivateKey(const X509Certificate* cert,
56 crypto::ScopedEVP_PKEY* private_key);
57 54
58 // Flush all recorded keys. 55 // Flush all recorded keys.
59 void Flush(); 56 void Flush();
60 57
61 protected: 58 protected:
62 OpenSSLClientKeyStore(); 59 OpenSSLClientKeyStore();
63 60
64 ~OpenSSLClientKeyStore(); 61 ~OpenSSLClientKeyStore();
65 62
66 // Adds a given public/private key pair. 63 // Adds a given public/private key pair.
(...skipping 25 matching lines...) Expand all
92 std::vector<KeyPair> pairs_; 89 std::vector<KeyPair> pairs_;
93 90
94 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>; 91 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>;
95 92
96 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore); 93 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore);
97 }; 94 };
98 95
99 } // namespace net 96 } // namespace net
100 97
101 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_ 98 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_openssl.cc ('k') | net/ssl/openssl_client_key_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698