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

Unified Diff: net/android/java/src/org/chromium/net/X509Util.java

Issue 599493004: Use the new java_cpp_enum rule in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more aosp fix Created 6 years, 3 months 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/java/src/org/chromium/net/AndroidNetworkLibrary.java ('k') | net/android/keystore.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/java/src/org/chromium/net/X509Util.java
diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java
index 00a24e41016466418e13d21607923aa716826754..35ebdb7e983a08b463bd520c2e239857f90a6083 100644
--- a/net/android/java/src/org/chromium/net/X509Util.java
+++ b/net/android/java/src/org/chromium/net/X509Util.java
@@ -433,7 +433,7 @@ public class X509Util {
try {
ensureInitialized();
} catch (CertificateException e) {
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_FAILED);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
}
X509Certificate[] serverCertificates = new X509Certificate[certChain.length];
@@ -442,7 +442,7 @@ public class X509Util {
serverCertificates[i] = createCertificateFromBytes(certChain[i]);
}
} catch (CertificateException e) {
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_UNABLE_TO_PARSE);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.UNABLE_TO_PARSE);
}
// Expired and not yet valid certificates would be rejected by the trust managers, but the
@@ -453,20 +453,20 @@ public class X509Util {
serverCertificates[0].checkValidity();
if (!verifyKeyUsage(serverCertificates[0])) {
return new AndroidCertVerifyResult(
- CertVerifyStatusAndroid.VERIFY_INCORRECT_KEY_USAGE);
+ CertVerifyStatusAndroid.INCORRECT_KEY_USAGE);
}
} catch (CertificateExpiredException e) {
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_EXPIRED);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.EXPIRED);
} catch (CertificateNotYetValidException e) {
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_NOT_YET_VALID);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.NOT_YET_VALID);
} catch (CertificateException e) {
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_FAILED);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
}
synchronized (sLock) {
// If no trust manager was found, fail without crashing on the null pointer.
if (sDefaultTrustManager == null)
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_FAILED);
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
List<X509Certificate> verifiedChain;
try {
@@ -482,7 +482,7 @@ public class X509Util {
Log.i(TAG, "Failed to validate the certificate chain, error: " +
eDefaultManager.getMessage());
return new AndroidCertVerifyResult(
- CertVerifyStatusAndroid.VERIFY_NO_TRUSTED_ROOT);
+ CertVerifyStatusAndroid.NO_TRUSTED_ROOT);
}
}
@@ -492,7 +492,7 @@ public class X509Util {
isIssuedByKnownRoot = isKnownRoot(root);
}
- return new AndroidCertVerifyResult(CertVerifyStatusAndroid.VERIFY_OK,
+ return new AndroidCertVerifyResult(CertVerifyStatusAndroid.OK,
isIssuedByKnownRoot, verifiedChain);
}
}
« no previous file with comments | « net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java ('k') | net/android/keystore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698