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

Unified Diff: net/android/network_library.h

Issue 11316210: Implement TestRootCerts for Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address Ryan's remarks Created 8 years 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/java/src/org/chromium/net/X509Util.java ('k') | net/android/network_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/network_library.h
diff --git a/net/android/network_library.h b/net/android/network_library.h
index 955603d412cf30c731eca7de0d9d6b42ed32cafc..9db3e0e7ef88decc4e6699e5abc8e0e7b0dac8a6 100644
--- a/net/android/network_library.h
+++ b/net/android/network_library.h
@@ -34,6 +34,13 @@ enum VerifyResult {
VerifyResult VerifyX509CertChain(const std::vector<std::string>& cert_chain,
const std::string& auth_type);
+// Adds a certificate as a root trust certificate to the trust manager.
+// |cert| is DER encoded certificate, |len| is its length in bytes.
+void AddTestRootCertificate(const uint8* cert, size_t len);
+
+// Removes all root certificates added by |AddTestRootCertificate| calls.
+void ClearTestRootCertificates();
+
// Helper for the <keygen> handler. Passes the DER-encoded key pair via
// JNI to the Credentials store. Note that the public key must be a DER
// encoded SubjectPublicKeyInfo (X.509), as returned by i2d_PUBKEY()
« no previous file with comments | « net/android/java/src/org/chromium/net/X509Util.java ('k') | net/android/network_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698