Skip to content

Commit

Permalink
remove some log may leak encryption key
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull authored and bxq2011hust committed Jul 4, 2019
1 parent 0ac8afb commit 4d1119d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions libinitializer/GlobalConfigureInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ void dev::initializer::initGlobalConfig(const boost::property_tree::ptree& _pt)
INITIALIZER_LOG(INFO) << LOG_BADGE("initKeyManager")
<< LOG_KV("url.IP", g_BCOSConfig.diskEncryption.keyCenterIP)
<< LOG_KV("url.port",
std::to_string(g_BCOSConfig.diskEncryption.keyCenterPort))
<< LOG_KV("key", cipherDataKey);
std::to_string(g_BCOSConfig.diskEncryption.keyCenterPort));
}

INITIALIZER_LOG(INFO) << LOG_BADGE("initGlobalConfig")
Expand Down
4 changes: 2 additions & 2 deletions libsecurity/EncryptedFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bytes EncryptedFile::decryptContents(const std::string& _filePath)
<< LOG_KV("what", boost::diagnostic_information(e));
BOOST_THROW_EXCEPTION(EncryptedFileError());
}
LOG(DEBUG) << "[ENCFILE] Decrypt file [name/cipher/plain]: " << _filePath << "/"
<< toHex(encFileBytes) << "/" << toHex(decFileBytes) << endl;
//LOG(DEBUG) << "[ENCFILE] Decrypt file [name/cipher/plain]: " << _filePath << "/"
// << toHex(encFileBytes) << "/" << toHex(decFileBytes) << endl;
return decFileBytes;
}
2 changes: 1 addition & 1 deletion libsecurity/KeyCenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Json::Value KeyCenterHttpClient::callMethod(const string& _method, Json::Value _
http::read(m_socket, buffer, rsp);

KC_LOG(DEBUG) << LOG_BADGE("callMethod") << LOG_DESC("key manager respond")
<< LOG_KV("code", rsp.result_int()) << LOG_KV("string", rsp.body());
<< LOG_KV("code", rsp.result_int());

if (rsp.result_int() != 200)
{
Expand Down

0 comments on commit 4d1119d

Please sign in to comment.