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

Unified Diff: net/base/x509_certificate.h

Issue 140034: Define the == operator for X509Certificate::Fingerprint.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: List operator== after data member Created 11 years, 6 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 | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.h
===================================================================
--- net/base/x509_certificate.h (revision 19002)
+++ net/base/x509_certificate.h (working copy)
@@ -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 @@
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];
};
« no previous file with comments | « no previous file | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698