1
0
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:
Andreas Schneider
2011-10-05 17:50:31 +02:00
parent 2cc48db673
commit e799c0ce7d
4 changed files with 33 additions and 7 deletions

View File

@@ -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
****************************************************************************/