mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-07 19:27:43 -04:00
Build a cache of allowed SSL exceptions and use them on future network requests
The class NetworkAccessManager sub-classes QNetworkAccessManager adding a message box to ask the user if SSL errors may be ignored. Ignored errors are ignored in future server replies so that the user is not asked about he same peer certificate chain repeatedly. The cache is currently per process only and not persistent. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7361 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+7
-5
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "revision_utils.hpp"
|
||||
#include "qt_helpers.hpp"
|
||||
#include "NetworkAccessManager.hpp"
|
||||
#include "soundout.h"
|
||||
#include "soundin.h"
|
||||
#include "Modulator.hpp"
|
||||
@@ -157,9 +158,10 @@ namespace
|
||||
//--------------------------------------------------- MainWindow constructor
|
||||
MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
MultiSettings * multi_settings, QSharedMemory *shdmem,
|
||||
unsigned downSampleFactor, QNetworkAccessManager * network_manager,
|
||||
unsigned downSampleFactor,
|
||||
QSplashScreen * splash, QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
m_network_manager {this},
|
||||
m_valid {true},
|
||||
m_splash {splash},
|
||||
m_dataDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)},
|
||||
@@ -254,7 +256,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_onAirFreq0 {0.0},
|
||||
m_first_error {true},
|
||||
tx_status_label {"Receiving"},
|
||||
wsprNet {new WSPRNet {network_manager, this}},
|
||||
wsprNet {new WSPRNet {&m_network_manager, this}},
|
||||
m_appDir {QApplication::applicationDirPath ()},
|
||||
m_palette {"Linrad"},
|
||||
m_mode {"JT9"},
|
||||
@@ -336,7 +338,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_config.udp_server_name (), m_config.udp_server_port (),
|
||||
this}},
|
||||
psk_Reporter {new PSK_Reporter {m_messageClient, this}},
|
||||
m_manual {network_manager}
|
||||
m_manual {&m_network_manager}
|
||||
{
|
||||
ui->setupUi(this);
|
||||
createStatusBar();
|
||||
@@ -485,10 +487,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
ui->actionMediumDecode->setActionGroup(DepthGroup);
|
||||
ui->actionDeepestDecode->setActionGroup(DepthGroup);
|
||||
|
||||
connect (ui->download_samples_action, &QAction::triggered, [this, network_manager] () {
|
||||
connect (ui->download_samples_action, &QAction::triggered, [this] () {
|
||||
if (!m_sampleDownloader)
|
||||
{
|
||||
m_sampleDownloader.reset (new SampleDownloader {m_settings, &m_config, network_manager, this});
|
||||
m_sampleDownloader.reset (new SampleDownloader {m_settings, &m_config, &m_network_manager, this});
|
||||
}
|
||||
m_sampleDownloader->show ();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user