summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/android/java/src/org/chromium/net/X509Util.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java
index a50399e..1c0c045 100644
--- a/net/android/java/src/org/chromium/net/X509Util.java
+++ b/net/android/java/src/org/chromium/net/X509Util.java
@@ -150,7 +150,15 @@ public class X509Util {
* TrustManager and that change is shipped to a large majority of Android users.
*/
static boolean verifyKeyUsage(X509Certificate certificate) throws CertificateException {
- List<String> ekuOids = certificate.getExtendedKeyUsage();
+ List<String> ekuOids;
+ try {
+ ekuOids = certificate.getExtendedKeyUsage();
+ } catch (NullPointerException e) {
+ // getExtendedKeyUsage() can crash due to an Android platform bug. This probably
+ // happens when the EKU extension data is malformed so return false here.
+ // See http://crbug.com/233610
+ return false;
+ }
if (ekuOids == null)
return true;