1 parent
a7ffe73a6c
commit
c1a11ffe29
29 files changed
+433
-123
No files matched your search
@@ -1,14 +1,14 @@
|
||||
#include "check.hpp"
|
||||
#include "echoion/protocol/Crypto.hpp"
|
||||
#include "echoion/protocol/Identity.hpp"
|
||||
#include "echoion/protocol/Util.hpp"
|
||||
#include "Void/TeamSpeak/Protocol/Crypto.hpp"
|
||||
#include "Void/TeamSpeak/Protocol/Identity.hpp"
|
||||
#include "Void/TeamSpeak/Protocol/Util.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
using namespace Echoion::Protocol;
|
||||
using namespace Void::TeamSpeak::Protocol;
|
||||
|
||||
TEST_CASE(identity_generate_uid_and_level)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ TEST_CASE(identity_sign_verifiable_length)
|
||||
TEST_CASE(identity_save_load_roundtrip)
|
||||
{
|
||||
auto id = Identity::generate(0);
|
||||
std::string path = "/tmp/echoion_identity_test.txt";
|
||||
std::string path = "/tmp/void_teamspeak_identity_test.txt";
|
||||
id.save(path);
|
||||
auto loaded = Identity::load(path);
|
||||
CHECK_EQ(loaded.publicKeyString(), id.publicKeyString());
|
||||
@@ -84,8 +84,8 @@ namespace
|
||||
|
||||
TEST_CASE(identity_import_teamspeak_ini)
|
||||
{
|
||||
const std::string exportPath = "/tmp/echoion_ts_identity.ini";
|
||||
const std::string nativePath = "/tmp/echoion_imported_identity.txt";
|
||||
const std::string exportPath = "/tmp/void_teamspeak_identity.ini";
|
||||
const std::string nativePath = "/tmp/void_teamspeak_imported_identity.txt";
|
||||
{
|
||||
std::ofstream output(exportPath);
|
||||
output << "[Identity]\nidentity=\"" << teamSpeakExportForScalarOne(42)
|
||||
@@ -109,7 +109,7 @@ TEST_CASE(identity_import_teamspeak_ini)
|
||||
|
||||
TEST_CASE(identity_import_rejects_malformed_export)
|
||||
{
|
||||
const std::string path = "/tmp/echoion_bad_identity.ini";
|
||||
const std::string path = "/tmp/void_teamspeak_bad_identity.ini";
|
||||
{
|
||||
std::ofstream output(path);
|
||||
output << "[Identity]\nidentity=not-a-private-key\n";
|
||||
|
||||
Reference in new issue
Block a user