Index: net/socket/dns_cert_provenance_checker.cc |
=================================================================== |
--- net/socket/dns_cert_provenance_checker.cc (revision 102606) |
+++ net/socket/dns_cert_provenance_checker.cc (working copy) |
@@ -21,8 +21,10 @@ |
#include "base/lazy_instance.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/pickle.h" |
+#include "base/sha1.h" |
#include "base/threading/non_thread_safe.h" |
#include "crypto/encryptor.h" |
+#include "crypto/sha2.h" |
wtc
2011/09/24 01:39:41
Please undo the changes in this file. This file u
|
#include "crypto/symmetric_key.h" |
#include "net/base/completion_callback.h" |
#include "net/base/dns_util.h" |
@@ -115,18 +117,18 @@ |
return; |
} |
- uint8 fingerprint[SHA1_LENGTH]; |
+ uint8 fingerprint[base::kSHA1Length]; |
SECStatus rv = HASH_HashBuf( |
HASH_AlgSHA1, fingerprint, (uint8*) der_certs_[0].data(), |
der_certs_[0].size()); |
DCHECK_EQ(SECSuccess, rv); |
- char fingerprint_hex[SHA1_LENGTH * 2 + 1]; |
+ char fingerprint_hex[base::kSHA1Length * 2 + 1]; |
for (unsigned i = 0; i < sizeof(fingerprint); i++) { |
static const char hextable[] = "0123456789abcdef"; |
fingerprint_hex[i*2] = hextable[fingerprint[i] >> 4]; |
fingerprint_hex[i*2 + 1] = hextable[fingerprint[i] & 15]; |
} |
- fingerprint_hex[SHA1_LENGTH * 2] = 0; |
+ fingerprint_hex[base::kSHA1Length * 2] = 0; |
static const char kBaseCertName[] = ".certs.googlednstest.com"; |
domain_.assign(fingerprint_hex); |
@@ -294,7 +296,7 @@ |
// The key and IV are 128-bits and generated from a SHA256 hash of the x |
// value. |
- char key_data[SHA256_LENGTH]; |
+ char key_data[crypto::kSHA256Length]; |
HASH_HashBuf(HASH_AlgSHA256, reinterpret_cast<uint8*>(key_data), |
x_data->data, x_data->len); |
PK11_FreeSymKey(pms); |