Index: net/base/x509_cert_types.cc |
=================================================================== |
--- net/base/x509_cert_types.cc (revision 80507) |
+++ net/base/x509_cert_types.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 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. |
@@ -8,6 +8,7 @@ |
#include "base/logging.h" |
#include "base/string_number_conversions.h" |
#include "base/string_piece.h" |
+#include "base/string_util.h" |
#include "base/time.h" |
namespace net { |
@@ -27,6 +28,13 @@ |
} // namespace |
+std::string SHA1Fingerprint::GetString() const { |
+ std::string hash; |
+ for (size_t i = 0; i < sizeof(data); ++i) |
+ hash += StringPrintf("%02x", data[i]); |
+ return hash; |
+} |
+ |
CertPrincipal::CertPrincipal() { |
} |