summaryrefslogtreecommitdiffstats
path: root/include/libssh/libssh.h
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-09-18 22:04:03 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-10-29 19:58:28 +0200
commit2c04994443384224161d895d00255b5788e8376d (patch)
treed07f4eb26408d4e0f8b76d96212e11f23b20f699 /include/libssh/libssh.h
parente799c0ce7d046606d9391d826461c2782f072fa0 (diff)
downloadlibssh-2c04994443384224161d895d00255b5788e8376d.tar.gz
libssh-2c04994443384224161d895d00255b5788e8376d.tar.xz
libssh-2c04994443384224161d895d00255b5788e8376d.zip
pki: Add a ssh_key_cmp() function.
Diffstat (limited to 'include/libssh/libssh.h')
-rw-r--r--include/libssh/libssh.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index d09d9331..30e31de4 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -242,6 +242,11 @@ enum ssh_keytypes_e{
SSH_KEYTYPE_ECDSA
};
+enum ssh_keycmp_e {
+ SSH_KEY_CMP_PUBLIC = 0,
+ SSH_KEY_CMP_PRIVATE
+};
+
/* Error return codes */
#define SSH_OK 0 /* No error */
#define SSH_ERROR -1 /* Error of some kind */
@@ -458,6 +463,9 @@ LIBSSH_API const char *ssh_key_type_to_char(enum ssh_keytypes_e type);
LIBSSH_API enum ssh_keytypes_e ssh_key_type_from_name(const char *name);
LIBSSH_API int ssh_key_is_public(const ssh_key k);
LIBSSH_API int ssh_key_is_private(const ssh_key k);
+LIBSSH_API int ssh_key_cmp(const ssh_key k1,
+ const ssh_key k2,
+ enum ssh_keycmp_e what);
LIBSSH_API int ssh_pki_generate(enum ssh_keytypes_e type, int parameter,
ssh_key *pkey);