mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
Fix: handshake failed by ERR_CERT_AUTHORITY_INVALID
This commit is contained in:
parent
7bef2ccc68
commit
0c848a249d
@ -17,6 +17,7 @@ add_executable(gpclient
|
||||
cdpcommand.cpp
|
||||
cdpcommandmanager.cpp
|
||||
enhancedwebview.cpp
|
||||
enhancedwebpage.cpp
|
||||
gatewayauthenticator.cpp
|
||||
gatewayauthenticatorparams.cpp
|
||||
gpgateway.cpp
|
||||
|
9
GPClient/enhancedwebpage.cpp
Normal file
9
GPClient/enhancedwebpage.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
#include "enhancedwebpage.h"
|
||||
#include <QWebEngineCertificateError>
|
||||
#include <plog/Log.h>
|
||||
|
||||
bool EnhancedWebPage::certificateError(const QWebEngineCertificateError &certificateError) {
|
||||
LOGI << "An error occurred during certificate verification for" << certificateError.url() << "; " << certificateError.errorDescription();
|
||||
return certificateError.deferred();
|
||||
};
|
12
GPClient/enhancedwebpage.h
Normal file
12
GPClient/enhancedwebpage.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef ENHANCEDWEBPAGE_H
|
||||
#define ENHANCEDWEBPAGE_H
|
||||
|
||||
#include <QtWebEngineWidgets/qwebenginepage.h>
|
||||
|
||||
class EnhancedWebPage : public QWebEnginePage
|
||||
{
|
||||
protected:
|
||||
bool certificateError(const QWebEngineCertificateError &certificateError) override;
|
||||
};
|
||||
|
||||
#endif // !ECHANCEDWEBPAG
|
@ -1,6 +1,7 @@
|
||||
#include <QtCore/QProcessEnvironment>
|
||||
#include <QtWebEngineWidgets/QWebEngineView>
|
||||
|
||||
#include "enhancedwebpage.h"
|
||||
#include "enhancedwebview.h"
|
||||
#include "cdpcommandmanager.h"
|
||||
|
||||
@ -14,6 +15,7 @@ EnhancedWebView::EnhancedWebView(QWidget *parent)
|
||||
|
||||
void EnhancedWebView::initialize()
|
||||
{
|
||||
setPage(new EnhancedWebPage());
|
||||
auto port = QProcessEnvironment::systemEnvironment().value(ENV_CDP_PORT);
|
||||
cdp->initialize("http://127.0.0.1:" + port + "/json");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user