Show / Hide Table of Contents

CreateAttestationStatementCommand Constructor

CreateAttestationStatementCommand(byte)

Initializes a new instance of the CreateAttestationStatementCommand class. This command takes the slot number as input.

C#
public CreateAttestationStatementCommand(byte slotNumber)

Parameters

Type Name Description
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.

C#
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.

In this article
Back to top Generated by DocFX