mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
knownhosts: Add knownhosts to libssh_session group
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -43,6 +43,12 @@
|
|||||||
#include "libssh/dh.h"
|
#include "libssh/dh.h"
|
||||||
#include "libssh/knownhosts.h"
|
#include "libssh/knownhosts.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup libssh_session
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
static int hash_hostname(const char *name,
|
static int hash_hostname(const char *name,
|
||||||
unsigned char *salt,
|
unsigned char *salt,
|
||||||
unsigned int salt_size,
|
unsigned int salt_size,
|
||||||
@@ -523,7 +529,7 @@ out:
|
|||||||
*
|
*
|
||||||
* @param[in] session The session with with the values set to check.
|
* @param[in] session The session with with the values set to check.
|
||||||
*
|
*
|
||||||
* @return A @ssh_known_hosts_e return value.
|
* @return A ssh_known_hosts_e return value.
|
||||||
*/
|
*/
|
||||||
enum ssh_known_hosts_e ssh_session_has_known_hosts_entry(ssh_session session)
|
enum ssh_known_hosts_e ssh_session_has_known_hosts_entry(ssh_session session)
|
||||||
{
|
{
|
||||||
@@ -878,9 +884,11 @@ ssh_session_get_known_hosts_entry(ssh_session session,
|
|||||||
* SSH_KNOWN_HOSTS_NOT_FOUND: The known host file does not exist. The
|
* SSH_KNOWN_HOSTS_NOT_FOUND: The known host file does not exist. The
|
||||||
* host is thus unknown. File will be
|
* host is thus unknown. File will be
|
||||||
* created if host key is accepted.\n
|
* created if host key is accepted.\n
|
||||||
* SSH_KNOWN_HOSTS_ERROR: There had been an eror checking the host.
|
* SSH_KNOWN_HOSTS_ERROR: There had been an error checking the host.
|
||||||
*/
|
*/
|
||||||
enum ssh_known_hosts_e ssh_session_is_known_server(ssh_session session)
|
enum ssh_known_hosts_e ssh_session_is_known_server(ssh_session session)
|
||||||
{
|
{
|
||||||
return ssh_session_get_known_hosts_entry(session, NULL);
|
return ssh_session_get_known_hosts_entry(session, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|||||||
Reference in New Issue
Block a user