Simplify SSL parameters setup

Simplify code by utilizing QSslConfiguration object.
Also don't mess with global default value via `QSslConfiguration::setDefaultConfiguration`. It
should not be done at such local class.
This commit is contained in:
Chocobo1 2024-10-21 15:51:01 +08:00
commit 337730ddef
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 15 additions and 19 deletions

View file

@ -31,8 +31,7 @@
#pragma once
#include <QSet>
#include <QSslCertificate>
#include <QSslKey>
#include <QSslConfiguration>
#include <QTcpServer>
namespace Http
@ -63,7 +62,6 @@ namespace Http
QSet<Connection *> m_connections; // for tracking persistent connections
bool m_https = false;
QList<QSslCertificate> m_certificates;
QSslKey m_key;
QSslConfiguration m_sslConfig;
};
}