fixed connection with qssh
This commit is contained in:
parent
2564430046
commit
87fed9fde3
3 changed files with 13 additions and 14 deletions
|
|
@ -138,7 +138,7 @@ QByteArray AbstractSshPacket::generateMac(const SshAbstractCryptoFacility &crypt
|
|||
quint32 seqNr) const
|
||||
{
|
||||
const quint32 seqNrBe = qToBigEndian(seqNr);
|
||||
QByteArray data(reinterpret_cast<const char *>(&seqNrBe), sizeof seqNrBe);
|
||||
QByteArray data(reinterpret_cast<const char *>(&seqNrBe), static_cast<int>(sizeof seqNrBe));
|
||||
data += QByteArray(m_data.constData(), length() + 4);
|
||||
return crypt.generateMac(data, data.size());
|
||||
}
|
||||
|
|
@ -150,8 +150,9 @@ quint32 AbstractSshPacket::minPacketSize() const
|
|||
|
||||
void AbstractSshPacket::setLengthField(QByteArray &data)
|
||||
{
|
||||
const quint32 length = qToBigEndian(data.size() - 4);
|
||||
data.replace(qsizetype(0), 4, reinterpret_cast<const char *>(&length), 4);
|
||||
const quint32 length = qToBigEndian<quint32>(data.size() - 4);
|
||||
data.replace(static_cast<qsizetype>(0), static_cast<qsizetype>(4),
|
||||
reinterpret_cast<const char *>(&length), static_cast<qsizetype>(4));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ set(BUILD_SHARED_LIBS OFF)
|
|||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/3rd/qtkeychain)
|
||||
set(LIBS ${LIBS} qt6keychain)
|
||||
|
||||
# TODO it seems like i'm doing it wrong
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_LIST_DIR}/3rd/QSimpleCrypto/include
|
||||
${CMAKE_CURRENT_LIST_DIR}/3rd/OpenSSL/include
|
||||
|
|
@ -166,7 +165,7 @@ endif()
|
|||
if(APPLE)
|
||||
add_compile_definitions(MVPN_MACOS)
|
||||
|
||||
# ICON = $$PWD/images/app.icns //todo
|
||||
# ICON = $$PWD/images/app.icns
|
||||
|
||||
set(HEADERS ${HEADERS} ${CMAKE_CURRENT_LIST_DIR}/ui/macos_util.h)
|
||||
set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/ui/macos_util.mm)
|
||||
|
|
@ -368,6 +367,7 @@ if(ANDROID)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
# deploy artifacts required to run the application to the debug build folder
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||
set(DIR_NAME "x64")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue