| Index: content/common/ssl_status_serialization.cc
|
| diff --git a/content/common/ssl_status_serialization.cc b/content/common/ssl_status_serialization.cc
|
| index 3785d277eafc0a1cc70ce2a39056563bda47803d..807eabf8221f5c596153be9444b2b8986b9eb221 100644
|
| --- a/content/common/ssl_status_serialization.cc
|
| +++ b/content/common/ssl_status_serialization.cc
|
| @@ -26,26 +26,6 @@ bool CheckSecurityStyle(int security_style) {
|
| return false;
|
| }
|
|
|
| -// Checks that an integer |sct_status| is a valid net::ct::SCTVerifyStatus enum
|
| -// value. Returns true if valid, false otherwise.
|
| -bool CheckSCTStatus(uint32_t sct_status) {
|
| - switch (sct_status) {
|
| - case net::ct::SCT_STATUS_LOG_UNKNOWN:
|
| - // INVALID is deprecated and should not be used anymore, but it
|
| - // might have been previously written into the disk cache.
|
| - case net::ct::SCT_STATUS_INVALID:
|
| - case net::ct::SCT_STATUS_INVALID_SIGNATURE:
|
| - case net::ct::SCT_STATUS_OK:
|
| - case net::ct::SCT_STATUS_INVALID_TIMESTAMP:
|
| - return true;
|
| - case net::ct::SCT_STATUS_NONE:
|
| - // SCT_STATUS_NONE should never happen, so it isn't valid to
|
| - // receive a status of NONE in a serialized SSLStatus.
|
| - return false;
|
| - }
|
| - return false;
|
| -}
|
| -
|
| } // namespace
|
|
|
| namespace content {
|
| @@ -93,7 +73,8 @@ bool DeserializeSecurityInfo(const std::string& state, SSLStatus* ssl_status) {
|
|
|
| for (uint32_t i = 0; i < num_sct_statuses; i++) {
|
| uint32_t sct_status;
|
| - if (!iter.ReadUInt32(&sct_status) || !CheckSCTStatus(sct_status)) {
|
| + if (!iter.ReadUInt32(&sct_status) ||
|
| + !net::ct::IsValidSCTStatus(sct_status)) {
|
| *ssl_status = SSLStatus();
|
| return false;
|
| }
|
|
|