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

Unified Diff: net/base/x509_cert_types.h

Issue 5162001: X.509-related cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build breakage Created 10 years, 1 month 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
Index: net/base/x509_cert_types.h
diff --git a/net/base/x509_cert_types.h b/net/base/x509_cert_types.h
index 7723c22aa0c1e44a48f3fbb587ed980072248f8d..5b26ecc8e13c7338090a4527cee91bd8a1e3e3db 100644
--- a/net/base/x509_cert_types.h
+++ b/net/base/x509_cert_types.h
@@ -6,27 +6,16 @@
#define NET_BASE_X509_CERT_TYPES_H_
#pragma once
+#include "build/build_config.h"
wtc 2010/11/17 21:31:53 There is a new Chromium-specific recommendation on
+
#include <string.h>
-#include <functional>
-#include <iosfwd>
#include <set>
#include <string>
#include <vector>
-#include "base/ref_counted.h"
-#include "base/singleton.h"
-#include "base/time.h"
-#include "testing/gtest/include/gtest/gtest_prod.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#include <wincrypt.h>
-#elif defined(OS_MACOSX)
+#if defined(OS_MACOSX)
#include <Security/x509defs.h>
-#elif defined(USE_NSS)
-// Forward declaration; real one in <cert.h>
-struct CERTCertificateStr;
#endif
namespace net {
@@ -62,11 +51,13 @@ struct CertPrincipal {
#if defined(OS_MACOSX)
// Parses a CSSM_X509_NAME struct.
void Parse(const CSSM_X509_NAME* name);
-#endif
- // Returns true if all attributes of the two objects match,
- // where "match" is defined in RFC 5280 sec. 7.1.
+ // Compare this CertPrincipal with |against|, returning true if they're
+ // equal enough to be a possible match. This should NOT be used for any
+ // security relevant decisions.
+ // TODO(rsleevi): Remove once Mac client auth uses NSS for name comparison.
bool Matches(const CertPrincipal& against) const;
+#endif
// Returns a name that can be used to represent the issuer. It tries in this
// order: CN, O and OU and returns the first non-empty one found.
@@ -86,9 +77,6 @@ struct CertPrincipal {
std::vector<std::string> domain_components;
};
-// Writes a human-readable description of a CertPrincipal, for debugging.
-std::ostream& operator<<(std::ostream& s, const CertPrincipal& p);
-
// This class is useful for maintaining policies about which certificates are
// permitted or forbidden for a particular purpose.
class CertPolicy {

Powered by Google App Engine
This is Rietveld 408576698