SetPinRetriesResponse Class
Namespace: Yubico.YubiKey.Piv.Commands Assembly: Yubico.YubiKey.dllThe response to the setting the number of retries for the PIN or PUK.
C#
public sealed class SetPinRetriesResponse : PivResponse, IYubiKeyResponse
Implements
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.
Status | Description |
---|---|
Success | The retry count successfully set. |
AuthenticationRequired | The 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. |