Show / Hide Table of Contents

VersionCommand Class

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

Get the YubiKey's firmware version number.

C#
public sealed class VersionCommand : IYubiKeyCommand<VersionResponse>
Inheritance object VersionCommand
Implements
IYubiKeyCommand<VersionResponse>

Remarks

The partner Response class is VersionResponse.

Example:

IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
VersionCommand versionCmd = new VersionCommand();
VersionResponse versionRsp = connection.SendCommand(versionCmd);
if (versionNum.Status == ResponseStatus.Success)
{
    FirmwareVersion versionNum = versionRsp.GetData();
}

Constructors

Name Description
VersionCommand()

Initializes a new instance of the VersionCommand class. This command has no input.

Properties

Name Description
Application

Gets the YubiKeyApplication to which this command belongs. For this command it's PIV.

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