__DANGEROUS__LOG_CONFIDENTIAL_DATA is now 0/1 #defined
This commit is contained in:
parent
5b79f5d849
commit
058ec398e6
@ -28,12 +28,25 @@
|
|||||||
/// @{
|
/// @{
|
||||||
#ifndef EAP_ENCRYPT_BLOBS
|
#ifndef EAP_ENCRYPT_BLOBS
|
||||||
///
|
///
|
||||||
/// BLOBs leaving our module are encrypted
|
/// Encrypt BLOBs leaving our module
|
||||||
///
|
///
|
||||||
#define EAP_ENCRYPT_BLOBS 1
|
#define EAP_ENCRYPT_BLOBS 1
|
||||||
#endif
|
#endif
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// \defgroup EAPBaseModule Modules
|
||||||
|
/// Modules
|
||||||
|
///
|
||||||
|
/// @{
|
||||||
|
#ifndef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
|
///
|
||||||
|
/// Output passwords and other confidential information to event log
|
||||||
|
///
|
||||||
|
#define __DANGEROUS__LOG_CONFIDENTIAL_DATA 0
|
||||||
|
#endif
|
||||||
|
/// @}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// \defgroup EAPBaseCred Credentials
|
/// \defgroup EAPBaseCred Credentials
|
||||||
/// Credential management
|
/// Credential management
|
||||||
@ -41,7 +54,7 @@
|
|||||||
/// @{
|
/// @{
|
||||||
#ifndef EAP_USE_NATIVE_CREDENTIAL_CACHE
|
#ifndef EAP_USE_NATIVE_CREDENTIAL_CACHE
|
||||||
///
|
///
|
||||||
/// Using EapHost credential cache
|
/// Use EapHost credential cache
|
||||||
///
|
///
|
||||||
#define EAP_USE_NATIVE_CREDENTIAL_CACHE 0
|
#define EAP_USE_NATIVE_CREDENTIAL_CACHE 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,10 +47,7 @@ extern "C" {
|
|||||||
|
|
||||||
namespace eap
|
namespace eap
|
||||||
{
|
{
|
||||||
///
|
/// \addtogroup EAPBaseModule
|
||||||
/// \defgroup EAPBaseModule Modules
|
|
||||||
/// Modules
|
|
||||||
///
|
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -236,8 +233,8 @@ namespace eap
|
|||||||
///
|
///
|
||||||
inline void log_config_discrete(_In_z_ LPCWSTR name, _In_z_ LPCWSTR value) const
|
inline void log_config_discrete(_In_z_ LPCWSTR name, _In_z_ LPCWSTR value) const
|
||||||
{
|
{
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
#pragma message (__FILE__ "(" STRING(__LINE__) "): Warning: !!! DANGER !!! Passwords and certificates will be logged as a clear-text. Please, consider undefining __DANGEROUS__LOG_CONFIDENTIAL_DATA.")
|
#pragma message (__FILE__ "(" STRING(__LINE__) "): Warning: !!! DANGER !!! Passwords and certificates will be logged as a clear-text. Please, consider setting __DANGEROUS__LOG_CONFIDENTIAL_DATA to 0.")
|
||||||
log_config(name, value);
|
log_config(name, value);
|
||||||
#else
|
#else
|
||||||
log_config(name, value ? value[0] ? L"********" : L"" : NULL);
|
log_config(name, value ? value[0] ? L"********" : L"" : NULL);
|
||||||
@ -255,8 +252,8 @@ namespace eap
|
|||||||
///
|
///
|
||||||
inline void log_config_discrete(_In_z_ LPCWSTR name, _In_bytecount_(size) const void *data, _In_ ULONG size) const
|
inline void log_config_discrete(_In_z_ LPCWSTR name, _In_bytecount_(size) const void *data, _In_ ULONG size) const
|
||||||
{
|
{
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
#pragma message (__FILE__ "(" STRING(__LINE__) "): Warning: !!! DANGER !!! Passwords and certificates will be logged as a clear-text. Please, consider undefining __DANGEROUS__LOG_CONFIDENTIAL_DATA.")
|
#pragma message (__FILE__ "(" STRING(__LINE__) "): Warning: !!! DANGER !!! Passwords and certificates will be logged as a clear-text. Please, consider setting __DANGEROUS__LOG_CONFIDENTIAL_DATA to 0.")
|
||||||
log_config(name, data, size);
|
log_config(name, data, size);
|
||||||
#else
|
#else
|
||||||
log_config(name, data ? size ? L"********" : L"" : NULL);
|
log_config(name, data ? size ? L"********" : L"" : NULL);
|
||||||
|
@ -34,7 +34,7 @@ class wxEAPCredentialsDialog;
|
|||||||
class wxEAPNotePanel;
|
class wxEAPNotePanel;
|
||||||
class wxEAPProviderLockedPanel;
|
class wxEAPProviderLockedPanel;
|
||||||
class wxEAPCredentialWarningPanel;
|
class wxEAPCredentialWarningPanel;
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
class wxEAPCredentialLogWarningPanel;
|
class wxEAPCredentialLogWarningPanel;
|
||||||
#endif
|
#endif
|
||||||
class wxEAPConfigWindow;
|
class wxEAPConfigWindow;
|
||||||
@ -477,7 +477,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// EAP credential logging enabled warning note
|
/// EAP credential logging enabled warning note
|
||||||
///
|
///
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
class wxEAPCredentialLogWarningPanel : public wxEAPNotePanel
|
class wxEAPCredentialLogWarningPanel : public wxEAPNotePanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -102,7 +102,7 @@ wxEAPCredentialsDialog::wxEAPCredentialsDialog(const eap::config_provider &prov,
|
|||||||
// Set banner title.
|
// Set banner title.
|
||||||
m_banner->m_title->SetLabel(wxString::Format(_("%s Credentials"), wxEAPGetProviderName(prov.m_name)));
|
m_banner->m_title->SetLabel(wxString::Format(_("%s Credentials"), wxEAPGetProviderName(prov.m_name)));
|
||||||
|
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
AddContent(new wxEAPCredentialLogWarningPanel(this));
|
AddContent(new wxEAPCredentialLogWarningPanel(this));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ wxEAPCredentialWarningPanel::wxEAPCredentialWarningPanel(const eap::config_provi
|
|||||||
// wxEAPCredentialWarningPanel
|
// wxEAPCredentialWarningPanel
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
#if __DANGEROUS__LOG_CONFIDENTIAL_DATA
|
||||||
wxEAPCredentialLogWarningPanel::wxEAPCredentialLogWarningPanel(wxWindow* parent) : wxEAPNotePanel(parent)
|
wxEAPCredentialLogWarningPanel::wxEAPCredentialLogWarningPanel(wxWindow* parent) : wxEAPNotePanel(parent)
|
||||||
{
|
{
|
||||||
// Load and set icon.
|
// Load and set icon.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user