summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-23 17:15:56 +1100
committerDamien Miller <djm@mindrot.org>2000-09-23 17:15:56 +1100
commit62cee00753ef8ce31b322ce6a14318cb974e883d (patch)
tree9a4dedd152d4570a99744eb9f32fe7e70461edfc /authfd.c
parentf056e23dd6f7fad96afb9e0f5a64dce4f6045cc7 (diff)
- (djm) OpenBSD CVS sync:
- markus@cvs.openbsd.org 2000/09/17 09:38:59 [sshconnect2.c sshd.c] fix DEBUG_KEXDH - markus@cvs.openbsd.org 2000/09/17 09:52:51 [sshconnect.c] yes no; ok niels@ - markus@cvs.openbsd.org 2000/09/21 04:55:11 [sshd.8] typo - markus@cvs.openbsd.org 2000/09/21 05:03:54 [serverloop.c] typo - markus@cvs.openbsd.org 2000/09/21 05:11:42 scp.c utime() to utimes(); mouring@pconline.com - markus@cvs.openbsd.org 2000/09/21 05:25:08 sshconnect2.c change login logic in ssh2, allows plugin of other auth methods - markus@cvs.openbsd.org 2000/09/21 05:25:35 [auth2.c channels.c channels.h clientloop.c dispatch.c dispatch.h] [serverloop.c] add context to dispatch_run - markus@cvs.openbsd.org 2000/09/21 05:07:52 authfd.c authfd.h ssh-agent.c bug compat for old ssh.com software
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/authfd.c b/authfd.c
index 89fa2afad..433623ef7 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.27 2000/09/07 20:27:49 deraadt Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.28 2000/09/21 11:07:50 markus Exp $");
39 39
40#include "ssh.h" 40#include "ssh.h"
41#include "rsa.h" 41#include "rsa.h"
@@ -51,6 +51,7 @@ RCSID("$OpenBSD: authfd.c,v 1.27 2000/09/07 20:27:49 deraadt Exp $");
51#include "authfd.h" 51#include "authfd.h"
52#include "kex.h" 52#include "kex.h"
53#include "dsa.h" 53#include "dsa.h"
54#include "compat.h"
54 55
55/* helper */ 56/* helper */
56int decode_reply(int type); 57int decode_reply(int type);
@@ -364,20 +365,24 @@ ssh_agent_sign(AuthenticationConnection *auth,
364 unsigned char **sigp, int *lenp, 365 unsigned char **sigp, int *lenp,
365 unsigned char *data, int datalen) 366 unsigned char *data, int datalen)
366{ 367{
368 extern int datafellows;
367 Buffer msg; 369 Buffer msg;
368 unsigned char *blob; 370 unsigned char *blob;
369 unsigned int blen; 371 unsigned int blen;
370 int type; 372 int type, flags = 0;
371 int ret = -1; 373 int ret = -1;
372 374
373 if (dsa_make_key_blob(key, &blob, &blen) == 0) 375 if (dsa_make_key_blob(key, &blob, &blen) == 0)
374 return -1; 376 return -1;
375 377
378 if (datafellows & SSH_BUG_SIGBLOB)
379 flags = SSH_AGENT_OLD_SIGNATURE;
380
376 buffer_init(&msg); 381 buffer_init(&msg);
377 buffer_put_char(&msg, SSH2_AGENTC_SIGN_REQUEST); 382 buffer_put_char(&msg, SSH2_AGENTC_SIGN_REQUEST);
378 buffer_put_string(&msg, blob, blen); 383 buffer_put_string(&msg, blob, blen);
379 buffer_put_string(&msg, data, datalen); 384 buffer_put_string(&msg, data, datalen);
380 buffer_put_int(&msg, 0); /* flags, unused */ 385 buffer_put_int(&msg, flags);
381 xfree(blob); 386 xfree(blob);
382 387
383 if (ssh_request_reply(auth, &msg, &msg) == 0) { 388 if (ssh_request_reply(auth, &msg, &msg) == 0) {