Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ios/web/web_state/wk_web_view_security_util.h" | 5 #import "ios/web/web_state/wk_web_view_security_util.h" |
| 6 | 6 |
| 7 #include "base/mac/scoped_cftyperef.h" | 7 #include "base/mac/scoped_cftyperef.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "net/cert/x509_certificate.h" | 9 #include "net/cert/x509_certificate.h" |
| 10 #include "net/ssl/ssl_info.h" | 10 #include "net/ssl/ssl_info.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 case kSecTrustResultInvalid: | 132 case kSecTrustResultInvalid: |
| 133 return SECURITY_STYLE_UNKNOWN; | 133 return SECURITY_STYLE_UNKNOWN; |
| 134 case kSecTrustResultProceed: | 134 case kSecTrustResultProceed: |
| 135 case kSecTrustResultUnspecified: | 135 case kSecTrustResultUnspecified: |
| 136 return SECURITY_STYLE_AUTHENTICATED; | 136 return SECURITY_STYLE_AUTHENTICATED; |
| 137 case kSecTrustResultDeny: | 137 case kSecTrustResultDeny: |
| 138 case kSecTrustResultRecoverableTrustFailure: | 138 case kSecTrustResultRecoverableTrustFailure: |
| 139 case kSecTrustResultFatalTrustFailure: | 139 case kSecTrustResultFatalTrustFailure: |
| 140 case kSecTrustResultOtherError: | 140 case kSecTrustResultOtherError: |
| 141 return SECURITY_STYLE_AUTHENTICATION_BROKEN; | 141 return SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| 142 | |
| 143 // TODO(crbug.com/): This default clause exists because | |
| 144 // kSecTrustResultConfirm was deprecated in iOS7, but leads to a compile | |
| 145 // error if used with newer SDKs. Remove the default clause once this | |
| 146 // switch statement successfully compiles without kSecTrustResultConfirm. | |
| 147 default: | |
|
rohitrao (ping after 24h)
2016/06/14 15:20:32
Eugene asked whether this should be hidden behind
Eugene But (OOO till 7-30)
2016/06/14 15:35:07
I'm totally fine with having default. And I'm not
sdefresne
2016/06/14 18:03:09
+1 to eugenebut comment.
| |
| 148 NOTREACHED(); | |
| 149 return SECURITY_STYLE_UNKNOWN; | |
| 142 } | 150 } |
| 143 NOTREACHED(); | |
| 144 return SECURITY_STYLE_UNKNOWN; | |
| 145 } | 151 } |
| 146 | 152 |
| 147 } // namespace web | 153 } // namespace web |
| OLD | NEW |