CreateCommandApdu Method
CreateCommandApdu()
Creates a well-formed CommandApdu to send to the YubiKey.
public CommandApdu CreateCommandApdu()
Returns
A valid CommandApdu that is ready to be sent to the YubiKey, or passed along to additional encoders for further processing.
Implements
Remarks
This version of the CreateCommandApdu method will build the APDU for
the authenticatorCredentialManagement command. That is, it is
equivalent to calling CreateCommandApdu(false)
.
This method will first perform validation on all of the parameters and data provided to it. The CommandAPDU it creates should contain all of the data payload for the command, even if it exceeds 65,535 bytes as specified by the ISO 7816-4 specification. The APDU will be properly chained by the device connection prior to being sent to the YubiKey, and the responses will collapsed into a single result.
CreateCommandApdu(Boolean)
Creates a well-formed CommandApdu to send to the YubiKey.
public CommandApdu CreateCommandApdu(bool isPreview)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isPreview | Indicates whether this command should use the CredentialMgmtPreview
command ( |
Returns
Remarks
This version of the CreateCommandApdu method contains an arg
indicating whether it should build an APDU for the
CredentialMgmtPreview command (true
) or for the
authenticatorCredentialManagement command (false
).
The authenticatorCredentialManagement command was introduced in FIDO2.1. Hence, YubiKeys that do not support 2.1 will not have this feature. However, there was a version "2_1_PRE" which contained the "CredentialMgmtPreview" command. Each "credMgmt" command has a corresponding operation in this preview command.
If the YubiKey does not support "credMgmt" but does support
"CredentialMgmtPreview", then pass true
as the isPreview arg.
Otherwise, either pass false
to this method or call the
CreateCommandApdu
method that take no argument.