AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PKCS11Slot.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKPKCS11_PRIVATE_PKCS11SLOT_H_
17 #define ACSDKPKCS11_PRIVATE_PKCS11SLOT_H_
18 
19 #include <memory>
20 #include <string>
21 
23 
24 namespace alexaClientSDK {
25 namespace acsdkPkcs11 {
26 
27 class PKCS11Functions;
28 class PKCS11Session;
29 
36 class PKCS11Slot {
37 public:
44  PKCS11Slot(std::shared_ptr<PKCS11Functions>&& functions, CK_SLOT_ID slotId) noexcept;
45 
53  bool getTokenName(std::string& tokenName) noexcept;
54 
60  std::shared_ptr<PKCS11Session> openSession() noexcept;
61 
62 private:
64  std::shared_ptr<PKCS11Functions> m_functions;
65 
67  CK_SLOT_ID m_slotID;
68 };
69 
70 } // namespace acsdkPkcs11
71 } // namespace alexaClientSDK
72 
73 #endif // ACSDKPKCS11_PRIVATE_PKCS11SLOT_H_
alexaClientSDK::acsdkPkcs11::PKCS11Slot::PKCS11Slot
PKCS11Slot(std::shared_ptr< PKCS11Functions > &&functions, CK_SLOT_ID slotId) noexcept
Constructs slot object.
Definition: PKCS11Slot.cpp:28
alexaClientSDK::acsdkPkcs11::PKCS11Slot::getTokenName
bool getTokenName(std::string &tokenName) noexcept
Returns token name.
Definition: PKCS11Slot.cpp:33
alexaClientSDK::acsdkPkcs11::PKCS11Slot
PKCS11 slot wrapper.
Definition: PKCS11Slot.h:36
alexaClientSDK::acsdkPkcs11::PKCS11Slot::openSession
std::shared_ptr< PKCS11Session > openSession() noexcept
Opens a new session for this slot.
Definition: PKCS11Slot.cpp:59
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
PKCS11API.h

AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0