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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 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 14 matching lines...) Expand all
25 // certificate. 25 // certificate.
26 // 26 //
27 // This class is not thread-safe and should only be used from the network 27 // This class is not thread-safe and should only be used from the network
28 // thread. 28 // thread.
29 class NET_EXPORT OpenSSLClientKeyStore { 29 class NET_EXPORT OpenSSLClientKeyStore {
30 public: 30 public:
31 // Platforms must define this factory function as appropriate. 31 // Platforms must define this factory function as appropriate.
32 static OpenSSLClientKeyStore* GetInstance(); 32 static OpenSSLClientKeyStore* GetInstance();
33 33
34 struct EVP_PKEY_Deleter { 34 struct EVP_PKEY_Deleter {
35 inline void operator()(EVP_PKEY* ptr) const { 35 inline void operator()(EVP_PKEY* ptr) const { EVP_PKEY_free(ptr); }
36 EVP_PKEY_free(ptr);
37 }
38 }; 36 };
39 37
40 typedef scoped_ptr<EVP_PKEY, EVP_PKEY_Deleter> ScopedEVP_PKEY; 38 typedef scoped_ptr<EVP_PKEY, EVP_PKEY_Deleter> ScopedEVP_PKEY;
41 39
42 // Record the association between a certificate and its 40 // Record the association between a certificate and its
43 // private key. This method should be called _before_ 41 // private key. This method should be called _before_
44 // FetchClientCertPrivateKey to ensure that the private key is returned 42 // FetchClientCertPrivateKey to ensure that the private key is returned
45 // when it is called later. The association is recorded in memory 43 // when it is called later. The association is recorded in memory
46 // exclusively. 44 // exclusively.
47 // |cert| is a handle to a certificate object. 45 // |cert| is a handle to a certificate object.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::vector<KeyPair> pairs_; 97 std::vector<KeyPair> pairs_;
100 98
101 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>; 99 friend struct DefaultSingletonTraits<OpenSSLClientKeyStore>;
102 100
103 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore); 101 DISALLOW_COPY_AND_ASSIGN(OpenSSLClientKeyStore);
104 }; 102 };
105 103
106 } // namespace net 104 } // namespace net
107 105
108 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_ 106 #endif // NET_SSL_OPENSSL_CLIENT_KEY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698