aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-06-28 17:52:58 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-06-29 14:41:14 +0200
commit206f3ff895d3d822ac4f23426136537129f9f062 (patch)
tree59728e18437ec9308d14a50082ef831b5b158612 /include
parent81b4320318966e83678641a06717c301b071971b (diff)
downloadlibssh-206f3ff895d3d822ac4f23426136537129f9f062.tar.gz
libssh-206f3ff895d3d822ac4f23426136537129f9f062.tar.xz
libssh-206f3ff895d3d822ac4f23426136537129f9f062.zip
Rest in Peace SSHv1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/CMakeLists.txt7
-rw-r--r--include/libssh/auth.h16
-rw-r--r--include/libssh/buffer.h3
-rw-r--r--include/libssh/channels.h16
-rw-r--r--include/libssh/crypto.h2
-rw-r--r--include/libssh/kex.h3
-rw-r--r--include/libssh/misc.h2
-rw-r--r--include/libssh/packet.h11
-rw-r--r--include/libssh/pki.h4
-rw-r--r--include/libssh/pki_priv.h4
-rw-r--r--include/libssh/priv.h11
-rw-r--r--include/libssh/session.h4
-rw-r--r--include/libssh/ssh1.h82
-rw-r--r--include/libssh/wrapper.h2
14 files changed, 9 insertions, 158 deletions
diff --git a/include/libssh/CMakeLists.txt b/include/libssh/CMakeLists.txt
index 258e85fb..85ffa6f0 100644
--- a/include/libssh/CMakeLists.txt
+++ b/include/libssh/CMakeLists.txt
@@ -15,13 +15,6 @@ if (WITH_SFTP)
)
endif (WITH_SFTP)
-if (WITH_SSH1)
- set(libssh_HDRS
- ${libssh_HDRS}
- ssh1.h
- )
-endif (WITH_SSH1)
-
if (WITH_SERVER)
set(libssh_HDRS
${libssh_HDRS}
diff --git a/include/libssh/auth.h b/include/libssh/auth.h
index 2c0012b0..3913f219 100644
--- a/include/libssh/auth.h
+++ b/include/libssh/auth.h
@@ -49,20 +49,6 @@ ssh_kbdint ssh_kbdint_new(void);
void ssh_kbdint_clean(ssh_kbdint kbd);
void ssh_kbdint_free(ssh_kbdint kbd);
-
-#ifdef WITH_SSH1
-void ssh_auth1_handler(ssh_session session, uint8_t type);
-
-/* auth1.c */
-int ssh_userauth1_none(ssh_session session, const char *username);
-int ssh_userauth1_offer_pubkey(ssh_session session, const char *username,
- int type, ssh_string pubkey);
-int ssh_userauth1_password(ssh_session session, const char *username,
- const char *password);
-
-
-#endif
-
/** @internal
* States of authentication in the client-side. They describe
* what was the last response from the server
@@ -104,8 +90,6 @@ enum ssh_auth_service_state_e {
SSH_AUTH_SERVICE_ACCEPTED,
/** Access to service denied (fatal) */
SSH_AUTH_SERVICE_DENIED,
- /** Specific to SSH1 */
- SSH_AUTH_SERVICE_USER_SENT
};
#endif /* AUTH_H_ */
diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h
index 14ce5e67..0765ce07 100644
--- a/include/libssh/buffer.h
+++ b/include/libssh/buffer.h
@@ -82,8 +82,7 @@ int ssh_buffer_get_u64(ssh_buffer buffer, uint64_t *data);
/* ssh_buffer_get_ssh_string() is an exception. if the String read is too large or invalid, it will answer NULL. */
ssh_string ssh_buffer_get_ssh_string(ssh_buffer buffer);
-/* ssh_gets a string out of a SSH-1 mpint */
-ssh_string ssh_buffer_get_mpint(ssh_buffer buffer);
+
/* ssh_buffer_pass_bytes acts as if len bytes have been read (used for padding) */
uint32_t ssh_buffer_pass_bytes_end(ssh_buffer buffer, uint32_t len);
uint32_t ssh_buffer_pass_bytes(ssh_buffer buffer, uint32_t len);
diff --git a/include/libssh/channels.h b/include/libssh/channels.h
index 2c34bf55..e3344890 100644
--- a/include/libssh/channels.h
+++ b/include/libssh/channels.h
@@ -71,7 +71,6 @@ struct ssh_channel_struct {
ssh_buffer stdout_buffer;
ssh_buffer stderr_buffer;
void *userarg;
- int version;
int exit_status;
enum ssh_channel_request_state_e request_state;
struct ssh_list *callbacks; /* list of ssh_channel_callbacks */
@@ -100,20 +99,5 @@ int ssh_channel_flush(ssh_channel channel);
uint32_t ssh_channel_new_id(ssh_session session);
ssh_channel ssh_channel_from_local(ssh_session session, uint32_t id);
void ssh_channel_do_free(ssh_channel channel);
-#ifdef WITH_SSH1
-SSH_PACKET_CALLBACK(ssh_packet_data1);
-SSH_PACKET_CALLBACK(ssh_packet_close1);
-SSH_PACKET_CALLBACK(ssh_packet_exist_status1);
-
-/* channels1.c */
-int ssh_channel_open_session1(ssh_channel channel);
-int ssh_channel_request_pty_size1(ssh_channel channel, const char *terminal,
- int cols, int rows);
-int ssh_channel_change_pty_size1(ssh_channel channel, int cols, int rows);
-int ssh_channel_request_shell1(ssh_channel channel);
-int ssh_channel_request_exec1(ssh_channel channel, const char *cmd);
-int ssh_channel_write1(ssh_channel channel, const void *data, int len);
-ssh_channel ssh_get_channel1(ssh_session session);
-#endif
#endif /* CHANNELS_H_ */
diff --git a/include/libssh/crypto.h b/include/libssh/crypto.h
index 2447de14..f0d09342 100644
--- a/include/libssh/crypto.h
+++ b/include/libssh/crypto.h
@@ -67,8 +67,6 @@ enum ssh_cipher_e {
SSH_NO_CIPHER=0,
SSH_BLOWFISH_CBC,
SSH_3DES_CBC,
- SSH_3DES_CBC_SSH1,
- SSH_DES_CBC_SSH1,
SSH_AES128_CBC,
SSH_AES192_CBC,
SSH_AES256_CBC,
diff --git a/include/libssh/kex.h b/include/libssh/kex.h
index e38fafff..3e9b69b5 100644
--- a/include/libssh/kex.h
+++ b/include/libssh/kex.h
@@ -32,9 +32,6 @@ struct ssh_kex_struct {
};
SSH_PACKET_CALLBACK(ssh_packet_kexinit);
-#ifdef WITH_SSH1
-SSH_PACKET_CALLBACK(ssh_packet_publickey1);
-#endif
int ssh_send_kex(ssh_session session, int server_kex);
void ssh_list_kex(struct ssh_kex_struct *kex);
diff --git a/include/libssh/misc.h b/include/libssh/misc.h
index 6aaeee7c..bc50cff8 100644
--- a/include/libssh/misc.h
+++ b/include/libssh/misc.h
@@ -29,7 +29,7 @@ int ssh_file_readaccess_ok(const char *file);
char *ssh_path_expand_tilde(const char *d);
char *ssh_path_expand_escape(ssh_session session, const char *s);
-int ssh_analyze_banner(ssh_session session, int server, int *ssh1, int *ssh2);
+int ssh_analyze_banner(ssh_session session, int server);
int ssh_is_ipaddr_v4(const char *str);
int ssh_is_ipaddr(const char *str);
diff --git a/include/libssh/packet.h b/include/libssh/packet.h
index b10308f7..1a9283d8 100644
--- a/include/libssh/packet.h
+++ b/include/libssh/packet.h
@@ -45,17 +45,6 @@ enum ssh_packet_state_e {
int ssh_packet_send(ssh_session session);
-#ifdef WITH_SSH1
-int ssh_packet_send1(ssh_session session) ;
-void ssh_packet_set_default_callbacks1(ssh_session session);
-
-SSH_PACKET_CALLBACK(ssh_packet_disconnect1);
-SSH_PACKET_CALLBACK(ssh_packet_smsg_success1);
-SSH_PACKET_CALLBACK(ssh_packet_smsg_failure1);
-int ssh_packet_socket_callback1(const void *data, size_t receivedlen, void *user);
-
-#endif
-
SSH_PACKET_CALLBACK(ssh_packet_unimplemented);
SSH_PACKET_CALLBACK(ssh_packet_disconnect_callback);
SSH_PACKET_CALLBACK(ssh_packet_ignore_callback);
diff --git a/include/libssh/pki.h b/include/libssh/pki.h
index e078768b..4a4ce612 100644
--- a/include/libssh/pki.h
+++ b/include/libssh/pki.h
@@ -115,10 +115,6 @@ int ssh_pki_export_pubkey_blob(const ssh_key key,
ssh_string *pblob);
int ssh_pki_import_pubkey_blob(const ssh_string key_blob,
ssh_key *pkey);
-int ssh_pki_export_pubkey_rsa1(const ssh_key key,
- const char *host,
- char *rsa1,
- size_t rsa1_len);
int ssh_pki_import_cert_blob(const ssh_string cert_blob,
ssh_key *pkey);
diff --git a/include/libssh/pki_priv.h b/include/libssh/pki_priv.h
index 9a8857dc..af041504 100644
--- a/include/libssh/pki_priv.h
+++ b/include/libssh/pki_priv.h
@@ -80,10 +80,6 @@ int pki_pubkey_build_rsa(ssh_key key,
ssh_string n);
int pki_pubkey_build_ecdsa(ssh_key key, int nid, ssh_string e);
ssh_string pki_publickey_to_blob(const ssh_key key);
-int pki_export_pubkey_rsa1(const ssh_key key,
- const char *host,
- char *rsa1,
- size_t rsa1_len);
/* SSH Signature Functions */
ssh_string pki_signature_to_blob(const ssh_signature sign);
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 17fb7e92..4af3ad9b 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -146,12 +146,11 @@ int gettimeofday(struct timeval *__p, void *__t);
#ifndef ERROR_BUFFERLEN
#define ERROR_BUFFERLEN 1024
#endif
-#ifndef CLIENTBANNER1
-#define CLIENTBANNER1 "SSH-1.5-libssh_" SSH_STRINGIFY(LIBSSH_VERSION)
-#endif
-#ifndef CLIENTBANNER2
-#define CLIENTBANNER2 "SSH-2.0-libssh_" SSH_STRINGIFY(LIBSSH_VERSION)
-#endif
+
+#ifndef CLIENT_BANNER_SSH2
+#define CLIENT_BANNER_SSH2 "SSH-2.0-libssh_" SSH_STRINGIFY(LIBSSH_VERSION)
+#endif /* CLIENT_BANNER_SSH2 */
+
#ifndef KBDINT_MAX_PROMPT
#define KBDINT_MAX_PROMPT 256 /* more than openssh's :) */
#endif
diff --git a/include/libssh/session.h b/include/libssh/session.h
index 1a069017..5421056f 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -157,7 +157,7 @@ struct ssh_session_struct {
/* keyb interactive data */
struct ssh_kbdint_struct *kbdint;
struct ssh_gssapi_struct *gssapi;
- int version; /* 1 or 2 */
+
/* server host keys */
struct {
ssh_key rsa_key;
@@ -198,8 +198,6 @@ struct ssh_session_struct {
unsigned int port;
socket_t fd;
int StrictHostKeyChecking;
- int ssh2;
- int ssh1;
char compressionlevel;
char *gss_server_identity;
char *gss_client_identity;
diff --git a/include/libssh/ssh1.h b/include/libssh/ssh1.h
deleted file mode 100644
index ce67f20b..00000000
--- a/include/libssh/ssh1.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef __SSH1_H
-#define __SSH1_H
-
-#define SSH_MSG_NONE 0 /* no message */
-#define SSH_MSG_DISCONNECT 1 /* cause (string) */
-#define SSH_SMSG_PUBLIC_KEY 2 /* ck,msk,srvk,hostk */
-#define SSH_CMSG_SESSION_KEY 3 /* key (BIGNUM) */
-#define SSH_CMSG_USER 4 /* user (string) */
-#define SSH_CMSG_AUTH_RHOSTS 5 /* user (string) */
-#define SSH_CMSG_AUTH_RSA 6 /* modulus (BIGNUM) */
-#define SSH_SMSG_AUTH_RSA_CHALLENGE 7 /* int (BIGNUM) */
-#define SSH_CMSG_AUTH_RSA_RESPONSE 8 /* int (BIGNUM) */
-#define SSH_CMSG_AUTH_PASSWORD 9 /* pass (string) */
-#define SSH_CMSG_REQUEST_PTY 10 /* TERM, tty modes */
-#define SSH_CMSG_WINDOW_SIZE 11 /* row,col,xpix,ypix */
-#define SSH_CMSG_EXEC_SHELL 12 /* */
-#define SSH_CMSG_EXEC_CMD 13 /* cmd (string) */
-#define SSH_SMSG_SUCCESS 14 /* */
-#define SSH_SMSG_FAILURE 15 /* */
-#define SSH_CMSG_STDIN_DATA 16 /* data (string) */
-#define SSH_SMSG_STDOUT_DATA 17 /* data (string) */
-#define SSH_SMSG_STDERR_DATA 18 /* data (string) */
-#define SSH_CMSG_EOF 19 /* */
-#define SSH_SMSG_EXITSTATUS 20 /* status (int) */
-#define SSH_MSG_CHANNEL_OPEN_CONFIRMATION 21 /* channel (int) */
-#define SSH_MSG_CHANNEL_OPEN_FAILURE 22 /* channel (int) */
-#define SSH_MSG_CHANNEL_DATA 23 /* ch,data (int,str) */
-#define SSH_MSG_CHANNEL_CLOSE 24 /* channel (int) */
-#define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* channel (int) */
-/* SSH_CMSG_X11_REQUEST_FORWARDING 26 OBSOLETE */
-#define SSH_SMSG_X11_OPEN 27 /* channel (int) */
-#define SSH_CMSG_PORT_FORWARD_REQUEST 28 /* p,host,hp (i,s,i) */
-#define SSH_MSG_PORT_OPEN 29 /* ch,h,p (i,s,i) */
-#define SSH_CMSG_AGENT_REQUEST_FORWARDING 30 /* */
-#define SSH_SMSG_AGENT_OPEN 31 /* port (int) */
-#define SSH_MSG_IGNORE 32 /* string */
-#define SSH_CMSG_EXIT_CONFIRMATION 33 /* */
-#define SSH_CMSG_X11_REQUEST_FORWARDING 34 /* proto,data (s,s) */
-#define SSH_CMSG_AUTH_RHOSTS_RSA 35 /* user,mod (s,mpi) */
-#define SSH_MSG_DEBUG 36 /* string */
-#define SSH_CMSG_REQUEST_COMPRESSION 37 /* level 1-9 (int) */
-#define SSH_CMSG_MAX_PACKET_SIZE 38 /* size 4k-1024k (int) */
-#define SSH_CMSG_AUTH_TIS 39 /* we use this for s/key */
-#define SSH_SMSG_AUTH_TIS_CHALLENGE 40 /* challenge (string) */
-#define SSH_CMSG_AUTH_TIS_RESPONSE 41 /* response (string) */
-#define SSH_CMSG_AUTH_KERBEROS 42 /* (KTEXT) */
-#define SSH_SMSG_AUTH_KERBEROS_RESPONSE 43 /* (KTEXT) */
-#define SSH_CMSG_HAVE_KERBEROS_TGT 44 /* credentials (s) */
-#define SSH_CMSG_HAVE_AFS_TOKEN 65 /* token (s) */
-
-/* protocol version 1.5 overloads some version 1.3 message types */
-#define SSH_MSG_CHANNEL_INPUT_EOF SSH_MSG_CHANNEL_CLOSE
-#define SSH_MSG_CHANNEL_OUTPUT_CLOSE SSH_MSG_CHANNEL_CLOSE_CONFIRMATION
-
-/*
- * Authentication methods. New types can be added, but old types should not
- * be removed for compatibility. The maximum allowed value is 31.
- */
-#define SSH_AUTH_RHOSTS 1
-#define SSH_AUTH_RSA 2
-#define SSH_AUTH_PASSWORD 3
-#define SSH_AUTH_RHOSTS_RSA 4
-#define SSH_AUTH_TIS 5
-#define SSH_AUTH_KERBEROS 6
-#define SSH_PASS_KERBEROS_TGT 7
- /* 8 to 15 are reserved */
-#define SSH_PASS_AFS_TOKEN 21
-
-/* Protocol flags. These are bit masks. */
-#define SSH_PROTOFLAG_SCREEN_NUMBER 1 /* X11 forwarding includes screen */
-#define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2 /* forwarding opens contain host */
-
-/* cipher flags. they are bit numbers */
-#define SSH_CIPHER_NONE 0 /* No encryption */
-#define SSH_CIPHER_IDEA 1 /* IDEA in CFB mode */
-#define SSH_CIPHER_DES 2 /* DES in CBC mode */
-#define SSH_CIPHER_3DES 3 /* Triple-DES in CBC mode */
-#define SSH_CIPHER_RC4 5 /* RC4 */
-#define SSH_CIPHER_BLOWFISH 6
-
-#endif
-
diff --git a/include/libssh/wrapper.h b/include/libssh/wrapper.h
index c23c9061..003a61d8 100644
--- a/include/libssh/wrapper.h
+++ b/include/libssh/wrapper.h
@@ -92,7 +92,7 @@ void hmac_update(HMACCTX c, const void *data, unsigned long len);
void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
size_t hmac_digest_len(enum ssh_hmac_e type);
-int crypt_set_algorithms(ssh_session session, enum ssh_des_e des_type);
+int crypt_set_algorithms_client(ssh_session session);
int crypt_set_algorithms_server(ssh_session session);
struct ssh_crypto_struct *crypto_new(void);
void crypto_free(struct ssh_crypto_struct *crypto);