summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2010-01-20 09:56:01 -0800
committerMakoto Onuki <omakoto@google.com>2010-01-20 09:58:42 -0800
commit2683c6f72cb4256f7850bc17d5b2ed4e619c0c6d (patch)
treecaa30f58a40a5ee928e2f0c4ddc53b8600b8bcff /common
parentd738a4d3942ebf56a34d37772228014ec5c2fbdd (diff)
downloadframeworks_base-2683c6f72cb4256f7850bc17d5b2ed4e619c0c6d.zip
frameworks_base-2683c6f72cb4256f7850bc17d5b2ed4e619c0c6d.tar.gz
frameworks_base-2683c6f72cb4256f7850bc17d5b2ed4e619c0c6d.tar.bz2
DomainNameValiator: Remove workaround
Remove the workaround introduced in CL 68137-p9. Validation should fail when a certification can't be parsed. Bug: 2369689
Diffstat (limited to 'common')
-rw-r--r--common/java/com/android/common/DomainNameValidator.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/common/java/com/android/common/DomainNameValidator.java b/common/java/com/android/common/DomainNameValidator.java
index 7d58ddf..25dc007 100644
--- a/common/java/com/android/common/DomainNameValidator.java
+++ b/common/java/com/android/common/DomainNameValidator.java
@@ -166,22 +166,13 @@ public class DomainNameValidator {
}
}
} catch (CertificateParsingException e) {
- // TODO figure out if this comment is still true
- // i.e. In what condition do we this exception with a valid certificate?
-
- // one way we can get here is if an alternative name starts with
- // '*' character, which is contrary to one interpretation of the
- // spec (a valid DNS name must start with a letter); there is no
- // good way around this, and in order to be compatible we proceed
- // to check the common name (ie, ignore alternative names)
- if (LOG_ENABLED) {
- String errorMessage = e.getMessage();
- if (errorMessage == null) {
- errorMessage = "failed to parse certificate";
- }
-
- Log.v(TAG, "DomainNameValidator.matchDns(): " + errorMessage);
+ String errorMessage = e.getMessage();
+ if (errorMessage == null) {
+ errorMessage = "failed to parse certificate";
}
+
+ Log.w(TAG, "DomainNameValidator.matchDns(): " + errorMessage);
+ return false;
}
if (!hasDns) {