AWS IoT Device SDK C++ v2: Aws::Crt::Io::TlsContextPkcs11Options Class Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Public Member Functions | List of all members
Aws::Crt::Io::TlsContextPkcs11Options Class Referencefinal

`#include <TlsOptions.h>`

## Public Member Functions
| TlsContextPkcs11Options (const std::shared_ptr< Pkcs11Lib > &pkcs11Lib, Allocator *allocator=g_allocator) noexcept
void | SetUserPin (const String &pin) noexcept
void | SetSlotId (const uint64_t id) noexcept
void | SetTokenLabel (const String &label) noexcept
void | SetPrivateKeyObjectLabel (const String &label) noexcept
void | SetCertificateFilePath (const String &path) noexcept
void | SetCertificateFileContents (const String &contents) noexcept

## Detailed Description

Options for TLS, when using a PKCS#11 library for private key operations.

See also
  TlsContextOptions::InitClientWithMtlsPkcs11()

## Constructor & Destructor Documentation

## ◆ TlsContextPkcs11Options()

Aws::Crt::Io::TlsContextPkcs11Options::TlsContextPkcs11Options | ( | const std::shared_ptr< Pkcs11Lib > & | pkcs11Lib,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| noexcept

Parameters

  pkcs11Lib | use this PKCS#11 library
  allocator | Memory allocator to use.

## Member Function Documentation

## ◆ SetCertificateFileContents()

void Aws::Crt::Io::TlsContextPkcs11Options::SetCertificateFileContents | ( | const String & | contents | ) |
| noexcept

Use this X.509 certificate (contents in memory). The certificate may be specified by other means instead (ex: SetCertificateFilePath())

Parameters

  contents | contents of PEM-formatted certificate file.

## ◆ SetCertificateFilePath()

void Aws::Crt::Io::TlsContextPkcs11Options::SetCertificateFilePath | ( | const String & | path | ) |
| noexcept

Use this X.509 certificate (file on disk). The certificate may be specified by other means instead (ex: SetCertificateFileContents())

Parameters

  path | path to PEM-formatted certificate file on disk.

## ◆ SetPrivateKeyObjectLabel()

void Aws::Crt::Io::TlsContextPkcs11Options::SetPrivateKeyObjectLabel | ( | const String & | label | ) |
| noexcept

Specify the label of the private key object on the PKCS#11 token. If not specified, the key will be chosen based on other criteria (such as being the only available private key on the token).

Parameters

  label | label of private key object

## ◆ SetSlotId()

void Aws::Crt::Io::TlsContextPkcs11Options::SetSlotId | ( | const uint64_t | id | ) |
| noexcept

Specify the slot ID containing a PKCS#11 token. If not specified, the token will be chosen based on other criteria (such as token label).

Parameters

  id | slot ID

## ◆ SetTokenLabel()

void Aws::Crt::Io::TlsContextPkcs11Options::SetTokenLabel | ( | const String & | label | ) |
| noexcept

Specify the label of the PKCS#11 token to use. If not specified, the token will be chosen based on other criteria (such as slot ID).

Parameters

  label | label of token

## ◆ SetUserPin()

void Aws::Crt::Io::TlsContextPkcs11Options::SetUserPin | ( | const String & | pin | ) |
| noexcept

Use this PIN to log the user into the PKCS#11 token. Leave unspecified to log into a token with a "protected authentication path".

Parameters

  pin | PIN

The documentation for this class was generated from the following files:

- crt/aws-crt-cpp/include/aws/crt/io/TlsOptions.h
- crt/aws-crt-cpp/source/io/TlsOptions.cpp