Show / Hide Table of Contents

SetPinRetriesResponse Class

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

The response to the setting the number of retries for the PIN or PUK.

C#
public sealed class SetPinRetriesResponse : PivResponse, IYubiKeyResponse
Inheritance object YubiKeyResponse PivResponse SetPinRetriesResponse
Implements
IYubiKeyResponse

Remarks

This is the partner Response class to SetPinRetriesCommand.

To determine the result of the command, look at the Status. If Status is not one of the following values then an error has occurred.

StatusDescription
SuccessThe retry count successfully set.
AuthenticationRequiredThe Management key or PIN did not verify.

Example:

IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
var setPinRetriesCommand = new SetPinRetriesCommand (5, 5);
SetPinRetriesResponse setPinRetriesResponse =
    connection.SendCommand(setPinRetriesCommand);
if (setPinRetriesResponse.Status != ResponseStatus.Success)
{
  // Handle error
}

Constructors

Name Description
SetPinRetriesResponse(ResponseApdu)

Constructs a SetPinRetriesResponse based on a ResponseApdu received from the YubiKey.

In this article
Back to top Generated by DocFX