mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-17 19:49:12 +01:00
Added: INI option to verify SSL cert
This commit is contained in:
parent
d3be9d155d
commit
1fdf750395
@ -319,6 +319,7 @@ void SConfig::SaveNetworkSettings(IniFile& ini)
|
||||
|
||||
network->Set("SSLDumpRead", m_SSLDumpRead);
|
||||
network->Set("SSLDumpWrite", m_SSLDumpWrite);
|
||||
network->Set("SSLVerifyCert", m_SSLVerifyCert);
|
||||
}
|
||||
|
||||
void SConfig::SaveAnalyticsSettings(IniFile& ini)
|
||||
@ -618,6 +619,7 @@ void SConfig::LoadNetworkSettings(IniFile& ini)
|
||||
|
||||
network->Get("SSLDumpRead", &m_SSLDumpRead, false);
|
||||
network->Get("SSLDumpWrite", &m_SSLDumpWrite, false);
|
||||
network->Get("SSLVerifyCert", &m_SSLVerifyCert, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadAnalyticsSettings(IniFile& ini)
|
||||
|
@ -276,6 +276,7 @@ struct SConfig : NonCopyable
|
||||
// Network settings
|
||||
bool m_SSLDumpRead;
|
||||
bool m_SSLDumpWrite;
|
||||
bool m_SSLVerifyCert;
|
||||
|
||||
SysConf* m_SYSCONF;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h"
|
||||
#include "Core/IPC_HLE/WII_Socket.h"
|
||||
@ -174,7 +175,10 @@ IPCCommandResult CWII_IPC_HLE_Device_net_ssl::IOCtlV(u32 _CommandAddress)
|
||||
|
||||
mbedtls_ssl_set_session(&ssl->ctx, &ssl->session);
|
||||
|
||||
mbedtls_ssl_conf_authmode(&ssl->config, MBEDTLS_SSL_VERIFY_REQUIRED);
|
||||
if (SConfig::GetInstance().m_SSLVerifyCert && verifyOption)
|
||||
mbedtls_ssl_conf_authmode(&ssl->config, MBEDTLS_SSL_VERIFY_REQUIRED);
|
||||
else
|
||||
mbedtls_ssl_conf_authmode(&ssl->config, MBEDTLS_SSL_VERIFY_NONE);
|
||||
mbedtls_ssl_conf_renegotiation(&ssl->config, MBEDTLS_SSL_RENEGOTIATION_ENABLED);
|
||||
|
||||
ssl->hostname = hostname;
|
||||
|
Loading…
x
Reference in New Issue
Block a user