mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-11 03:48:28 +01:00
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / buster (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions
Build containers / Building container for linux/amd64 (push) Waiting to run
49 lines
1 KiB
C++
49 lines
1 KiB
C++
/*
|
|
* Copyright (c) 2013-2025, The PurpleI2P Project
|
|
*
|
|
* This file is part of Purple i2pd project and licensed under BSD3
|
|
*
|
|
* See full license text in LICENSE file at top of project tree
|
|
*/
|
|
|
|
#ifndef FAMILY_H__
|
|
#define FAMILY_H__
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <memory>
|
|
#include <openssl/evp.h>
|
|
#include "Identity.h"
|
|
|
|
namespace i2p
|
|
{
|
|
namespace data
|
|
{
|
|
typedef int FamilyID;
|
|
class Families
|
|
{
|
|
public:
|
|
|
|
Families ();
|
|
~Families ();
|
|
void LoadCertificates ();
|
|
bool VerifyFamily (const std::string& family, const IdentHash& ident,
|
|
std::string_view signature, const char * key = nullptr) const;
|
|
FamilyID GetFamilyID (const std::string& family) const;
|
|
|
|
private:
|
|
|
|
void LoadCertificate (const std::string& filename);
|
|
|
|
private:
|
|
|
|
std::map<std::string, std::pair<EVP_PKEY *, FamilyID> > m_SigningKeys; // family -> (verification pkey, id)
|
|
};
|
|
|
|
std::string CreateFamilySignature (const std::string& family, const IdentHash& ident);
|
|
// return base64 signature of empty string in case of failure
|
|
}
|
|
}
|
|
|
|
#endif
|