Class GetAes128SessionKeysResponse
- Namespace
- Yubico.YubiKey.YubiHsmAuth.Commands
- Assembly
- Yubico.YubiKey.dll
The response class to retrieve session keys for establishing a secure connection with a YubiHSM 2 device.
public class GetAes128SessionKeysResponse : BaseYubiHsmAuthResponseWithRetries, IYubiKeyResponseWithData<SessionKeys>, IYubiKeyResponse
- Inheritance
-
objectGetAes128SessionKeysResponse
- Implements
- Inherited Members
Remarks
If authentication with the credential's password failed, the Status will be set to AuthenticationRequired and RetriesRemaining will contain the number of retries remaining for the credential's password.
A credential may require the user to touch the YubiKey as part of the authentication procedure (see TouchRequired). If this proof of user presence fails, the Status will be set to RetryWithTouch, and the credential password retry count is not changed.
The associated command class is GetAes128SessionKeysCommand.
Constructors
GetAes128SessionKeysResponse(ResponseApdu)
Constructs a GetSessionKeysResponse based on a ResponseApdu received from the YubiKey.
public GetAes128SessionKeysResponse(ResponseApdu responseApdu)
Parameters
responseApdu
ResponseApduThe ResponseApdu returned by the YubiKey.
Methods
GetData()
Get the keys to create a secure session with a YubiHSM 2 device.
public SessionKeys GetData()
Returns
- SessionKeys
Session keys are used to establish an encrypted and authenticated session with a YubiHSM 2 device. The secure session is based on the Global Platform Secure Channel Protocol '03' (SCP03).
Remarks
If the method cannot return the data, it will throw an exception. This happens when the Status property indicates an error, or the data returned from the YubiKey was malformed or incomplete.
Exceptions
- InvalidOperationException
- MalformedYubiKeyResponseException
Invalid response data length.