|
aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
|
#include <Pkcs11.h>
Public Types | |
| enum class | InitializeFinalizeBehavior { Default , Omit , Strict } |
Public Member Functions | |
| ~Pkcs11Lib () | |
Static Public Member Functions | |
| static std::shared_ptr< Pkcs11Lib > | Create (const String &filename, Allocator *allocator=ApiAllocator()) |
| static std::shared_ptr< Pkcs11Lib > | Create (const String &filename, InitializeFinalizeBehavior initializeFinalizeBehavior, Allocator *allocator=ApiAllocator()) |
Handle to a loaded PKCS#11 library.
For most use cases, a single instance of Pkcs11Lib should be used for the lifetime of your application.
Controls how Pkcs11Lib calls C_Initialize() and C_Finalize() on the PKCS#11 library.
| Enumerator | |
|---|---|
| Default | Default behavior that accommodates most use cases.
|
| Omit | Skip calling Use this if your application has already initialized the PKCS#11 library, and you do not want |
| Strict |
If |
| Aws::Crt::Io::Pkcs11Lib::~Pkcs11Lib | ( | ) |
|
static |
Load and initialize a PKCS#11 library.
C_Initialize() and C_Finalize() are called on the PKCS#11 library in the InitializeFinalizeBehavior::Default way.
| filename | Name or path of PKCS#11 library file to load (UTF-8). Pass an empty string if your application already has PKCS#11 symbols linked in. |
| allocator | Memory allocator to use. |
shared_ptr containing the Pkcs11Lib is returned. If unsuccessful the shared_ptr will be empty, and Aws::Crt::LastError() will contain the error that occurred.
|
static |
Load a PKCS#11 library, specifying how C_Initialize() and C_Finalize() will be called.
| filename | Name or path of PKCS#11 library file to load (UTF-8). Pass an empty string if your application already has PKCS#11 symbols linked in. |
| initializeFinalizeBehavior | Specifies how C_Initialize() and C_Finalize() will be called on the PKCS#11 library. |
| allocator | Memory allocator to use. |
shared_ptr containing the Pkcs11Lib is returned. If unsuccessful the shared_ptr will be empty, and Aws::Crt::LastError() will contain the error that occurred.