mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
dh: Add ssh_get_publickey().
This commit is contained in:
@@ -696,6 +696,14 @@ int ssh_try_publickey_from_file(ssh_session session,
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssh_string ssh_get_pubkey(ssh_session session){
|
||||
if(session==NULL || session->current_crypto ==NULL ||
|
||||
session->current_crypto->server_pubkey==NULL)
|
||||
return NULL;
|
||||
else
|
||||
return ssh_string_copy(session->current_crypto->server_pubkey);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* SERVER SUPPORT
|
||||
****************************************************************************/
|
||||
|
Reference in New Issue
Block a user