![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Variables | |
void(* | sshClientSettings::funcPtrAuthOpen )(sbyte4 connectionInstance) |
Inform the calling application that authentication has been successful. More... | |
sbyte4(* | sshClientSettings::funcPtrDisplayBanner )(sbyte4 connectionInstance, ubyte *pBanner, ubyte4 length, ubyte *pMsgLanguageTag) |
Display a warning message from the server. More... | |
sbyte4(* | sshClientSettings::funcPtrRetrieveUserAuthRequestInfo )(sbyte4 connectionInstance, ubyte *pAuthNameList, ubyte4 authNameListLen, ubyte **ppUserName, ubyte4 *pUserNameLength, ubyte4 *pMethod) |
Select which authentication methods can be used with the server. More... | |
sbyte4(* | sshClientSettings::funcPtrRetrieveUserAuthRequestInfoEx )(sbyte4 connectionInstance, ubyte messageCode, ubyte4 methodType, ubyte *pAuthNameList, ubyte4 authNameListLen, ubyte **ppUserName, ubyte4 *pUserNameLength, ubyte4 *pMethod, intBoolean *pSendSignature) |
Select which authentication methods can be used with the server, and decide whether to query if server supports authentication method first. More... | |
sbyte4(* | sshClientSettings::funcPtrRetrieveUserPassword )(sbyte4 connectionInstance, ubyte *pUserName, ubyte4 userNameLength, ubyte **ppUserPassword, ubyte4 *pUserPasswordLength) |
Return user's password and its length. More... | |
sbyte4(* | sshClientSettings::funcPtrSessionOpenFail )(sbyte4 connectionInstance, ubyte *pInfo, ubyte4 infoLength, ubyte *pLanguage, ubyte4 languageLength) |
Respond to a failed session open request. More... | |
MSTATUS(* | sshClientSettings::funcPtrSessionReKey )(sbyte4 connectionInstance, intBoolean initiatedByRemote) |
Inform the calling application that Session Rekey has been initiated. More... | |
void(* | sshClientSettings::funcPtrStartTimer )(sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 boolUserAuthenticated) |
Start a timer to use for timeout notifications. More... | |
void(* sshClientSettings::funcPtrAuthOpen) (sbyte4 connectionInstance) |
This callback function is invoked after successful authentication; it should inform the calling application that authentication has been successful.
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(). |
sbyte4(* sshClientSettings::funcPtrDisplayBanner) (sbyte4 connectionInstance, ubyte *pBanner, ubyte4 length, ubyte *pMsgLanguageTag) |
This callback function is invoked during authentication to display a warning message from the server.
Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to this callback pointer.
connectionInstance | Pointer to the SSH client instance. |
pBanner | Pointer to the banner string to display. |
length | Number of bytes in the banner string (pBanner ). |
pMsgLanguageTag | Pointer to the banner string language tag to be displayed on the screen. |
To enable this callback, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_AUTH_BANNER__
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::funcPtrRetrieveUserAuthRequestInfo) (sbyte4 connectionInstance, ubyte *pAuthNameList, ubyte4 authNameListLen, ubyte **ppUserName, ubyte4 *pUserNameLength, ubyte4 *pMethod) |
This callback function is invoked when the SSH server requests that NanoSSH client authenticate itself; it should select which authentication methods can be used with the server.
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(). |
pAuthNameList | Pointer to a comma-separated name-list of authentication 'method name' values. |
authNameListLen | Number of characters (bytes) in the name-list (pAuthNameList ). |
ppUserName | On return, pointer to address of user name buffer. |
pUserNameLength | On return, pointer to number of characters (bytes) in the user name (ppUserName ). |
pMethod | On return, pointer to bit mask of selected authentication method:
|
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::funcPtrRetrieveUserAuthRequestInfoEx) (sbyte4 connectionInstance, ubyte messageCode, ubyte4 methodType, ubyte *pAuthNameList, ubyte4 authNameListLen, ubyte **ppUserName, ubyte4 *pUserNameLength, ubyte4 *pMethod, intBoolean *pSendSignature) |
This callback function is invoked when the SSH server requests that NanoSSH client authenticate itself; it should select which authentication methods that can be used with the server.
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(). |
messageCode | The message code recieved by client. The message codes supported are the following:
|
methodType | The authentication method value associated with the messageCode recieved. If the value of messageCode is SSH_MSG_SERVICE_ACCEPT, this value hasn't been defined yet. |
pAuthNameList | Pointer to a comma-separated name-list of authentication 'method name' values. |
authNameListLen | Number of characters (bytes) in the name-list (pAuthNameList ). |
ppUserName | On return, pointer to address of user name buffer. |
pUserNameLength | On return, pointer to number of characters (bytes) in the user name (ppUserName ). |
pMethod | On return, pointer to bit mask of selected authentication method:
|
pSendSignature | On return, pointer to intBoolean used to determine whether signature is sent in authentication message. If TRUE, signature is sent. |
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::funcPtrRetrieveUserPassword) (sbyte4 connectionInstance, ubyte *pUserName, ubyte4 userNameLength, ubyte **ppUserPassword, ubyte4 *pUserPasswordLength) |
This callback function is invoked when the SSH server requests authentication; it should return the user's password and its length.
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(). |
pUserName | Pointer to user name buffer. |
userNameLength | Number of characters (bytes) in the user name (userName ). |
ppUserPassword | On return, pointer to address of user password buffer. |
pUserPasswordLength | On return, pointer to number of characters in user password (ppUserPassword ). |
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::funcPtrSessionOpenFail) (sbyte4 connectionInstance, ubyte *pInfo, ubyte4 infoLength, ubyte *pLanguage, ubyte4 languageLength) |
This callback function is invoked when the SSH Client attempts to open a service, but fails because the service is not available on the server. This callback function should try a different service or return an error code.
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(). |
pInfo | Pointer to text explaining why the session was closed. |
infoLength | Number of bytes in text explanation (pInfo ). |
pLanguage | Pointer to language tag as defined in RFC 1766, Tags for the Identification of Languages; includes the ISO 639 2-letter language code. |
languageLength | Number of bytes in language tag (pLanguage ). |
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.MSTATUS(* sshClientSettings::funcPtrSessionReKey) (sbyte4 connectionInstance, intBoolean initiatedByRemote) |
This callback function is invoked on rekey negotiation start (initiated locally or by remote) - allowing the application to take update session context.
There are no flag dependencies to enable this callback.
connectionInstance | Connection instance returned from SSHC_connect. |
initiatedByRemote | True if the rekey was initiated by remote. |
void(* sshClientSettings::funcPtrStartTimer) (sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 boolUserAuthenticated) |
This callback starts a timer to use for timeout notifications.
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 SSL_ASYNC_acceptconnection(). |
msTimerExpire | Number of milliseconds until timer expires. |
boolUserAuthenticated | (Reserved for future use.) |