1
1

dh: Rename ssh_get_publickey() to ssh_get_server_publickey()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Andreas Schneider 2016-05-02 06:27:40 +02:00
родитель e37fd83254
Коммит bbd0522026
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -445,7 +445,7 @@ LIBSSH_API char *ssh_get_hexa(const unsigned char *what, size_t len);
LIBSSH_API char *ssh_get_issue_banner(ssh_session session); LIBSSH_API char *ssh_get_issue_banner(ssh_session session);
LIBSSH_API int ssh_get_openssh_version(ssh_session session); LIBSSH_API int ssh_get_openssh_version(ssh_session session);
LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key); LIBSSH_API int ssh_get_server_publickey(ssh_session session, ssh_key *key);
enum ssh_publickey_hash_type { enum ssh_publickey_hash_type {
SSH_PUBLICKEY_HASH_SHA1, SSH_PUBLICKEY_HASH_SHA1,
@ -461,6 +461,7 @@ SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash(ssh_session session, unsigned
SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms); SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms);
SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel(ssh_session session, const char *address, int port); SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel(ssh_session session, const char *address, int port);
SSH_DEPRECATED LIBSSH_API int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port); SSH_DEPRECATED LIBSSH_API int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port);
SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key);
LIBSSH_API int ssh_get_random(void *where,int len,int strong); LIBSSH_API int ssh_get_random(void *where,int len,int strong);

Просмотреть файл

@ -961,7 +961,7 @@ void ssh_clean_pubkey_hash(unsigned char **hash) {
* *
* @see ssh_key_free() * @see ssh_key_free()
*/ */
int ssh_get_publickey(ssh_session session, ssh_key *key) int ssh_get_server_publickey(ssh_session session, ssh_key *key)
{ {
if (session==NULL || if (session==NULL ||
session->current_crypto ==NULL || session->current_crypto ==NULL ||
@ -973,6 +973,14 @@ int ssh_get_publickey(ssh_session session, ssh_key *key)
key); key);
} }
/**
* @deprecated Use ssh_get_server_publickey()
*/
int ssh_get_publickey(ssh_session session, ssh_key *key)
{
return ssh_get_server_publickey(session, key);
}
/** /**
* @brief Allocates a buffer with the hash of the public key. * @brief Allocates a buffer with the hash of the public key.
* *