Show / Hide Table of Contents

AddCredentialCommand Class

Namespace: Yubico.YubiKey.YubiHsmAuth.Commands Assembly: Yubico.YubiKey.dll

The command class for adding a credential to the YubiHSM Auth application.

C#
public sealed class AddCredentialCommand : IYubiKeyCommand<AddCredentialResponse>
Inheritance object AddCredentialCommand
Implements
IYubiKeyCommand<AddCredentialResponse>

Remarks

The partner class is AddCredentialResponse. See CredentialWithSecrets for further information on the requirements of the new credential.

There is a limit of 8 attempts to authenticate with the management key before the management key is blocked. Once the management key is blocked, the application must be reset before performing operations which require authentication with the management key (such as adding credentials, deleting credentials, and changing the management key). To reset the application, see ResetApplicationCommand. Supplying the correct management key before the management key is blocked will reset the retry counter to 8.

Constructors

Name Description
AddCredentialCommand(ReadOnlyMemory<byte>, CredentialWithSecrets)

Add a credential to the YubiHSM Auth application.

Fields

Name Description
ValidManagementKeyLength

The management key must be exactly 16 bytes.

Properties

Name Description
Application

Gets the YubiKeyApplication (e.g. PIV, OATH, etc.) to which this command applies.

Methods

Name Description
CreateCommandApdu()

Creates a well-formed CommandApdu to send to the YubiKey.

CreateResponseForApdu(ResponseApdu)

Creates the corresponding IYubiKeyResponse implementation for the current command.

In this article
Back to top Generated by DocFX