mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Fix Linux
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <istream>
|
||||
#include <stdexcept>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../common.h"
|
||||
|
||||
@@ -115,7 +115,7 @@ bool NetworkKey::SavePrivate(IStream * stream)
|
||||
{
|
||||
if (_key == nullptr)
|
||||
{
|
||||
throw std::exception("No key loaded");
|
||||
throw std::runtime_error("No key loaded");
|
||||
}
|
||||
auto pem = _key->GetPrivate();
|
||||
stream->Write(pem.data(), pem.size());
|
||||
@@ -134,7 +134,7 @@ bool NetworkKey::SavePublic(IStream * stream)
|
||||
{
|
||||
if (_key == nullptr)
|
||||
{
|
||||
throw std::exception("No key loaded");
|
||||
throw std::runtime_error("No key loaded");
|
||||
}
|
||||
auto pem = _key->GetPrivate();
|
||||
stream->Write(pem.data(), pem.size());
|
||||
@@ -151,7 +151,7 @@ std::string NetworkKey::PublicKeyString()
|
||||
{
|
||||
if (_key == nullptr)
|
||||
{
|
||||
throw std::exception("No key loaded");
|
||||
throw std::runtime_error("No key loaded");
|
||||
}
|
||||
return _key->GetPublic();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ target_link_libraries(test_localisation ${GTEST_LIBRARIES} test-common ${LDL} z)
|
||||
add_test(NAME localisation COMMAND test_localisation)
|
||||
|
||||
# Crypt tests
|
||||
add_executable(test_crypt "${CMAKE_CURRENT_LIST_DIR}/CryptTests.cpp")
|
||||
add_executable(test_crypt "${CMAKE_CURRENT_LIST_DIR}/CryptTests.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/TestData.cpp")
|
||||
target_link_libraries(test_crypt ${GTEST_LIBRARIES} libopenrct2)
|
||||
add_test(NAME Crypt COMMAND test_crypt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user