summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-28 14:34:41 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-28 14:50:43 +0200
commita9eb0020b872c4436f636a9e1a3ccea2bea5c757 (patch)
treed84a1ebe5c709bcf621ad2ded17acffb348ebf4c
parentfb4f1412ba5d4cff86fb47bc4dd41e8f50d61059 (diff)
downloadlibssh-a9eb0020b872c4436f636a9e1a3ccea2bea5c757.tar.gz
libssh-a9eb0020b872c4436f636a9e1a3ccea2bea5c757.tar.xz
libssh-a9eb0020b872c4436f636a9e1a3ccea2bea5c757.zip
legacy: Move ssh_private_key and ssh_public_key typedefs.
-rw-r--r--include/libssh/legacy.h8
-rw-r--r--include/libssh/libssh.h4
-rw-r--r--include/libssh/server.h1
3 files changed, 8 insertions, 5 deletions
diff --git a/include/libssh/legacy.h b/include/libssh/legacy.h
index 0cbcb1e..1225daf 100644
--- a/include/libssh/legacy.h
+++ b/include/libssh/legacy.h
@@ -30,6 +30,10 @@
#ifndef LEGACY_H_
#define LEGACY_H_
+
+typedef struct ssh_private_key_struct* ssh_private_key;
+typedef struct ssh_public_key_struct* ssh_public_key;
+
LIBSSH_API int ssh_auth_list(ssh_session session);
LIBSSH_API int ssh_userauth_offer_pubkey(ssh_session session, const char *username, int type, ssh_string publickey);
LIBSSH_API int ssh_userauth_pubkey(ssh_session session, const char *username, ssh_string publickey, ssh_private_key privatekey);
@@ -99,8 +103,12 @@ LIBSSH_API ssh_public_key publickey_from_privatekey(ssh_private_key prv);
LIBSSH_API ssh_string publickey_to_string(ssh_public_key key);
LIBSSH_API int ssh_try_publickey_from_file(ssh_session session, const char *keyfile,
ssh_string *publickey, int *type);
+LIBSSH_API enum ssh_keytypes_e ssh_privatekey_type(ssh_private_key privatekey);
+
LIBSSH_API ssh_message ssh_message_retrieve(ssh_session session, uint32_t packettype);
+LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
+
LIBSSH_API void string_burn(ssh_string str);
LIBSSH_API ssh_string string_copy(ssh_string str);
LIBSSH_API void *string_data(ssh_string str);
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 868445f..7873ea7 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -111,8 +111,6 @@ typedef struct ssh_buffer_struct* ssh_buffer;
typedef struct ssh_channel_struct* ssh_channel;
typedef struct ssh_message_struct* ssh_message;
typedef struct ssh_pcap_file_struct* ssh_pcap_file;
-typedef struct ssh_private_key_struct* ssh_private_key;
-typedef struct ssh_public_key_struct* ssh_public_key;
typedef struct ssh_key_struct* ssh_key;
typedef struct ssh_scp_struct* ssh_scp;
typedef struct ssh_session_struct* ssh_session;
@@ -411,8 +409,6 @@ LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap);
LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void);
LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename);
-LIBSSH_API enum ssh_keytypes_e ssh_privatekey_type(ssh_private_key privatekey);
-
/**
* @brief SSH authentication callback.
*
diff --git a/include/libssh/server.h b/include/libssh/server.h
index 48f0eab..3e781c3 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -294,7 +294,6 @@ LIBSSH_API const char *ssh_message_auth_password(ssh_message msg);
*/
LIBSSH_API ssh_key ssh_message_auth_pubkey(ssh_message msg);
-LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
LIBSSH_API int ssh_message_auth_kbdint_is_response(ssh_message msg);
LIBSSH_API enum ssh_publickey_state_e ssh_message_auth_publickey_state(ssh_message msg);
LIBSSH_API int ssh_message_auth_reply_success(ssh_message msg,int partial);