Package ghidra.framework.remote
Class SSHSignatureCallback
java.lang.Object
ghidra.framework.remote.SSHSignatureCallback
- All Implemented Interfaces:
Serializable,Callback
SSHSignatureCallback provides a Callback implementation used
to perform SSH authentication. This callback is instantiated
by the server with a random token which must be signed using the
user's SSH private key.
It is the responsibility of the callback handler to invoke the sign method and return this object in response to the callback. This callback must be signed and returned to the server in a short period of time or the authentication will fail.
The supplied token is validated by the server during authentication as one that it had issued but is primarily intended as the basis for the client's signature.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsChangeConstructorDescriptionSSHSignatureCallback(byte[] token, byte[] serverSignature) Construct callback with a random token to be signed by the client. -
Method Summary
ChangeModifier and TypeMethodDescriptionbyte[]Get the server signature of token (using server PKI)byte[]Returns signed token bytes set by callback handler.byte[]getToken()Returns token to be signed using user certificate.booleanisSigned()Returns true if callback has been signed.voidSign this challenge with the specified SSH private key.
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
SSHSignatureCallback
public SSHSignatureCallback(byte[] token, byte[] serverSignature) Construct callback with a random token to be signed by the client.- Parameters:
token- random bytes to be signedserverSignature- server signature of token (using server PKI)
-
-
Method Details
-
getToken
public byte[] getToken()Returns token to be signed using user certificate.- Returns:
- token to be signed using user certificate
-
getSignature
public byte[] getSignature()Returns signed token bytes set by callback handler.- Returns:
- signed token bytes set by callback handler
-
getServerSignature
public byte[] getServerSignature()Get the server signature of token (using server PKI)- Returns:
- the server's signature of the token bytes.
-
isSigned
public boolean isSigned()Returns true if callback has been signed.- Returns:
- true if callback has been signed
-
sign
Sign this challenge with the specified SSH private key.- Parameters:
privateKeyParameters- SSH private key parameters (RSAKeyParametersorRSAKeyParameters)- Throws:
IOException- if signature generation failed
-