xref: /aosp_15_r20/external/cronet/net/cert/sct_status_flags.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/cert/sct_status_flags.h"
6 
7 namespace net::ct {
8 
IsValidSCTStatus(uint32_t status)9 bool IsValidSCTStatus(uint32_t status) {
10   switch (status) {
11     case net::ct::SCT_STATUS_LOG_UNKNOWN:
12     case net::ct::SCT_STATUS_INVALID_SIGNATURE:
13     case net::ct::SCT_STATUS_OK:
14     case net::ct::SCT_STATUS_INVALID_TIMESTAMP:
15       return true;
16     case net::ct::SCT_STATUS_NONE:
17       return false;
18   }
19 
20   return false;
21 }
22 
23 }  // namespace net::ct
24