diff options
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/session.c b/src/session.c index 204adad6..3a0a90d4 100644 --- a/src/session.c +++ b/src/session.c @@ -311,7 +311,7 @@ const char* ssh_get_serverbanner(ssh_session session) { } /** - * @brief get the name of the input for the given session. + * @brief get the name of the input cipher for the given session. * * @param[in] session The SSH session. * @@ -343,6 +343,36 @@ const char* ssh_get_cipher_out(ssh_session session) { } /** + * @brief get the name of the input HMAC algorithm for the given session. + * + * @param[in] session The SSH session. + * + * @return Returns HMAC algorithm name or NULL if unknown. + */ +const char* ssh_get_hmac_in(ssh_session session) { + if ((session != NULL) && + (session->current_crypto != NULL)) { + return ssh_hmac_type_to_string(session->current_crypto->in_hmac); + } + return NULL; +} + +/** + * @brief get the name of the output HMAC algorithm for the given session. + * + * @param[in] session The SSH session. + * + * @return Returns HMAC algorithm name or NULL if unknown. + */ +const char* ssh_get_hmac_out(ssh_session session) { + if ((session != NULL) && + (session->current_crypto != NULL)) { + return ssh_hmac_type_to_string(session->current_crypto->out_hmac); + } + return NULL; +} + +/** * @brief Disconnect impolitely from a remote host by closing the socket. * * Suitable if you forked and want to destroy this session. |