mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
Ignore deprecated OpenSSL functions
This commit is contained in:
parent
f326aa22a6
commit
22af9ba811
3 changed files with 15 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "DomainServer.h"
|
#include "DomainServer.h"
|
||||||
#include "DomainServerNodeData.h"
|
#include "DomainServerNodeData.h"
|
||||||
|
#include "WarningsSuppression.h"
|
||||||
|
|
||||||
using SharedAssignmentPointer = QSharedPointer<Assignment>;
|
using SharedAssignmentPointer = QSharedPointer<Assignment>;
|
||||||
|
|
||||||
|
@ -705,6 +706,8 @@ bool DomainGatekeeper::verifyUserSignature(const QString& username,
|
||||||
|
|
||||||
const unsigned char* publicKeyData = reinterpret_cast<const unsigned char*>(publicKeyArray.constData());
|
const unsigned char* publicKeyData = reinterpret_cast<const unsigned char*>(publicKeyArray.constData());
|
||||||
|
|
||||||
|
OVERTE_IGNORE_DEPRECATED_BEGIN
|
||||||
|
|
||||||
// first load up the public key into an RSA struct
|
// first load up the public key into an RSA struct
|
||||||
RSA* rsaPublicKey = d2i_RSA_PUBKEY(NULL, &publicKeyData, publicKeyArray.size());
|
RSA* rsaPublicKey = d2i_RSA_PUBKEY(NULL, &publicKeyData, publicKeyArray.size());
|
||||||
|
|
||||||
|
@ -746,6 +749,8 @@ bool DomainGatekeeper::verifyUserSignature(const QString& username,
|
||||||
RSA_free(rsaPublicKey);
|
RSA_free(rsaPublicKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OVERTE_IGNORE_DEPRECATED_END
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// we can't let this user in since we couldn't convert their public key to an RSA key we could use
|
// we can't let this user in since we couldn't convert their public key to an RSA key we could use
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
#include "WarningsSuppression.h"
|
||||||
|
|
||||||
|
|
||||||
DomainServerNodeData::StringPairHash DomainServerNodeData::_overrideHash;
|
DomainServerNodeData::StringPairHash DomainServerNodeData::_overrideHash;
|
||||||
|
|
||||||
|
@ -26,9 +28,11 @@ DomainServerNodeData::DomainServerNodeData() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainServerNodeData::updateJSONStats(QByteArray statsByteArray) {
|
void DomainServerNodeData::updateJSONStats(QByteArray statsByteArray) {
|
||||||
|
OVERTE_IGNORE_DEPRECATED_BEGIN
|
||||||
auto document = QJsonDocument::fromBinaryData(statsByteArray);
|
auto document = QJsonDocument::fromBinaryData(statsByteArray);
|
||||||
Q_ASSERT(document.isObject());
|
Q_ASSERT(document.isObject());
|
||||||
_statsJSONObject = overrideValuesIfNeeded(document.object());
|
_statsJSONObject = overrideValuesIfNeeded(document.object());
|
||||||
|
OVERTE_IGNORE_DEPRECATED_END
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject DomainServerNodeData::overrideValuesIfNeeded(const QJsonObject& newStats) {
|
QJsonObject DomainServerNodeData::overrideValuesIfNeeded(const QJsonObject& newStats) {
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <MetaverseAPI.h>
|
#include <MetaverseAPI.h>
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
#include "WarningsSuppression.h"
|
||||||
|
|
||||||
const int CLEAR_INACTIVE_PEERS_INTERVAL_MSECS = 1 * 1000;
|
const int CLEAR_INACTIVE_PEERS_INTERVAL_MSECS = 1 * 1000;
|
||||||
const int PEER_SILENCE_THRESHOLD_MSECS = 5 * 1000;
|
const int PEER_SILENCE_THRESHOLD_MSECS = 5 * 1000;
|
||||||
|
@ -179,6 +180,8 @@ bool IceServer::isVerifiedHeartbeat(const QUuid& domainID, const QByteArray& pla
|
||||||
const auto rsaPublicKey = it->second.get();
|
const auto rsaPublicKey = it->second.get();
|
||||||
|
|
||||||
if (rsaPublicKey) {
|
if (rsaPublicKey) {
|
||||||
|
OVERTE_IGNORE_DEPRECATED_BEGIN
|
||||||
|
|
||||||
auto hashedPlaintext = QCryptographicHash::hash(plaintext, QCryptographicHash::Sha256);
|
auto hashedPlaintext = QCryptographicHash::hash(plaintext, QCryptographicHash::Sha256);
|
||||||
int verificationResult = RSA_verify(NID_sha256,
|
int verificationResult = RSA_verify(NID_sha256,
|
||||||
reinterpret_cast<const unsigned char*>(hashedPlaintext.constData()),
|
reinterpret_cast<const unsigned char*>(hashedPlaintext.constData()),
|
||||||
|
@ -187,6 +190,7 @@ bool IceServer::isVerifiedHeartbeat(const QUuid& domainID, const QByteArray& pla
|
||||||
signature.size(),
|
signature.size(),
|
||||||
rsaPublicKey);
|
rsaPublicKey);
|
||||||
|
|
||||||
|
OVERTE_IGNORE_DEPRECATED_END
|
||||||
if (verificationResult == 1) {
|
if (verificationResult == 1) {
|
||||||
// this is the only success case - we return true here to indicate that the heartbeat is verified
|
// this is the only success case - we return true here to indicate that the heartbeat is verified
|
||||||
return true;
|
return true;
|
||||||
|
@ -262,6 +266,7 @@ void IceServer::publicKeyReplyFinished(QNetworkReply* reply) {
|
||||||
// convert the downloaded public key to an RSA struct, if possible
|
// convert the downloaded public key to an RSA struct, if possible
|
||||||
const unsigned char* publicKeyData = reinterpret_cast<const unsigned char*>(apiPublicKey.constData());
|
const unsigned char* publicKeyData = reinterpret_cast<const unsigned char*>(apiPublicKey.constData());
|
||||||
|
|
||||||
|
OVERTE_IGNORE_DEPRECATED_BEGIN
|
||||||
RSA* rsaPublicKey = d2i_RSA_PUBKEY(NULL, &publicKeyData, apiPublicKey.size());
|
RSA* rsaPublicKey = d2i_RSA_PUBKEY(NULL, &publicKeyData, apiPublicKey.size());
|
||||||
|
|
||||||
if (rsaPublicKey) {
|
if (rsaPublicKey) {
|
||||||
|
@ -270,6 +275,7 @@ void IceServer::publicKeyReplyFinished(QNetworkReply* reply) {
|
||||||
qWarning() << "Could not convert in-memory public key for" << domainID << "to usable RSA public key.";
|
qWarning() << "Could not convert in-memory public key for" << domainID << "to usable RSA public key.";
|
||||||
qWarning() << "Public key will be re-requested on next heartbeat.";
|
qWarning() << "Public key will be re-requested on next heartbeat.";
|
||||||
}
|
}
|
||||||
|
OVERTE_IGNORE_DEPRECATED_END
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "There was no public key present in response for domain with ID" << domainID;
|
qWarning() << "There was no public key present in response for domain with ID" << domainID;
|
||||||
|
|
Loading…
Reference in a new issue