summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 17:06:42 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 17:06:42 +0000
commit94604143604d2ec132f6722a80399d21d491fbb4 (patch)
treeb794860b51c7363de19fb6de0f163669b9da85d0 /net/base
parente957fe55719a1c0532f6978753892f27feb51f88 (diff)
downloadchromium_src-94604143604d2ec132f6722a80399d21d491fbb4.zip
chromium_src-94604143604d2ec132f6722a80399d21d491fbb4.tar.gz
chromium_src-94604143604d2ec132f6722a80399d21d491fbb4.tar.bz2
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
Diffstat (limited to 'net/base')
-rw-r--r--net/base/x509_certificate.h6
1 files changed, 6 insertions, 0 deletions
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 <string.h>
+
#include <map>
#include <set>
#include <string>
@@ -36,6 +38,10 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
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];
};