Fix compilation with Qt 5.9
This commit is contained in:
parent
71c11cacd9
commit
519626a6d5
3 changed files with 12 additions and 11 deletions
|
|
@ -2,12 +2,12 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QRandomGenerator64>
|
||||
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#define SER_UNIQUEID "uniqueid"
|
||||
#define SER_CERT "certificate"
|
||||
|
|
@ -195,8 +195,9 @@ IdentityManager::getUniqueId()
|
|||
}
|
||||
else {
|
||||
// Generate a new unique ID in base 16
|
||||
m_CachedUniqueId = QString::number(
|
||||
QRandomGenerator64::securelySeeded().generate64(), 16);
|
||||
uint64_t uid;
|
||||
RAND_bytes(reinterpret_cast<unsigned char*>(&uid), sizeof(uid));
|
||||
m_CachedUniqueId = QString::number(uid, 16);
|
||||
|
||||
qDebug() << "Generated new unique ID: " << m_CachedUniqueId;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include "nvpairingmanager.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/rand.h>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
#include "video/ffmpeg.h"
|
||||
#endif
|
||||
|
||||
#include <QRandomGenerator>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#include <QtEndian>
|
||||
#include <QCoreApplication>
|
||||
#include <QThreadPool>
|
||||
|
|
@ -206,11 +207,12 @@ Session::Session(NvComputer* computer, NvApp& app)
|
|||
m_StreamConfig.fps = m_Preferences.fps;
|
||||
m_StreamConfig.bitrate = m_Preferences.bitrateKbps;
|
||||
m_StreamConfig.hevcBitratePercentageMultiplier = 75;
|
||||
for (unsigned int i = 0; i < sizeof(m_StreamConfig.remoteInputAesKey); i++) {
|
||||
m_StreamConfig.remoteInputAesKey[i] =
|
||||
(char)(QRandomGenerator::global()->generate() % 256);
|
||||
}
|
||||
*(int*)m_StreamConfig.remoteInputAesIv = qToBigEndian(QRandomGenerator::global()->generate());
|
||||
RAND_bytes(reinterpret_cast<unsigned char*>(m_StreamConfig.remoteInputAesKey),
|
||||
sizeof(m_StreamConfig.remoteInputAesKey));
|
||||
|
||||
// Only the first 4 bytes are populated in the RI key IV
|
||||
RAND_bytes(reinterpret_cast<unsigned char*>(m_StreamConfig.remoteInputAesIv), 4);
|
||||
|
||||
switch (m_Preferences.audioConfig)
|
||||
{
|
||||
case StreamingPreferences::AC_AUTO:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue