rpc: replacing ssh_get_publickey() by ssh_get_server_publickey().

After version 0.7.5, libssh deprecated the function scope
ssh_get_publickey() and moved to ssh_get_server_publickey(). So, Libvirt
is failing to compile using this new function name.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Julio Faracco 2018-05-10 17:38:57 -03:00 committed by Andrea Bolognani
parent 463fa9c762
commit c9da6cbec9

View File

@ -214,7 +214,7 @@ virLibsshServerKeyAsString(virNetLibsshSessionPtr sess)
size_t keyhashlen;
char *str;
if (ssh_get_publickey(sess->session, &key) != SSH_OK) {
if (ssh_get_server_publickey(sess->session, &key) != SSH_OK) {
virReportError(VIR_ERR_LIBSSH, "%s",
_("failed to get the key of the current "
"session"));