Table of Contents

Class SetPinRetriesResponse

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

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

public sealed class SetPinRetriesResponse : PivResponse, IYubiKeyResponse
Inheritance
object
SetPinRetriesResponse
Implements
Inherited Members

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

SetPinRetriesResponse(ResponseApdu)

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

public SetPinRetriesResponse(ResponseApdu responseApdu)

Parameters

responseApdu ResponseApdu

The object containing the response APDU
returned by the YubiKey.