![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Variables | |
sbyte4(* | sshClientSettings::funcPtrReleaseNakedAuthKeys )(sbyte4 connectionInstance, ubyte **ppFreeKeyBlob) |
Release (free) memory allocated for authentication keys. More... | |
sbyte4(* | sshClientSettings::funcPtrRetrieveNakedAuthKeys )(sbyte4 connectionInstance, ubyte **ppRetKeyBlob, ubyte4 *pRetKeyBlobLength) |
Get a public/private key pair (naked key blob). More... | |
sbyte4(* | sshClientSettings::funcPtrServerPubKeyAuth )(sbyte4 connectionInstance, const ubyte *pPubKey, ubyte4 pubKeyLength) |
Validate a public key. More... | |
sbyte4(* sshClientSettings::funcPtrReleaseNakedAuthKeys) (sbyte4 connectionInstance, ubyte **ppFreeKeyBlob) |
This callback function is invoked after a call to sshClientSettings::funcPtrRetrieveNakedKeys. It should release (free) the memory allocated for the public and private keys that were retrieved by the sshClientSettings::funcPtrRetrieveNakedKeys call.
Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to this callback pointer.
There are no flag dependencies to enable this callback.
connectionInstance | Connection instance returned from SSHC_connect(). |
ppFreeKeyBlob | Pointer to key blob (containing public/private key pair) to release (free). |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.sbyte4(* sshClientSettings::funcPtrRetrieveNakedAuthKeys) (sbyte4 connectionInstance, ubyte **ppRetKeyBlob, ubyte4 *pRetKeyBlobLength) |
This callback function is invoked when NanoSSH client needs to authenticate itself to the SSH server using public key authentication; it should return the key blob containing the public and private keys from the public and private authorization key files, respectively. (Therefore, NanoSSH client must have access to the client's unique key.)
Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to this callback pointer.
There are no flag dependencies to enable this callback.
connectionInstance | Connection instance returned from SSHC_connect(). |
ppRetKeyBlob | On return, pointer to address of key blob (containing public/private key pair). |
pRetKeyBlobLength | On return, pointer to number of bytes in returned key blob (ppRetKeyBlob ). |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.sbyte4(* sshClientSettings::funcPtrServerPubKeyAuth) (sbyte4 connectionInstance, const ubyte *pPubKey, ubyte4 pubKeyLength) |
This callback function is invoked during connection establishment; it should verify that the provided public key is on record, compare the provided and on-file keys, and return TRUE or FALSE to indicate whether the keys match. (If they match, the key is valid.)
Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to this callback pointer.
There are no flag dependencies to enable this callback.
connectionInstance | Connection instance returned from SSHC_connect(). |
pPubKey | Pointer to public key to validate. The public key ( pubKeyLength ) is a byte string representation of the keyblob, both version 1 and version 2 are supported:
|
pubKeyLength | Number of bytes in the public key (pPubKey ). |
TRUE
(1) if the provided key matches the key on file; otherwise FALSE
(0).