9#ifndef BOTAN_P11_TYPES_H_
10#define BOTAN_P11_TYPES_H_
20class Dynamically_Loaded_Library;
35 Module(std::string_view file_path,
37 nullptr,
nullptr,
nullptr,
nullptr,
static_cast<CK_FLAGS>(Flag::OsLockingOk),
nullptr});
55 nullptr,
nullptr,
nullptr,
nullptr,
static_cast<CK_FLAGS>(Flag::OsLockingOk),
nullptr});
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;
151 inline const
Slot& slot()
const {
return m_slot; }
Provides access to all PKCS#11 functions.
Module(Module &&other) noexcept
LowLevel * operator->() const
Module & operator=(Module &&other)=delete
Module & operator=(const Module &other)=delete
Module(const Module &other)=delete
Represents a PKCS#11 session.
Session(Session &&other)=default
Session & operator=(Session &&other)=delete
Session(const Session &other)=delete
SessionHandle handle() const
Session & operator=(const Session &other)=delete
Represents a PKCS#11 Slot, i.e., a card reader.
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
secure_vector< uint8_t > secure_string
CK_FUNCTION_LIST_PTR FunctionListPtr
void set_pin(Slot &slot, const secure_string &so_pin, const secure_string &pin)
CK_SESSION_HANDLE SessionHandle