diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-03 17:00:47 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-03 17:00:47 +0000 |
commit | d121f613708c3c9c82465b0788550943a918d5c8 (patch) | |
tree | 2e1f2364b459a1a7003d4907f4abae63d069634f /sshconnect2.c | |
parent | b84815880e453346667d6d2b3f02904674848a7a (diff) |
20001204
- (bal) More C functions defined in NeXT that are unaccessable without
defining -POSIX.
- (bal) OpenBSD CVS updates:
- markus@cvs.openbsd.org 2000/12/03 11:29:04
[compat.c]
remove fallback to SSH_BUG_HMAC now that the drafts are updated
- markus@cvs.openbsd.org 2000/12/03 11:27:55
[compat.c]
correctly match "2.1.0.pl2 SSH" etc; from pekkas@netcore.fi/bugzilla.redhat
- markus@cvs.openbsd.org 2000/12/03 11:15:03
[auth2.c compat.c compat.h sshconnect2.c]
support f-secure/ssh.com 2.0.12; ok niels@
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 69d9c49e3..036519fad 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.29 2000/11/23 21:03:47 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.30 2000/12/03 11:15:04 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/rsa.h> | 29 | #include <openssl/rsa.h> |
@@ -647,8 +647,10 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | |||
647 | int ret = -1; | 647 | int ret = -1; |
648 | int have_sig = 1; | 648 | int have_sig = 1; |
649 | 649 | ||
650 | debug3("sign_and_send_pubkey"); | ||
650 | if (key_to_blob(k, &blob, &bloblen) == 0) { | 651 | if (key_to_blob(k, &blob, &bloblen) == 0) { |
651 | /* we cannot handle this key */ | 652 | /* we cannot handle this key */ |
653 | debug3("sign_and_send_pubkey: cannot handle key"); | ||
652 | return 0; | 654 | return 0; |
653 | } | 655 | } |
654 | /* data to be signed */ | 656 | /* data to be signed */ |
@@ -663,12 +665,16 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | |||
663 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); | 665 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); |
664 | buffer_put_cstring(&b, authctxt->server_user); | 666 | buffer_put_cstring(&b, authctxt->server_user); |
665 | buffer_put_cstring(&b, | 667 | buffer_put_cstring(&b, |
666 | datafellows & SSH_BUG_PUBKEYAUTH ? | 668 | datafellows & SSH_BUG_PKSERVICE ? |
667 | "ssh-userauth" : | 669 | "ssh-userauth" : |
668 | authctxt->service); | 670 | authctxt->service); |
669 | buffer_put_cstring(&b, authctxt->method->name); | 671 | if (datafellows & SSH_BUG_PKAUTH) { |
670 | buffer_put_char(&b, have_sig); | 672 | buffer_put_char(&b, have_sig); |
671 | buffer_put_cstring(&b, key_ssh_name(k)); | 673 | } else { |
674 | buffer_put_cstring(&b, authctxt->method->name); | ||
675 | buffer_put_char(&b, have_sig); | ||
676 | buffer_put_cstring(&b, key_ssh_name(k)); | ||
677 | } | ||
672 | buffer_put_string(&b, blob, bloblen); | 678 | buffer_put_string(&b, blob, bloblen); |
673 | 679 | ||
674 | /* generate signature */ | 680 | /* generate signature */ |
@@ -681,7 +687,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | |||
681 | #ifdef DEBUG_PK | 687 | #ifdef DEBUG_PK |
682 | buffer_dump(&b); | 688 | buffer_dump(&b); |
683 | #endif | 689 | #endif |
684 | if (datafellows & SSH_BUG_PUBKEYAUTH) { | 690 | if (datafellows & SSH_BUG_PKSERVICE) { |
685 | buffer_clear(&b); | 691 | buffer_clear(&b); |
686 | buffer_append(&b, session_id2, session_id2_len); | 692 | buffer_append(&b, session_id2, session_id2_len); |
687 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); | 693 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); |
@@ -689,7 +695,8 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) | |||
689 | buffer_put_cstring(&b, authctxt->service); | 695 | buffer_put_cstring(&b, authctxt->service); |
690 | buffer_put_cstring(&b, authctxt->method->name); | 696 | buffer_put_cstring(&b, authctxt->method->name); |
691 | buffer_put_char(&b, have_sig); | 697 | buffer_put_char(&b, have_sig); |
692 | buffer_put_cstring(&b, key_ssh_name(k)); | 698 | if (!(datafellows & SSH_BUG_PKAUTH)) |
699 | buffer_put_cstring(&b, key_ssh_name(k)); | ||
693 | buffer_put_string(&b, blob, bloblen); | 700 | buffer_put_string(&b, blob, bloblen); |
694 | } | 701 | } |
695 | xfree(blob); | 702 | xfree(blob); |