IsValidSlotNumberForSigning Method
IsValidSlotNumberForSigning(Byte)
Is the given number a valid slot number for signing arbitrary data.
public static bool IsValidSlotNumberForSigning(byte slotNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | slotNumber | The number to check. |
Returns
True if slotNumber
is a valid PIV asymmetric key slot that can
sign, or False otherwise.
Remarks
Note that if a slot is valid for signing, it is also valid for decrypting, key exchange, and obtaining an attestation statement as well.
This verifies that a number given is not only a valid slot number,
but a valid slot number for a slot that can perform signing. For
example, if the input is 0x9A
, it will return
true
. If the input is 0x80
, 0x9B
, or F9
,
it will return false
. Even though 80
and 9B
are valid
slot numbers, they are for slots that cannot sign. And even though
F9
holds an asymmetric key, and it will sign certificates it
creates for attestation, it cannot sign arbitrary data.
See the User's Manual entry on PIV slots for more details on each of the possible slots.