From 94604143604d2ec132f6722a80399d21d491fbb4 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Tue, 23 Jun 2009 17:06:42 +0000 Subject: Define the == operator for X509Certificate::Fingerprint. R=eroman BUG=http://crbug.com/318 TEST=none Review URL: http://codereview.chromium.org/140034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19029 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/x509_certificate.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/base') diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h index cdadf54..b50a406 100644 --- a/net/base/x509_certificate.h +++ b/net/base/x509_certificate.h @@ -5,6 +5,8 @@ #ifndef NET_BASE_X509_CERTIFICATE_H_ #define NET_BASE_X509_CERTIFICATE_H_ +#include + #include #include #include @@ -36,6 +38,10 @@ class X509Certificate : public base::RefCountedThreadSafe { public: // SHA-1 fingerprint (160 bits) of a certificate. struct Fingerprint { + bool operator==(const Fingerprint& other) const { + return memcmp(data, other.data, sizeof(data)) == 0; + } + unsigned char data[20]; }; -- cgit v1.1