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

Unified Diff: net/http/http_auth_handler_ntlm_portable.cc

Issue 2926333002: Remove unnecessary attempts at memory cleaning (Closed)
Patch Set: Fix zeroization Created 3 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 | « net/base/zap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm_portable.cc
diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc
index bb65b308c05644250a3293be0e46ecd721376442..1f590a0ea832979b22fa61dc98fd91af7301684b 100644
--- a/net/http/http_auth_handler_ntlm_portable.cc
+++ b/net/http/http_auth_handler_ntlm_portable.cc
@@ -19,7 +19,6 @@
#include "base/strings/utf_string_conversions.h"
#include "net/base/net_errors.h"
#include "net/base/network_interfaces.h"
-#include "net/base/zap.h"
#include "net/http/des.h"
#include "net/http/md4.h"
@@ -245,7 +244,6 @@ static void NTLM_Hash(const base::string16& password, uint8_t* hash) {
WriteUnicodeLE(passbuf, password.data(), len);
weak_crypto::MD4Sum(passbuf, len * 2, hash);
- ZapBuf(passbuf, len * 2);
free(passbuf);
#else
weak_crypto::MD4Sum(reinterpret_cast<const uint8_t*>(password.data()),
@@ -270,7 +268,7 @@ static void LM_Response(const uint8_t* hash,
uint8_t keybytes[21], k1[8], k2[8], k3[8];
memcpy(keybytes, hash, 16);
- ZapBuf(keybytes + 16, 5);
+ memset(keybytes + 16, 0, 5);
DESMakeKey(keybytes, k1);
DESMakeKey(keybytes + 7, k2);
@@ -594,9 +592,7 @@ int HttpAuthHandlerNTLM::InitializeBeforeFirstChallenge() {
return OK;
}
-HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() {
- credentials_.Zap();
-}
+HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() {}
// static
HttpAuthHandlerNTLM::GenerateRandomProc
« no previous file with comments | « net/base/zap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698