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

Unified Diff: net/android/network_library.cc

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
Index: net/android/network_library.cc
diff --git a/net/android/network_library.cc b/net/android/network_library.cc
index 6a5b592f5e5db81cb1d7c6ffafe3f8146e7b02f4..7d1fc7ae4c4bea62e9c3a8ffb2fdc9b929d10f50 100644
--- a/net/android/network_library.cc
+++ b/net/android/network_library.cc
@@ -59,6 +59,22 @@ bool StoreKeyPair(const uint8* public_key,
return ret;
}
+void StoreCryptoFile(net::CryptoFileType file_type,
+ const void* data,
+ size_t data_len) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jbyteArray> data_array =
+ ToJavaByteArray(env, reinterpret_cast<const uint8*>(data), data_len);
+ jboolean ret = Java_AndroidNetworkLibrary_storeCryptoFile(env,
+ GetApplicationContext(), file_type, data_array.obj());
+ LOG_IF(WARNING, !ret) <<
+ "Call to Java_AndroidNetworkLibrary_storeCryptoFile"
+ " failed";
+ // Intentionally do not return 'ret', there is little the caller can
+ // do in case of failure (the CertInstaller itself will deal with
+ // incorrect data and display the appropriate toast).
+}
+
bool HaveOnlyLoopbackAddresses() {
JNIEnv* env = AttachCurrentThread();
return Java_AndroidNetworkLibrary_haveOnlyLoopbackAddresses(env);

Powered by Google App Engine
This is Rietveld 408576698