CreateAttestationStatementCommand Constructor
CreateAttestationStatementCommand(Byte)
Initializes a new instance of the CreateAttestationStatementCommand class. This command takes the slot number as input.
public CreateAttestationStatementCommand(byte slotNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | slotNumber | The slot number containing the key to attest. |
Remarks
The slot number must be either 0x9A
, 0x9C
, 0x9D
,
0x9E
, or 82
through 95
. These are the slots named,
PivSlot.Authentication
, PivSlot.Signing
,
PivSlot.KeyManagement
, PivSlot.CardAuthentication
, and
PivSlot.Retired1
through PivSlot.Retired20
If the slot specified does not have a private key, the YubiKey will not build a certificate and return an error StatusWord.
CreateAttestationStatementCommand()
Initializes a new instance of the CreateAttestationStatementCommand
class.
public CreateAttestationStatementCommand()
Remarks
This constructor is provided for those developers who want to use the object initializer pattern. For example:
var command = new CreateAttestationStatementCommand()
{
SlotNumber = PivSlot.Signing,
};
There is no default slot number, hence, for this command to be valid, the slot number must be specified. So if you create an object using this constructor, you must set the SlotNumber property at some time before using it. Otherwise you will get an exception when you do use it.