Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: net/base/cert_status_flags.h

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/cert_database_win.cc ('k') | net/base/cert_status_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_status_flags.h
diff --git a/net/base/cert_status_flags.h b/net/base/cert_status_flags.h
deleted file mode 100644
index ff233754c6fa598037de9e7229fe637cf470825f..0000000000000000000000000000000000000000
--- a/net/base/cert_status_flags.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_BASE_CERT_STATUS_FLAGS_H_
-#define NET_BASE_CERT_STATUS_FLAGS_H_
-
-#include "base/basictypes.h"
-#include "net/base/net_export.h"
-
-namespace net {
-
-// Bitmask of status flags of a certificate, representing any errors, as well as
-// 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;
-
-// 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.
-
-// Returns true if the specified cert status has an error set.
-static inline bool IsCertStatusError(CertStatus status) {
- return (CERT_STATUS_ALL_ERRORS & status) != 0;
-}
-
-// IsCertStatusMinorError returns true iff |cert_status| indicates a condition
-// that should typically be ignored by automated requests. (i.e. a revocation
-// check failure.)
-NET_EXPORT bool IsCertStatusMinorError(CertStatus cert_status);
-
-// Maps a network error code to the equivalent certificate status flag. If
-// the error code is not a certificate error, it is mapped to 0.
-NET_EXPORT CertStatus MapNetErrorToCertStatus(int error);
-
-// Maps the most serious certificate error in the certificate status flags
-// to the equivalent network error code.
-NET_EXPORT int MapCertStatusToNetError(CertStatus cert_status);
-
-} // namespace net
-
-#endif // NET_BASE_CERT_STATUS_FLAGS_H_
« no previous file with comments | « net/base/cert_database_win.cc ('k') | net/base/cert_status_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698