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

Unified Diff: net/base/cert_database_android.cc

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: separate android and openssl CertDatabase implementations 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/network_library.cc ('k') | net/base/cert_database_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_database_android.cc
diff --git a/net/base/cert_database_openssl.cc b/net/base/cert_database_android.cc
similarity index 54%
copy from net/base/cert_database_openssl.cc
copy to net/base/cert_database_android.cc
index 7459b078c8868a1bcdedd173e00dda15b96aa093..c4410891e5478edcb97db0ad2412793761069b13 100644
--- a/net/base/cert_database_openssl.cc
+++ b/net/base/cert_database_android.cc
@@ -4,14 +4,9 @@
#include "net/base/cert_database.h"
-#include <openssl/x509.h>
-
#include "base/logging.h"
#include "base/observer_list_threadsafe.h"
-#include "net/base/crypto_module.h"
#include "net/base/net_errors.h"
-#include "net/base/openssl_private_key_store.h"
-#include "net/base/x509_certificate.h"
namespace net {
@@ -22,20 +17,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;
-
- return OK;
+ // NOTE: This method shall never be called on Android.
+ //
+ // On other platforms, it is only used by the SSLAddCertHandler class
+ // 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).
+ NOTIMPLEMENTED();
+ return ERR_NOT_IMPLEMENTED;
}
int CertDatabase::AddUserCert(X509Certificate* cert) {
- // TODO(bulach): implement me.
+ // This method is only used by the content SSLAddCertHandler which is
+ // never used on Android.
NOTIMPLEMENTED();
return ERR_NOT_IMPLEMENTED;
}
« no previous file with comments | « net/android/network_library.cc ('k') | net/base/cert_database_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698