9#ifndef BOTAN_P11_TYPES_H_
10#define BOTAN_P11_TYPES_H_
35 Module(std::string_view file_path,
62 m_low_level->C_GetInfo(&info);
67 const std::string m_file_path;
69 std::unique_ptr<Dynamically_Loaded_Library> m_library;
70 std::unique_ptr<LowLevel> m_low_level =
nullptr;
94 static std::vector<SlotId> get_available_slots(
Module& module,
bool token_present);
100 std::vector<MechanismType> get_mechanism_list()
const;
113 void initialize(std::string_view label,
const secure_string& so_pin)
const;
116 const std::reference_wrapper<Module> m_module;
#define BOTAN_PUBLIC_API(maj, min)
Provides access to all PKCS#11 functions.
void reload(C_InitializeArgs init_args={ nullptr, nullptr, nullptr, nullptr, static_cast< CK_FLAGS >(Flag::OsLockingOk), nullptr})
Module(std::string_view file_path, C_InitializeArgs init_args={ nullptr, nullptr, nullptr, nullptr, static_cast< CK_FLAGS >(Flag::OsLockingOk), nullptr})
Module(Module &&other) noexcept
LowLevel * operator->() const
Module & operator=(Module &&other)=delete
Module & operator=(const Module &other)=delete
Module(const Module &other)=delete
Session(Session &&other)=default
Session & operator=(Session &&other)=delete
Session(const Session &other)=delete
const Slot & slot() const
SessionHandle handle() const
Session & operator=(const Session &other)=delete
Session(Slot &slot, bool read_only)
Represents a PKCS#11 Slot, i.e., a card reader.
Slot(Module &module, SlotId slot_id)
secure_vector< uint8_t > secure_string
CK_C_INITIALIZE_ARGS C_InitializeArgs
CK_FUNCTION_LIST_PTR FunctionListPtr
CK_SESSION_INFO SessionInfo
void set_pin(Slot &slot, const secure_string &so_pin, const secure_string &pin)
CK_MECHANISM_INFO MechanismInfo
CK_SESSION_HANDLE SessionHandle