Botan 3.8.1
Crypto and TLS for C&
|
#include <dyn_load.h>
Public Member Functions | |
Dynamically_Loaded_Library (std::string_view lib_name) | |
template<typename T> | |
T | resolve (const std::string &symbol) |
void * | resolve_symbol (const std::string &symbol) |
~Dynamically_Loaded_Library () | |
Represents a DLL or shared object
Definition at line 19 of file dyn_load.h.
Botan::Dynamically_Loaded_Library::Dynamically_Loaded_Library | ( | std::string_view | lib_name | ) |
Load a DLL (or fail with an exception)
lib_name | name or path to a library |
If you don't use a full path, the search order will be defined by whatever the system linker does by default. Always using fully qualified pathnames can help prevent code injection attacks (eg via manipulation of LD_LIBRARY_PATH on Linux)
Definition at line 41 of file dyn_load.cpp.
Botan::Dynamically_Loaded_Library::~Dynamically_Loaded_Library | ( | ) |
Unload the DLL
Definition at line 61 of file dyn_load.cpp.
|
inline |
Convenience function for casting symbol to the right type
symbol | names the symbol to load |
Definition at line 52 of file dyn_load.h.
References resolve_symbol().
Referenced by Botan::PKCS11::LowLevel::C_GetFunctionList().
void * Botan::Dynamically_Loaded_Library::resolve_symbol | ( | const std::string & | symbol | ) |
Load a symbol (or fail with an exception)
symbol | names the symbol to load |
Definition at line 69 of file dyn_load.cpp.
References Botan::fmt().
Referenced by resolve().