| Index: net/android/network_library.cc
|
| diff --git a/net/android/network_library.cc b/net/android/network_library.cc
|
| index b53cefe4783cab5bb6f431a5e157414cdec24504..4bf50899720863e9f2b05219d59d8f93221af9c6 100644
|
| --- a/net/android/network_library.cc
|
| +++ b/net/android/network_library.cc
|
| @@ -3,7 +3,6 @@
|
| // found in the LICENSE file.
|
|
|
| #include "net/android/network_library.h"
|
| -
|
| #include "base/android/jni_android.h"
|
| #include "base/android/jni_array.h"
|
| #include "base/android/jni_string.h"
|
| @@ -43,6 +42,21 @@ VerifyResult VerifyX509CertChain(const std::vector<std::string>& cert_chain,
|
| return trusted ? VERIFY_OK : VERIFY_NO_TRUSTED_ROOT;
|
| }
|
|
|
| +void AddLocalRootCertificate(const uint8* cert, size_t len) {
|
| + JNIEnv* env = AttachCurrentThread();
|
| +
|
| + ScopedJavaLocalRef<jbyteArray> cert_array = ToJavaByteArray(env, cert, len);
|
| + DCHECK(!cert_array.is_null());
|
| +
|
| + Java_AndroidNetworkLibrary_addLocalRootCertificate(env, cert_array.obj());
|
| +}
|
| +
|
| +void ClearLocalRootCertificates() {
|
| + JNIEnv* env = AttachCurrentThread();
|
| +
|
| + Java_AndroidNetworkLibrary_clearLocalRootCertificates(env);
|
| +}
|
| +
|
| bool StoreKeyPair(const uint8* public_key,
|
| size_t public_len,
|
| const uint8* private_key,
|
|
|