Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/cert/cert_verify_proc_android.h" | 5 #include "net/cert/cert_verify_proc_android.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 case android::VERIFY_NO_TRUSTED_ROOT: | 34 case android::VERIFY_NO_TRUSTED_ROOT: |
| 35 verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID; | 35 verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID; |
| 36 break; | 36 break; |
| 37 case android::VERIFY_EXPIRED: | 37 case android::VERIFY_EXPIRED: |
| 38 case android::VERIFY_NOT_YET_VALID: | 38 case android::VERIFY_NOT_YET_VALID: |
| 39 verify_result->cert_status |= CERT_STATUS_DATE_INVALID; | 39 verify_result->cert_status |= CERT_STATUS_DATE_INVALID; |
| 40 break; | 40 break; |
| 41 case android::VERIFY_UNABLE_TO_PARSE: | 41 case android::VERIFY_UNABLE_TO_PARSE: |
| 42 verify_result->cert_status |= CERT_STATUS_INVALID; | 42 verify_result->cert_status |= CERT_STATUS_INVALID; |
| 43 break; | 43 break; |
| 44 case android::VERIFY_INCORRECT_KEY_USAGE: | |
| 45 verify_result->cert_status |= CERT_STATUS_INVALID; | |
|
Ryan Sleevi
2013/04/25 18:36:50
I've confirmed this matches how we map CERT_TRUST_
| |
| 46 break; | |
| 44 default: | 47 default: |
| 45 NOTREACHED(); | 48 NOTREACHED(); |
| 46 verify_result->cert_status |= CERT_STATUS_INVALID; | 49 verify_result->cert_status |= CERT_STATUS_INVALID; |
| 47 break; | 50 break; |
| 48 } | 51 } |
| 49 return true; | 52 return true; |
| 50 } | 53 } |
| 51 | 54 |
| 52 bool GetChainDEREncodedBytes(X509Certificate* cert, | 55 bool GetChainDEREncodedBytes(X509Certificate* cert, |
| 53 std::vector<std::string>* chain_bytes) { | 56 std::vector<std::string>* chain_bytes) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 | 111 |
| 109 // Until the required support is available in the platform, we don't know if | 112 // Until the required support is available in the platform, we don't know if |
| 110 // the trust root at the end of the chain was standard or user-added, so we | 113 // the trust root at the end of the chain was standard or user-added, so we |
| 111 // mark all correctly verified certificates as issued by a known root. | 114 // mark all correctly verified certificates as issued by a known root. |
| 112 verify_result->is_issued_by_known_root = true; | 115 verify_result->is_issued_by_known_root = true; |
| 113 | 116 |
| 114 return OK; | 117 return OK; |
| 115 } | 118 } |
| 116 | 119 |
| 117 } // namespace net | 120 } // namespace net |
| OLD | NEW |