summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
authordjm <djm>2014-05-15 04:24:09 +0000
committerdjm <djm>2014-05-15 04:24:09 +0000
commit0e9e9351e58075b5be85c089b76e29327fdd2777 (patch)
tree1185f9bcc0f1ea568da51c45d804d5303e6cd02d /ssh-agent.c
parentf610551639087a3501bf3f2ce005a3b139208a5b (diff)
downloadopenssh-0e9e9351e58075b5be85c089b76e29327fdd2777.tar.gz
- markus@cvs.openbsd.org 2014/04/29 18:01:49
[auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c] [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c] [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c] make compiling against OpenSSL optional (make OPENSSL=no); reduces algorithms to curve25519, aes-ctr, chacha, ed25519; allows us to explore further options; with and ok djm
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index f4c0524c..bc96ad70 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.184 2014/03/15 17:28:26 deraadt Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.185 2014/04/29 18:01:49 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -49,8 +49,10 @@
#endif
#include "openbsd-compat/sys-queue.h"
+#ifdef WITH_OPENSSL
#include <openssl/evp.h>
#include "openbsd-compat/openssl-compat.h"
+#endif
#include <errno.h>
#include <fcntl.h>
@@ -221,9 +223,11 @@ process_request_identities(SocketEntry *e, int version)
buffer_put_int(&msg, tab->nentries);
TAILQ_FOREACH(id, &tab->idlist, next) {
if (id->key->type == KEY_RSA1) {
+#ifdef WITH_SSH1
buffer_put_int(&msg, BN_num_bits(id->key->rsa->n));
buffer_put_bignum(&msg, id->key->rsa->e);
buffer_put_bignum(&msg, id->key->rsa->n);
+#endif
} else {
u_char *blob;
u_int blen;
@@ -238,6 +242,7 @@ process_request_identities(SocketEntry *e, int version)
buffer_free(&msg);
}
+#ifdef WITH_SSH1
/* ssh1 only */
static void
process_authentication_challenge1(SocketEntry *e)
@@ -308,6 +313,7 @@ send:
BN_clear_free(challenge);
buffer_free(&msg);
}
+#endif
/* ssh2 only */
static void
@@ -733,6 +739,7 @@ process_message(SocketEntry *e)
case SSH_AGENTC_UNLOCK:
process_lock_agent(e, type == SSH_AGENTC_LOCK);
break;
+#ifdef WITH_SSH1
/* ssh1 */
case SSH_AGENTC_RSA_CHALLENGE:
process_authentication_challenge1(e);
@@ -750,6 +757,7 @@ process_message(SocketEntry *e)
case SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES:
process_remove_all_identities(e, 1);
break;
+#endif
/* ssh2 */
case SSH2_AGENTC_SIGN_REQUEST:
process_sign_request2(e);
@@ -1040,7 +1048,9 @@ main(int ac, char **av)
prctl(PR_SET_DUMPABLE, 0);
#endif
+#ifdef WITH_OPENSSL
OpenSSL_add_all_algorithms();
+#endif
__progname = ssh_get_progname(av[0]);
seed_rng();