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

Unified Diff: net/android/keystore.cc

Issue 365503007: Insulate the legacy Android client auth code from OpenSSL ABI changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mismerge Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/android/keystore.h ('k') | net/android/keystore_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/keystore.cc
diff --git a/net/android/keystore.cc b/net/android/keystore.cc
index de36c95489df6885672bca09012ea15977ab9c94..3a2948a71730b47ec6758ad7d75f478bf903f6a9 100644
--- a/net/android/keystore.cc
+++ b/net/android/keystore.cc
@@ -124,7 +124,7 @@ PrivateKeyType GetPrivateKeyType(jobject private_key_ref) {
return static_cast<PrivateKeyType>(type);
}
-EVP_PKEY* GetOpenSSLSystemHandleForPrivateKey(jobject private_key_ref) {
+AndroidEVP_PKEY* GetOpenSSLSystemHandleForPrivateKey(jobject private_key_ref) {
JNIEnv* env = AttachCurrentThread();
// Note: the pointer is passed as a jint here because that's how it
// is stored in the Java object. Java doesn't have a primitive type
@@ -138,7 +138,18 @@ EVP_PKEY* GetOpenSSLSystemHandleForPrivateKey(jobject private_key_ref) {
env,
GetKeyStore(private_key_ref).obj(),
private_key_ref);
- return reinterpret_cast<EVP_PKEY*>(pkey);
+ return reinterpret_cast<AndroidEVP_PKEY*>(pkey);
+}
+
+ScopedJavaLocalRef<jobject> GetOpenSSLEngineForPrivateKey(
+ jobject private_key_ref) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> engine =
+ Java_AndroidKeyStore_getOpenSSLEngineForPrivateKey(
+ env,
+ GetKeyStore(private_key_ref).obj(),
+ private_key_ref);
+ return engine;
}
void ReleaseKey(jobject private_key_ref) {
« no previous file with comments | « net/android/keystore.h ('k') | net/android/keystore_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698