summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-06 16:39:00 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-06 17:11:24 +0100
commit9bf9d52e21fc629140b27adb291a3d4e30b7122d (patch)
tree450ad9d057d4265b4fd3f4a668111f20febfab50 /include
parent965000129e9eeb27e1ab8805ff3286eae65ebf9b (diff)
dh: Add new ssh_get_publickey_hash() function.
Diffstat (limited to 'include')
-rw-r--r--include/libssh/libssh.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 84d05937..3833adcd 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -412,8 +412,20 @@ LIBSSH_API socket_t ssh_get_fd(ssh_session session);
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 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_pubkey_hash(ssh_session session, unsigned char **hash);
+
+enum ssh_publickey_hash_type {
+ SSH_PUBLICKEY_HASH_SHA1,
+ SSH_PUBLICKEY_HASH_MD5
+};
+LIBSSH_API int ssh_get_publickey_hash(const ssh_key key,
+ enum ssh_publickey_hash_type type,
+ unsigned char **hash,
+ size_t *hlen);
+
+SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash);
+
LIBSSH_API int ssh_get_random(void *where,int len,int strong);
LIBSSH_API int ssh_get_version(ssh_session session);
LIBSSH_API int ssh_get_status(ssh_session session);