summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorHuahui Wu <hwu@google.com>2011-06-28 10:10:07 -0700
committerHuahui Wu <hwu@google.com>2011-06-28 10:10:07 -0700
commit2e029c67a8e893e91600df989bbb42272d82af21 (patch)
tree9ba5b24136d7c1318a648a9144a723493ecd5b34 /core
parent3015516a4611db23ce56ae057d281c9328cfdf24 (diff)
downloadframeworks_base-2e029c67a8e893e91600df989bbb42272d82af21.zip
frameworks_base-2e029c67a8e893e91600df989bbb42272d82af21.tar.gz
frameworks_base-2e029c67a8e893e91600df989bbb42272d82af21.tar.bz2
Revert "Gets the URL that has a cert error and carrys it in SslError."
This reverts commit 3015516a4611db23ce56ae057d281c9328cfdf24.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/net/http/SslError.java68
-rw-r--r--core/java/android/webkit/BrowserFrame.java5
2 files changed, 5 insertions, 68 deletions
diff --git a/core/java/android/net/http/SslError.java b/core/java/android/net/http/SslError.java
index 1e1cb49..e1b9deb 100644
--- a/core/java/android/net/http/SslError.java
+++ b/core/java/android/net/http/SslError.java
@@ -59,97 +59,36 @@ public class SslError {
/**
* The SSL certificate associated with the error set
*/
- final SslCertificate mCertificate;
-
- /**
- * The URL associated with the error set.
- */
- final String mUrl;
+ SslCertificate mCertificate;
/**
* Creates a new SSL error set object
* @param error The SSL error
* @param certificate The associated SSL certificate
- * @deprecated Use {@link #SslError(int, SslCertificate, String)}
*/
- @Deprecated
public SslError(int error, SslCertificate certificate) {
addError(error);
- if (certificate == null) {
- throw new NullPointerException("certificate is null.");
- }
mCertificate = certificate;
- mUrl = "";
}
/**
* Creates a new SSL error set object
* @param error The SSL error
* @param certificate The associated SSL certificate
- * @deprecated Use {@link #SslError(int, X509Certificate, String)}
*/
- @Deprecated
public SslError(int error, X509Certificate certificate) {
addError(error);
- if (certificate == null) {
- throw new NullPointerException("certificate is null.");
- }
mCertificate = new SslCertificate(certificate);
- mUrl = "";
}
/**
- * Creates a new SSL error set object
- * @param error The SSL error
- * @param certificate The associated SSL certificate
- * @param url The associated URL.
- */
- public SslError(int error, SslCertificate certificate, String url) {
- addError(error);
- if (certificate == null) {
- throw new NullPointerException("certificate is null.");
- }
- mCertificate = certificate;
- if (url == null) {
- throw new NullPointerException("url is null.");
- }
- mUrl = url;
- }
-
- /**
- * Creates a new SSL error set object
- * @param error The SSL error
- * @param certificate The associated SSL certificate
- * @param url The associated URL.
- */
- public SslError(int error, X509Certificate certificate, String url) {
- addError(error);
- if (certificate == null) {
- throw new NullPointerException("certificate is null.");
- }
- mCertificate = new SslCertificate(certificate);
- if (url == null) {
- throw new NullPointerException("url is null.");
- }
- mUrl = url;
- }
-
- /**
- * @return The SSL certificate associated with the error set, non-null.
+ * @return The SSL certificate associated with the error set
*/
public SslCertificate getCertificate() {
return mCertificate;
}
/**
- * @return The URL associated with the error set, non-null.
- * "" if one of the deprecated constructors is used.
- */
- public String getUrl() {
- return mUrl;
- }
-
- /**
* Adds the SSL error to the error set
* @param error The SSL error to add
* @return True iff the error being added is a known SSL error
@@ -198,7 +137,6 @@ public class SslError {
*/
public String toString() {
return "primary error: " + getPrimaryError() +
- " certificate: " + getCertificate() +
- " on URL: " + getUrl();
+ " certificate: " + getCertificate();
}
}
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index 79a5aff..2f4774f 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -1150,12 +1150,11 @@ class BrowserFrame extends Handler {
* {@link #nativeSslCertErrorProceed(int)} or
* {@link #nativeSslCertErrorCancel(int, int)}.
*/
- private void reportSslCertError(
- final int handle, final int cert_error, byte cert_der[], String url) {
+ private void reportSslCertError(final int handle, final int cert_error, byte cert_der[]) {
final SslError ssl_error;
try {
X509Certificate cert = new X509CertImpl(cert_der);
- ssl_error = new SslError(cert_error, cert, url);
+ ssl_error = new SslError(cert_error, cert);
} catch (IOException e) {
// Can't get the certificate, not much to do.
Log.e(LOGTAG, "Can't get the certificate from WebKit, canceling");