OLD | NEW |
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_ANDROID_KEYSTORE_H | 5 #ifndef NET_ANDROID_KEYSTORE_H |
6 #define NET_ANDROID_KEYSTORE_H | 6 #define NET_ANDROID_KEYSTORE_H |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // | 101 // |
102 // |private_key| is a JNI reference for the private key. | 102 // |private_key| is a JNI reference for the private key. |
103 // Returns an EVP_PKEY* handle, or NULL in case of error. | 103 // Returns an EVP_PKEY* handle, or NULL in case of error. |
104 // | 104 // |
105 // Note: Despite its name and return type, this function doesn't know | 105 // Note: Despite its name and return type, this function doesn't know |
106 // anything about OpenSSL, it just type-casts a system pointer that | 106 // anything about OpenSSL, it just type-casts a system pointer that |
107 // is passed as an int through JNI. As such, it never increments | 107 // is passed as an int through JNI. As such, it never increments |
108 // the returned key's reference count. | 108 // the returned key's reference count. |
109 EVP_PKEY* GetOpenSSLSystemHandleForPrivateKey(jobject private_key); | 109 EVP_PKEY* GetOpenSSLSystemHandleForPrivateKey(jobject private_key); |
110 | 110 |
| 111 NET_EXPORT void ReleaseKey(jobject private_key); |
| 112 |
111 // Register JNI methods | 113 // Register JNI methods |
112 NET_EXPORT bool RegisterKeyStore(JNIEnv* env); | 114 NET_EXPORT bool RegisterKeyStore(JNIEnv* env); |
113 | 115 |
114 } // namespace android | 116 } // namespace android |
115 } // namespace net | 117 } // namespace net |
116 | 118 |
117 #endif // NET_ANDROID_KEYSTORE_H | 119 #endif // NET_ANDROID_KEYSTORE_H |
OLD | NEW |