diff options
author | Marco Nelissen <marcone@google.com> | 2009-05-14 14:45:51 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2009-05-14 14:57:55 -0700 |
commit | 3537506c883cdf4f4b792590abb5a8acb937503a (patch) | |
tree | 01da8ecaaf53fb50639e306e0b476c3d43efe274 /core | |
parent | 94f70cbbe29c3aca748df9d543c366d838f6598b (diff) | |
download | frameworks_base-3537506c883cdf4f4b792590abb5a8acb937503a.zip frameworks_base-3537506c883cdf4f4b792590abb5a8acb937503a.tar.gz frameworks_base-3537506c883cdf4f4b792590abb5a8acb937503a.tar.bz2 |
Rework some code so that it works the way it was supposed to work.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/net/http/CertificateValidatorCache.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/net/http/CertificateValidatorCache.java b/core/java/android/net/http/CertificateValidatorCache.java index 54a1dbe..47661d5 100644 --- a/core/java/android/net/http/CertificateValidatorCache.java +++ b/core/java/android/net/http/CertificateValidatorCache.java @@ -236,15 +236,17 @@ class CertificateValidatorCache { } } - int hashLength = secureHash.length; - if (secureHash != null && 0 < hashLength) { - if (hashLength == mHash.length) { - for (int i = 0; i < hashLength; ++i) { - if (secureHash[i] != mHash[i]) { - return false; + if (secureHash != null) { + int hashLength = secureHash.length; + if (0 < hashLength) { + if (hashLength == mHash.length) { + for (int i = 0; i < hashLength; ++i) { + if (secureHash[i] != mHash[i]) { + return false; + } } + return true; } - return true; } } |