plugin  2.1.3
Runtime plugin loader and Ed25519 DSO signing for C++ applications
fedem::sign::Verifier Class Reference

#include <Verifier.hh>

Static Public Member Functions

static VerifyResult verify (std::string const &soPath, std::string const &trustedKeysDir)
 
static bool isCached (std::string const &soPath)
 
static bool shouldLoad (std::string const &policy, TrustLevel level) noexcept
 

Static Private Member Functions

static VerifyResult verifyUncached (std::string const &soPath, std::string const &trustedKeysDir)
 Full verification without cache — called by verify() on first access. More...
 

Member Function Documentation

◆ verify()

VerifyResult fedem::sign::Verifier::verify ( std::string const &  soPath,
std::string const &  trustedKeysDir 
)
static

Verify the DSO at soPath.

Steps:

  1. Read .dso_manifest + .dso_sig ELF sections.
  2. Strip sections → temp file → compute SHA-256.
  3. Compare hash with manifest.sha256.
  4. Search trustedKeysDir for a *.pub whose fingerprint matches manifest.publicKeyId.
  5. Ed25519-verify the signature over the manifest JSON.

Result is cached by soPath — subsequent calls return the cached value.

Parameters
soPathpath to the DSO
trustedKeysDirdirectory containing *.pub files (PEM Ed25519)

References map, mtx, and verifyUncached().

Referenced by fedem::dso::DSOLoader::loadSigned(), and main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCached()

bool fedem::sign::Verifier::isCached ( std::string const &  soPath)
static

Returns true when soPath already has a cached result. Useful for suppressing redundant log lines across sessions.

References mtx.

◆ shouldLoad()

bool fedem::sign::Verifier::shouldLoad ( std::string const &  policy,
TrustLevel  level 
)
staticnoexcept

Decide whether to load a DSO given a policy string and trust level.

Parameters
policy"off" | "warn" | "strict"
levelresult of verify()
Returns
true → proceed with loading

References fedem::sign::REJECTED, and fedem::sign::TRUSTED.

◆ verifyUncached()

VerifyResult fedem::sign::Verifier::verifyUncached ( std::string const &  soPath,
std::string const &  trustedKeysDir 
)
staticprivate

The documentation for this class was generated from the following files: