AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Pkcs11.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include <aws/crt/Types.h>
8 
9 struct aws_pkcs11_lib;
10 
11 namespace Aws
12 {
13  namespace Crt
14  {
15  namespace Io
16  {
24  {
25  public:
31  {
39  Default,
40 
47  Omit,
48 
57  Strict,
58  };
59 
75  static std::shared_ptr<Pkcs11Lib> Create(const String &filename, Allocator *allocator = ApiAllocator());
76 
92  static std::shared_ptr<Pkcs11Lib> Create(
93  const String &filename,
94  InitializeFinalizeBehavior initializeFinalizeBehavior,
95  Allocator *allocator = ApiAllocator());
96 
97  ~Pkcs11Lib();
98 
100  aws_pkcs11_lib *GetNativeHandle() { return impl; }
101 
103  explicit Pkcs11Lib(aws_pkcs11_lib &impl);
104 
105  private:
106  // no copy/move
107  Pkcs11Lib(const Pkcs11Lib &) = delete;
108  Pkcs11Lib(Pkcs11Lib &&) = delete;
109  Pkcs11Lib &operator=(const Pkcs11Lib &) = delete;
110  Pkcs11Lib &operator=(Pkcs11Lib &&) = delete;
111 
112  aws_pkcs11_lib *impl = nullptr;
113  };
114  } // namespace Io
115  } // namespace Crt
116 } // namespace Aws
Aws::Crt::Io::Pkcs11Lib
Definition: Pkcs11.h:24
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
Aws::Crt::Io::Pkcs11Lib::InitializeFinalizeBehavior
InitializeFinalizeBehavior
Definition: Pkcs11.h:31
Types.h
AWS_CRT_CPP_API
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Aws
Definition: Allocator.h:11
Aws::Crt::Allocator
aws_allocator Allocator
Definition: Allocator.h:14
Aws::Crt::String
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:45