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

Unified Diff: net/cert/cert_verify_proc_android.cc

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/base/mime_util_certificate_type_list.h ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_android.cc
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc
index 9c99444d8e381a866a5f43aa1968f54ede006516..6bc8ef515873b4ec75ae77d680ad631528287873 100644
--- a/net/cert/cert_verify_proc_android.cc
+++ b/net/cert/cert_verify_proc_android.cc
@@ -38,21 +38,21 @@ bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes,
&status, &verify_result->is_issued_by_known_root,
&verified_chain);
switch (status) {
- case android::VERIFY_FAILED:
+ case android::CERT_VERIFY_STATUS_ANDROID_FAILED:
return false;
- case android::VERIFY_OK:
+ case android::CERT_VERIFY_STATUS_ANDROID_OK:
break;
- case android::VERIFY_NO_TRUSTED_ROOT:
+ case android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT:
verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID;
break;
- case android::VERIFY_EXPIRED:
- case android::VERIFY_NOT_YET_VALID:
+ case android::CERT_VERIFY_STATUS_ANDROID_EXPIRED:
+ case android::CERT_VERIFY_STATUS_ANDROID_NOT_YET_VALID:
verify_result->cert_status |= CERT_STATUS_DATE_INVALID;
break;
- case android::VERIFY_UNABLE_TO_PARSE:
+ case android::CERT_VERIFY_STATUS_ANDROID_UNABLE_TO_PARSE:
verify_result->cert_status |= CERT_STATUS_INVALID;
break;
- case android::VERIFY_INCORRECT_KEY_USAGE:
+ case android::CERT_VERIFY_STATUS_ANDROID_INCORRECT_KEY_USAGE:
verify_result->cert_status |= CERT_STATUS_INVALID;
break;
default:
@@ -85,7 +85,8 @@ bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes,
// correct, as a full chain may have been constructed and then failed to
// validate. However, if that is the case, the more serious error will
// override any SHA-1 considerations.
- size_t correction_for_root = (status == android::VERIFY_OK) ? 1 : 0;
+ size_t correction_for_root =
+ (status == android::CERT_VERIFY_STATUS_ANDROID_OK) ? 1 : 0;
for (size_t i = 0; i < chain.size() - correction_for_root; ++i) {
int sig_alg = OBJ_obj2nid(chain[i]->sig_alg->algorithm);
if (sig_alg == NID_md2WithRSAEncryption) {
« no previous file with comments | « net/base/mime_util_certificate_type_list.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698