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

Unified Diff: net/base/cert_database_openssl.cc

Issue 11031043: Fix handling of user and CA certificates 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
« no previous file with comments | « net/android/network_library.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_database_openssl.cc
diff --git a/net/base/cert_database_openssl.cc b/net/base/cert_database_openssl.cc
index 7459b078c8868a1bcdedd173e00dda15b96aa093..4e61f6182d35da5b8811abe2447606f738823087 100644
--- a/net/base/cert_database_openssl.cc
+++ b/net/base/cert_database_openssl.cc
@@ -21,21 +21,21 @@ CertDatabase::CertDatabase()
CertDatabase::~CertDatabase() {}
-int CertDatabase::CheckUserCert(X509Certificate* cert) {
- if (!cert)
- return ERR_CERT_INVALID;
- if (cert->HasExpired())
- return ERR_CERT_DATE_INVALID;
-
- if (!OpenSSLPrivateKeyStore::GetInstance()->FetchPrivateKey(
- X509_PUBKEY_get(X509_get_X509_PUBKEY(cert->os_cert_handle()))))
- return ERR_NO_PRIVATE_KEY_FOR_CERT;
+// NOTE: On Android, these two methods should _never_ be called.
+//
+// They are only used by the SSLAddCertHandler class on other platforms,
+// to handle veritication and installation of downloaded certificates.
+//
+// On Android, the certificate data is passed directly to the system's
+// CertInstaller activity, which handles verification, naming,
+// installation and UI (for success/failure).
- return OK;
+int CertDatabase::CheckUserCert(X509Certificate* cert) {
+ NOTIMPLEMENTED();
+ return ERR_NOT_IMPLEMENTED;
}
int CertDatabase::AddUserCert(X509Certificate* cert) {
- // TODO(bulach): implement me.
NOTIMPLEMENTED();
return ERR_NOT_IMPLEMENTED;
}
« no previous file with comments | « net/android/network_library.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698