diff options
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.27 2000/09/07 20:27:49 deraadt Exp $"); | 38 | RCSID("$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 */ |
56 | int decode_reply(int type); | 57 | int 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) { |