AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PKCS11Config.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_PKCS11CONFIG_H_
17 #define ACSDKPKCS11_PRIVATE_PKCS11CONFIG_H_
18 
19 #include <memory>
20 #include <string>
21 
22 namespace alexaClientSDK {
23 namespace acsdkPkcs11 {
24 
25 class PKCS11Key;
26 class PKCS11Slot;
27 class PKCS11Session;
28 
39 class PKCS11Config {
40 public:
46  static std::shared_ptr<PKCS11Config> create() noexcept;
47 
53  std::string getLibraryPath() const noexcept;
54 
60  std::string getUserPin() const noexcept;
61 
67  std::string getTokenName() const noexcept;
68 
74  std::string getDefaultKeyName() const noexcept;
75 
76 private:
78  PKCS11Config() noexcept;
79 
85  bool loadFromSettings() noexcept;
86 
88  std::string m_libraryPath;
90  std::string m_userPin;
92  std::string m_tokenName;
94  std::string m_defaultKeyName;
95 };
96 
97 } // namespace acsdkPkcs11
98 } // namespace alexaClientSDK
99 
100 #endif // ACSDKPKCS11_PRIVATE_PKCS11CONFIG_H_
alexaClientSDK::acsdkPkcs11::PKCS11Config::create
static std::shared_ptr< PKCS11Config > create() noexcept
Creates object.
Definition: PKCS11Config.cpp:32
alexaClientSDK::acsdkPkcs11::PKCS11Config::getTokenName
std::string getTokenName() const noexcept
Returns token name.
Definition: PKCS11Config.cpp:54
alexaClientSDK::acsdkPkcs11::PKCS11Config::getUserPin
std::string getUserPin() const noexcept
Returns PIN for authentication.
Definition: PKCS11Config.cpp:50
alexaClientSDK::acsdkPkcs11::PKCS11Config::getDefaultKeyName
std::string getDefaultKeyName() const noexcept
Returns main encryption key alias.
Definition: PKCS11Config.cpp:58
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::acsdkPkcs11::PKCS11Config::getLibraryPath
std::string getLibraryPath() const noexcept
Returns file path to PKCS11 library.
Definition: PKCS11Config.cpp:46
alexaClientSDK::acsdkPkcs11::PKCS11Config
PKCS11 Platform Configuration.
Definition: PKCS11Config.h:39

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