|
Botan 3.11.0
Crypto and TLS for C&
|
Wraps a PKCS #11 Interface object. More...
#include <p11.h>
Public Member Functions | |
| const FunctionList & | func_2_40 () const |
| Access a function list that contains all methods since PKCS #11 v.2.40. | |
| const FunctionList30 & | func_3_0 () const |
| Access a function list that contains all methods since PKCS #11 v.3.0. | |
| const FunctionList32 & | func_3_2 () const |
| Access a function list that contains all methods since PKCS #11 v.3.2. | |
| InterfaceWrapper (const InterfaceWrapper &)=default | |
| InterfaceWrapper (Interface raw_interface) | |
| Basic constructor using an interface. | |
| InterfaceWrapper (InterfaceWrapper &&)=default | |
| std::span< const Utf8Char > | name () const |
| Access the name of the interface. | |
| InterfaceWrapper & | operator= (const InterfaceWrapper &)=default |
| InterfaceWrapper & | operator= (InterfaceWrapper &&)=default |
| const Interface & | raw_interface () const |
| Access the underlying interface object. | |
| Version | version () const |
| Access the version of the interface. | |
| ~InterfaceWrapper ()=default | |
Static Public Member Functions | |
| static InterfaceWrapper | latest_p11_interface (Dynamically_Loaded_Library &library) |
| static Utf8Char * | p11_interface_name_ptr () |
Wraps a PKCS #11 Interface object.
This class provides an interface to access PKCS #11 functions of various versions. For example func_3_0() returns the PKCS #11 v3.0 function list for a loaded interface. Only the official "PKCS 11" named interfaces are supported.
|
explicit |
Basic constructor using an interface.
Definition at line 53 of file p11_interface.cpp.
References BOTAN_ASSERT_NONNULL, and raw_interface().
Referenced by InterfaceWrapper(), InterfaceWrapper(), latest_p11_interface(), operator=(), and operator=().
|
default |
References InterfaceWrapper().
|
default |
References InterfaceWrapper().
|
default |
| const FunctionList & Botan::PKCS11::InterfaceWrapper::func_2_40 | ( | ) | const |
Access a function list that contains all methods since PKCS #11 v.2.40.
Definition at line 124 of file p11_interface.cpp.
References name(), CK_INTERFACE::pFunctionList, and raw_interface().
| const FunctionList30 & Botan::PKCS11::InterfaceWrapper::func_3_0 | ( | ) | const |
Access a function list that contains all methods since PKCS #11 v.3.0.
Definition at line 131 of file p11_interface.cpp.
References name(), CK_INTERFACE::pFunctionList, raw_interface(), and version().
| const FunctionList32 & Botan::PKCS11::InterfaceWrapper::func_3_2 | ( | ) | const |
Access a function list that contains all methods since PKCS #11 v.3.2.
Definition at line 141 of file p11_interface.cpp.
References name(), CK_INTERFACE::pFunctionList, raw_interface(), and version().
|
static |
Find the latest supported "PKCS 11" interface. Fork safe interfaces are preferred over non fork safe ones of the same version.
Definition at line 66 of file p11_interface.cpp.
References Botan::PKCS11::LowLevel::C_GetFunctionList(), Botan::PKCS11::LowLevel::C_GetInterfaceList(), CK_INTERFACE::flags, Botan::PKCS11::InterfaceForkSafe, InterfaceWrapper(), p11_interface_name_ptr(), and version().
Referenced by Botan::PKCS11::Module::reload().
| std::span< const Utf8Char > Botan::PKCS11::InterfaceWrapper::name | ( | ) | const |
Access the name of the interface.
Definition at line 62 of file p11_interface.cpp.
Referenced by func_2_40(), func_3_0(), and func_3_2().
|
default |
References InterfaceWrapper().
|
default |
References InterfaceWrapper().
|
static |
Returns an immortal pointer to the Utf8Char string "PKCS 11". Used to define an interface object.
Definition at line 151 of file p11_interface.cpp.
Referenced by latest_p11_interface(), and Botan::PKCS11::LowLevel::LowLevel().
|
inline |
Access the underlying interface object.
Definition at line 1290 of file p11.h.
Referenced by func_2_40(), func_3_0(), func_3_2(), and InterfaceWrapper().
| Version Botan::PKCS11::InterfaceWrapper::version | ( | ) | const |
Access the version of the interface.
Definition at line 58 of file p11_interface.cpp.
Referenced by func_3_0(), func_3_2(), and latest_p11_interface().