diff options
Diffstat (limited to 'chromium/net/cert/cert_status_flags.h')
-rw-r--r-- | chromium/net/cert/cert_status_flags.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/chromium/net/cert/cert_status_flags.h b/chromium/net/cert/cert_status_flags.h index 711474ff2b0..e66856beae1 100644 --- a/chromium/net/cert/cert_status_flags.h +++ b/chromium/net/cert/cert_status_flags.h @@ -14,32 +14,15 @@ namespace net { // other non-error status information such as whether the certificate is EV. typedef uint32 CertStatus; -// The possible status bits for CertStatus. // NOTE: Because these names have appeared in bug reports, we preserve them as // MACRO_STYLE for continuity, instead of renaming them to kConstantStyle as // befits most static consts. -// Bits 0 to 15 are for errors. -static const CertStatus CERT_STATUS_ALL_ERRORS = 0xFFFF; -static const CertStatus CERT_STATUS_COMMON_NAME_INVALID = 1 << 0; -static const CertStatus CERT_STATUS_DATE_INVALID = 1 << 1; -static const CertStatus CERT_STATUS_AUTHORITY_INVALID = 1 << 2; -// 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP). -static const CertStatus CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4; -static const CertStatus CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5; -static const CertStatus CERT_STATUS_REVOKED = 1 << 6; -static const CertStatus CERT_STATUS_INVALID = 1 << 7; -static const CertStatus CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8; -// 1 << 9 was used for CERT_STATUS_NOT_IN_DNS -static const CertStatus CERT_STATUS_NON_UNIQUE_NAME = 1 << 10; -static const CertStatus CERT_STATUS_WEAK_KEY = 1 << 11; -static const CertStatus CERT_STATUS_WEAK_DH_KEY = 1 << 12; -static const CertStatus CERT_STATUS_PINNED_KEY_MISSING = 1 << 13; -static const CertStatus CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14; +#define CERT_STATUS_FLAG(label, value) \ + CertStatus static const CERT_STATUS_##label = value; +#include "net/cert/cert_status_flags_list.h" +#undef CERT_STATUS_FLAG -// Bits 16 to 31 are for non-error statuses. -static const CertStatus CERT_STATUS_IS_EV = 1 << 16; -static const CertStatus CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17; -// bit 18 was CERT_STATUS_IS_DNSSEC. +static const CertStatus CERT_STATUS_ALL_ERRORS = 0xFFFF; // Returns true if the specified cert status has an error set. static inline bool IsCertStatusError(CertStatus status) { |