diff --git a/libssh/client.c b/libssh/client.c index d85f4b39..ecf55327 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -573,8 +573,10 @@ int ssh_connect(ssh_session session) { /* Here we decide which version of the protocol to use. */ if (ssh2 && session->ssh2) { session->version = 2; +#ifdef WITH_SSH1 } else if(ssh1 && session->ssh1) { session->version = 1; +#endif } else { ssh_set_error(session, SSH_FATAL, "No version of SSH protocol usable (banner: %s)", @@ -629,6 +631,7 @@ int ssh_connect(ssh_session session) { session->connected = 1; break; +#ifdef WITH_SSH1 case 1: if (ssh_get_kex1(session) < 0) { ssh_socket_close(session->socket); @@ -640,6 +643,7 @@ int ssh_connect(ssh_session session) { session->connected = 1; break; +#endif } leave_function(); diff --git a/libssh/kex.c b/libssh/kex.c index a219afce..f9da9c23 100644 --- a/libssh/kex.c +++ b/libssh/kex.c @@ -450,6 +450,8 @@ int verify_existing_algo(int algo, const char *name){ return 0; } +#ifdef WITH_SSH1 + /* makes a STRING contating 3 strings : ssh-rsa1,e and n */ /* this is a public key in openssh's format */ static ssh_string make_rsa1_string(ssh_string e, ssh_string n){ @@ -507,6 +509,7 @@ static int build_session_id1(ssh_session session, ssh_string servern, return 0; } + /* returns 1 if the modulus of k1 is < than the one of k2 */ static int modulus_smaller(ssh_public_key k1, ssh_public_key k2){ bignum n1; @@ -796,4 +799,6 @@ error: return rc; } +#endif /* WITH_SSH1 */ + /* vim: set ts=2 sw=2 et cindent: */