SetLegacyDeviceConfiguration Method
SetLegacyDeviceConfiguration(YubiKeyCapabilities, Byte, Boolean, Int32)
Manage configuration settings on YubiKeys prior to firmware version 5.
public void SetLegacyDeviceConfiguration(YubiKeyCapabilities yubiKeyInterfaces, byte challengeResponseTimeout, bool touchEjectEnabled, int autoEjectTimeout)
Parameters
Type | Name | Description |
---|---|---|
YubiKeyCapabilities | yubiKeyInterfaces | The desired set of USB interfaces to enable on the YubiKey. Any non-interface values are ignored. A set flag means that the related interface is enabled. Otherwise, the interface is disabled. At least one available USB interface must be enabled.
If |
System.Byte | challengeResponseTimeout | The length of the timeout in seconds. A value of |
System.Boolean | touchEjectEnabled | true is the equivalent of setting TouchEject. And false disables it. |
System.Int32 | autoEjectTimeout |
The length of the timeout in seconds. If
If this value is non-zero, then |
Implements
Exceptions
Type | Condition |
---|---|
System.ArgumentException | |
System.ArgumentOutOfRangeException | |
System.InvalidOperationException | Either the command failed to complete, or the set of desired capabilities is invalid. |
System.NotSupportedException | An error occurred when attempting to connect to the device. |
Remarks
This is the only configuration operation available to YubiKeys prior to firmware version 5. These YubiKeys have limited configuration settings, and all of them must be set at the same time. Important: once this operation succeeds, the YubiKey must be removed from the USB slot and then reinserted. This will allow the YubiKey to initialize all of the selected modes. This operation modifies the values related to
Interfaces are a subset of the YubiKeyCapabilities:
For YubiKeys with at least firmware version 5, it is recommended to use the other configuration operations in IYubiKeyDevice since they provide more fine control.