| Index: net/android/network_library.cc
|
| diff --git a/net/android/network_library.cc b/net/android/network_library.cc
|
| index b53cefe4783cab5bb6f431a5e157414cdec24504..ed538a23c1ea833d1fbb26103e84f02d50e07809 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 StoreCertificate(net::CertificateMimeType cert_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_storeCertificate(env,
|
| + GetApplicationContext(), cert_type, data_array.obj());
|
| + LOG_IF(WARNING, !ret) <<
|
| + "Call to Java_AndroidNetworkLibrary_storeCertificate"
|
| + " 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);
|
|
|