chore: remove unused TlsCertificate class
This commit is contained in:
@ -81,8 +81,6 @@ add_library(${target} STATIC
|
||||
dialogs/SettingsDialog.ui
|
||||
ipc/DaemonIpcClient.cpp
|
||||
ipc/DaemonIpcClient.h
|
||||
tls/TlsCertificate.cpp
|
||||
tls/TlsCertificate.h
|
||||
tls/TlsUtility.cpp
|
||||
tls/TlsUtility.h
|
||||
validators/AliasValidator.cpp
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2015 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#include "TlsCertificate.h"
|
||||
|
||||
#include "common/Settings.h"
|
||||
#include "net/Fingerprint.h"
|
||||
#include "net/FingerprintDatabase.h"
|
||||
#include "net/SecureUtils.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
TlsCertificate::TlsCertificate(QObject *parent) : QObject(parent)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
bool TlsCertificate::generateCertificate(const QString &path, int keyLength) const
|
||||
{
|
||||
qDebug("generating tls certificate: %s", qUtf8Printable(path));
|
||||
|
||||
QFileInfo info(path);
|
||||
if (QDir dir(info.absolutePath()); !dir.exists() && !dir.mkpath(".")) {
|
||||
qCritical("failed to create directory for tls certificate");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
deskflow::generatePemSelfSignedCert(path.toStdString(), keyLength);
|
||||
} catch (const std::exception &e) {
|
||||
qCritical() << "failed to generate self-signed pem cert: " << e.what();
|
||||
return false;
|
||||
}
|
||||
qDebug("tls certificate generated");
|
||||
return true;
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
||||
* SPDX-FileCopyrightText: (C) 2015 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class TlsCertificate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TlsCertificate(QObject *parent = nullptr);
|
||||
|
||||
bool generateCertificate(const QString &path, int keyLength) const;
|
||||
};
|
||||
@ -7,7 +7,6 @@
|
||||
|
||||
#include "TlsUtility.h"
|
||||
|
||||
#include "TlsCertificate.h"
|
||||
#include "common/Settings.h"
|
||||
#include "net/SecureUtils.h"
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "TlsCertificate.h"
|
||||
#include <common/Settings.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
Reference in New Issue
Block a user