summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog23
-rw-r--r--atomicio.c2
-rw-r--r--auth-options.c2
-rw-r--r--auth-passwd.c2
-rw-r--r--auth-rh-rsa.c2
-rw-r--r--auth-rhosts.c2
-rw-r--r--auth-rsa.c2
-rw-r--r--auth-skey.c2
-rw-r--r--auth2.c9
-rw-r--r--authfd.c2
-rw-r--r--authfd.h2
-rw-r--r--authfile.c2
-rw-r--r--bufaux.c2
-rw-r--r--bufaux.h2
-rw-r--r--buffer.c2
-rw-r--r--buffer.h2
-rw-r--r--canohost.c2
-rw-r--r--channels.c2
-rw-r--r--channels.h2
-rw-r--r--cipher.c2
-rw-r--r--cipher.h2
-rw-r--r--clientloop.c2
-rw-r--r--compat.c4
-rw-r--r--compat.h3
-rw-r--r--compress.c2
-rw-r--r--compress.h2
-rw-r--r--crc32.c2
-rw-r--r--crc32.h2
-rw-r--r--deattack.c2
-rw-r--r--dispatch.c2
-rw-r--r--dsa.c17
-rw-r--r--fingerprint.c2
-rw-r--r--fingerprint.h2
-rw-r--r--getput.h2
-rw-r--r--hmac.c2
-rw-r--r--kex.c2
-rw-r--r--key.c27
-rw-r--r--log-client.c2
-rw-r--r--log-server.c2
-rw-r--r--login.c2
-rw-r--r--match.c2
-rw-r--r--mpaux.c2
-rw-r--r--mpaux.h2
-rw-r--r--nchan.c2
-rw-r--r--nchan.h2
-rw-r--r--packet.c2
-rw-r--r--packet.h2
-rw-r--r--pty.c2
-rw-r--r--pty.h2
-rw-r--r--readconf.c2
-rw-r--r--readconf.h2
-rw-r--r--readpass.c2
-rw-r--r--rsa.c2
-rw-r--r--rsa.h2
-rw-r--r--scp.c4
-rw-r--r--servconf.c2
-rw-r--r--servconf.h2
-rw-r--r--ssh-add.c2
-rw-r--r--ssh-keygen.c2
-rw-r--r--ssh.c2
-rw-r--r--ssh.h2
-rw-r--r--sshconnect2.c20
-rw-r--r--tildexpand.c2
-rw-r--r--ttymodes.c2
-rw-r--r--ttymodes.h2
-rw-r--r--uidswap.c2
-rw-r--r--xmalloc.c2
-rw-r--r--xmalloc.h2
68 files changed, 138 insertions, 89 deletions
diff --git a/ChangeLog b/ChangeLog
index c35b7366c..af56ec53a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,29 @@
2 - (djm) Automatically generate host key during "make install". Suggested 2 - (djm) Automatically generate host key during "make install". Suggested
3 by Gary E. Miller <gem@rellim.com> 3 by Gary E. Miller <gem@rellim.com>
4 - (djm) Paranoia before kill() system call 4 - (djm) Paranoia before kill() system call
5 - OpenBSD CVS Updates:
6 - markus@cvs.openbsd.org 2000/06/18 18:50:11
7 [auth2.c compat.c compat.h sshconnect2.c]
8 make userauth+pubkey interop with ssh.com-2.2.0
9 - markus@cvs.openbsd.org 2000/06/18 20:56:17
10 [dsa.c]
11 mem leak + be more paranoid in dsa_verify.
12 - markus@cvs.openbsd.org 2000/06/18 21:29:50
13 [key.c]
14 cleanup fingerprinting, less hardcoded sizes
15 - markus@cvs.openbsd.org 2000/06/19 19:39:45
16 [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
17 [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h]
18 [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h]
19 [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h]
20 [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c]
21 [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c]
22 [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c]
23 [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c]
24 [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h]
25 OpenBSD tag
26 - markus@cvs.openbsd.org 2000/06/21 10:46:10
27 sshconnect2.c missing free; nuke old comment
5 28
620000620 2920000620
7 - (djm) Replace use of '-o' and '-a' logical operators in configure tests 30 - (djm) Replace use of '-o' and '-a' logical operators in configure tests
diff --git a/atomicio.c b/atomicio.c
index 3f12344ea..7d9f9340c 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$Id: atomicio.c,v 1.11 2000/04/16 02:31:49 damien Exp $"); 27RCSID("$OpenBSD: atomicio.c,v 1.4 2000/06/20 01:39:37 markus Exp $");
28 28
29#include "xmalloc.h" 29#include "xmalloc.h"
30#include "ssh.h" 30#include "ssh.h"
diff --git a/auth-options.c b/auth-options.c
index 7ebbb7661..55ccc8519 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,5 +1,5 @@
1#include "includes.h" 1#include "includes.h"
2RCSID("$Id: auth-options.c,v 1.1 2000/06/18 04:50:44 djm Exp $"); 2RCSID("$OpenBSD: auth-options.c,v 1.2 2000/06/20 01:39:38 markus Exp $");
3 3
4#include "ssh.h" 4#include "ssh.h"
5#include "packet.h" 5#include "packet.h"
diff --git a/auth-passwd.c b/auth-passwd.c
index b27c5bae8..d722122c7 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,7 +11,7 @@
11 11
12#ifndef USE_PAM 12#ifndef USE_PAM
13 13
14RCSID("$Id: auth-passwd.c,v 1.20 2000/05/20 05:03:00 damien Exp $"); 14RCSID("$OpenBSD: auth-passwd.c,v 1.16 2000/06/20 01:39:38 markus Exp $");
15 15
16#include "packet.h" 16#include "packet.h"
17#include "ssh.h" 17#include "ssh.h"
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 1073ecc10..4386758d0 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: auth-rh-rsa.c,v 1.11 2000/04/16 02:31:49 damien Exp $"); 18RCSID("$OpenBSD: auth-rh-rsa.c,v 1.14 2000/06/20 01:39:38 markus Exp $");
19 19
20#include "packet.h" 20#include "packet.h"
21#include "ssh.h" 21#include "ssh.h"
diff --git a/auth-rhosts.c b/auth-rhosts.c
index 6a5c13e43..f670276b9 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$Id: auth-rhosts.c,v 1.8 2000/04/16 01:18:39 damien Exp $"); 19RCSID("$OpenBSD: auth-rhosts.c,v 1.14 2000/06/20 01:39:38 markus Exp $");
20 20
21#include "packet.h" 21#include "packet.h"
22#include "ssh.h" 22#include "ssh.h"
diff --git a/auth-rsa.c b/auth-rsa.c
index 546e1d845..1a246f7f2 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$Id: auth-rsa.c,v 1.21 2000/06/18 04:50:44 djm Exp $"); 19RCSID("$OpenBSD: auth-rsa.c,v 1.26 2000/06/20 01:39:38 markus Exp $");
20 20
21#include "rsa.h" 21#include "rsa.h"
22#include "packet.h" 22#include "packet.h"
diff --git a/auth-skey.c b/auth-skey.c
index 7eb32e8f2..d66d84e7d 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,6 +1,6 @@
1#include "includes.h" 1#include "includes.h"
2#ifdef SKEY 2#ifdef SKEY
3RCSID("$Id: auth-skey.c,v 1.6 2000/04/14 10:30:29 markus Exp $"); 3RCSID("$OpenBSD: auth-skey.c,v 1.7 2000/06/20 01:39:38 markus Exp $");
4 4
5#include "ssh.h" 5#include "ssh.h"
6#include "packet.h" 6#include "packet.h"
diff --git a/auth2.c b/auth2.c
index c7dcf1953..a3d4ab60e 100644
--- a/auth2.c
+++ b/auth2.c
@@ -27,7 +27,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29#include "includes.h" 29#include "includes.h"
30RCSID("$OpenBSD: auth2.c,v 1.10 2000/06/18 04:05:02 markus Exp $"); 30RCSID("$OpenBSD: auth2.c,v 1.11 2000/06/19 00:50:11 markus Exp $");
31 31
32#include <openssl/dsa.h> 32#include <openssl/dsa.h>
33#include <openssl/rsa.h> 33#include <openssl/rsa.h>
@@ -302,8 +302,11 @@ ssh2_auth_pubkey(struct passwd *pw, char *service)
302 sig = packet_get_string(&slen); 302 sig = packet_get_string(&slen);
303 packet_done(); 303 packet_done();
304 buffer_init(&b); 304 buffer_init(&b);
305 buffer_append(&b, session_id2, session_id2_len); 305 if (datafellows & SSH_COMPAT_SESSIONID_ENCODING) {
306 306 buffer_put_string(&b, session_id2, session_id2_len);
307 } else {
308 buffer_append(&b, session_id2, session_id2_len);
309 }
307 /* reconstruct packet */ 310 /* reconstruct packet */
308 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); 311 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
309 buffer_put_cstring(&b, pw->pw_name); 312 buffer_put_cstring(&b, pw->pw_name);
diff --git a/authfd.c b/authfd.c
index 36b4d6ce4..69d77d7dd 100644
--- a/authfd.c
+++ b/authfd.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: authfd.c,v 1.14 2000/04/30 00:00:53 damien Exp $"); 17RCSID("$OpenBSD: authfd.c,v 1.20 2000/06/20 01:39:38 markus Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "rsa.h" 20#include "rsa.h"
diff --git a/authfd.h b/authfd.h
index 420f592bb..d7ff4be20 100644
--- a/authfd.h
+++ b/authfd.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: authfd.h,v 1.5 2000/04/16 01:18:40 damien Exp $"); */ 16/* RCSID("$OpenBSD: authfd.h,v 1.8 2000/06/20 01:39:38 markus Exp $"); */
17 17
18#ifndef AUTHFD_H 18#ifndef AUTHFD_H
19#define AUTHFD_H 19#define AUTHFD_H
diff --git a/authfile.c b/authfile.c
index f93c9d470..71c4a5d84 100644
--- a/authfile.c
+++ b/authfile.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: authfile.c,v 1.12 2000/04/29 13:57:10 damien Exp $"); 18RCSID("$OpenBSD: authfile.c,v 1.17 2000/06/20 01:39:38 markus Exp $");
19 19
20#include <openssl/bn.h> 20#include <openssl/bn.h>
21#include <openssl/dsa.h> 21#include <openssl/dsa.h>
diff --git a/bufaux.c b/bufaux.c
index 9ae5e9e61..ecf529ff6 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: bufaux.c,v 1.12 2000/04/16 02:31:50 damien Exp $"); 20RCSID("$OpenBSD: bufaux.c,v 1.12 2000/06/20 01:39:39 markus Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23#include <openssl/bn.h> 23#include <openssl/bn.h>
diff --git a/bufaux.h b/bufaux.h
index 80bad6ea7..42df46394 100644
--- a/bufaux.h
+++ b/bufaux.h
@@ -11,7 +11,7 @@
11 * 11 *
12 */ 12 */
13 13
14/* RCSID("$Id: bufaux.h,v 1.5 2000/04/16 01:18:40 damien Exp $"); */ 14/* RCSID("$OpenBSD: bufaux.h,v 1.7 2000/06/20 01:39:39 markus Exp $"); */
15 15
16#ifndef BUFAUX_H 16#ifndef BUFAUX_H
17#define BUFAUX_H 17#define BUFAUX_H
diff --git a/buffer.c b/buffer.c
index 83a63e6f0..db5ae0a23 100644
--- a/buffer.c
+++ b/buffer.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: buffer.c,v 1.5 2000/04/16 01:18:40 damien Exp $"); 17RCSID("$OpenBSD: buffer.c,v 1.7 2000/06/20 01:39:39 markus Exp $");
18 18
19#include "xmalloc.h" 19#include "xmalloc.h"
20#include "buffer.h" 20#include "buffer.h"
diff --git a/buffer.h b/buffer.h
index f33e6f724..a2b4effff 100644
--- a/buffer.h
+++ b/buffer.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: buffer.h,v 1.4 2000/04/16 02:31:50 damien Exp $"); */ 16/* RCSID("$OpenBSD: buffer.h,v 1.5 2000/06/20 01:39:39 markus Exp $"); */
17 17
18#ifndef BUFFER_H 18#ifndef BUFFER_H
19#define BUFFER_H 19#define BUFFER_H
diff --git a/canohost.c b/canohost.c
index 1b5790929..7ded0e3ba 100644
--- a/canohost.c
+++ b/canohost.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: canohost.c,v 1.9 2000/04/16 01:18:40 damien Exp $"); 17RCSID("$OpenBSD: canohost.c,v 1.13 2000/06/20 01:39:39 markus Exp $");
18 18
19#include "packet.h" 19#include "packet.h"
20#include "xmalloc.h" 20#include "xmalloc.h"
diff --git a/channels.c b/channels.c
index 9da9db474..038670da2 100644
--- a/channels.c
+++ b/channels.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: channels.c,v 1.33 2000/06/18 04:50:44 djm Exp $"); 20RCSID("$OpenBSD: channels.c,v 1.62 2000/06/20 01:39:39 markus Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23#include "packet.h" 23#include "packet.h"
diff --git a/channels.h b/channels.h
index 922c5d0ae..9629124b9 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* RCSID("$Id: channels.h,v 1.10 2000/06/07 09:55:44 djm Exp $"); */ 1/* RCSID("$OpenBSD: channels.h,v 1.14 2000/06/20 01:39:40 markus Exp $"); */
2 2
3#ifndef CHANNELS_H 3#ifndef CHANNELS_H
4#define CHANNELS_H 4#define CHANNELS_H
diff --git a/cipher.c b/cipher.c
index 4117cb772..97cbd38ca 100644
--- a/cipher.c
+++ b/cipher.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$Id: cipher.c,v 1.21 2000/05/30 03:44:52 damien Exp $"); 15RCSID("$OpenBSD: cipher.c,v 1.28 2000/06/20 01:39:40 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "cipher.h" 18#include "cipher.h"
diff --git a/cipher.h b/cipher.h
index b7410fbc0..a13799077 100644
--- a/cipher.h
+++ b/cipher.h
@@ -11,7 +11,7 @@
11 * 11 *
12 */ 12 */
13 13
14/* RCSID("$Id: cipher.h,v 1.13 2000/05/09 01:03:00 damien Exp $"); */ 14/* RCSID("$OpenBSD: cipher.h,v 1.18 2000/06/20 01:39:40 markus Exp $"); */
15 15
16#ifndef CIPHER_H 16#ifndef CIPHER_H
17#define CIPHER_H 17#define CIPHER_H
diff --git a/clientloop.c b/clientloop.c
index 82d1d27d6..5df584ab2 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19RCSID("$Id: clientloop.c,v 1.16 2000/05/09 01:03:00 damien Exp $"); 19RCSID("$OpenBSD: clientloop.c,v 1.27 2000/06/20 01:39:40 markus Exp $");
20 20
21#include "xmalloc.h" 21#include "xmalloc.h"
22#include "ssh.h" 22#include "ssh.h"
diff --git a/compat.c b/compat.c
index 8e77fd799..e3410d497 100644
--- a/compat.c
+++ b/compat.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: compat.c,v 1.12 2000/06/18 04:50:44 djm Exp $"); 31RCSID("$OpenBSD: compat.c,v 1.17 2000/06/20 01:39:40 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "packet.h" 34#include "packet.h"
@@ -61,7 +61,7 @@ compat_datafellows(const char *version)
61 char *version; 61 char *version;
62 int bugs; 62 int bugs;
63 } check[] = { 63 } check[] = {
64 {"2.2.0", SSH_BUG_HMAC}, 64 {"2.2.0", SSH_BUG_HMAC|SSH_COMPAT_SESSIONID_ENCODING},
65 {"2.1.0", SSH_BUG_SIGBLOB|SSH_BUG_HMAC}, 65 {"2.1.0", SSH_BUG_SIGBLOB|SSH_BUG_HMAC},
66 {"2.0.1", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|SSH_BUG_PUBKEYAUTH|SSH_BUG_X11FWD}, 66 {"2.0.1", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|SSH_BUG_PUBKEYAUTH|SSH_BUG_X11FWD},
67 {NULL, 0} 67 {NULL, 0}
diff --git a/compat.h b/compat.h
index cd7c190c7..2060a39f4 100644
--- a/compat.h
+++ b/compat.h
@@ -26,7 +26,7 @@
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29/* RCSID("$Id: compat.h,v 1.6 2000/05/09 01:03:00 damien Exp $"); */ 29/* RCSID("$OpenBSD: compat.h,v 1.9 2000/06/20 01:39:40 markus Exp $"); */
30 30
31#ifndef COMPAT_H 31#ifndef COMPAT_H
32#define COMPAT_H 32#define COMPAT_H
@@ -40,6 +40,7 @@
40#define SSH_BUG_PUBKEYAUTH 0x02 40#define SSH_BUG_PUBKEYAUTH 0x02
41#define SSH_BUG_HMAC 0x04 41#define SSH_BUG_HMAC 0x04
42#define SSH_BUG_X11FWD 0x08 42#define SSH_BUG_X11FWD 0x08
43#define SSH_COMPAT_SESSIONID_ENCODING 0x10
43 44
44void enable_compat13(void); 45void enable_compat13(void);
45void enable_compat20(void); 46void enable_compat20(void);
diff --git a/compress.c b/compress.c
index 610aaf7e6..4ec20104e 100644
--- a/compress.c
+++ b/compress.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: compress.c,v 1.6 2000/04/16 01:18:42 damien Exp $"); 17RCSID("$OpenBSD: compress.c,v 1.8 2000/06/20 01:39:40 markus Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "buffer.h" 20#include "buffer.h"
diff --git a/compress.h b/compress.h
index f13183324..ce7d7fab4 100644
--- a/compress.h
+++ b/compress.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: compress.h,v 1.4 2000/04/16 01:18:42 damien Exp $"); */ 16/* RCSID("$OpenBSD: compress.h,v 1.5 2000/06/20 01:39:40 markus Exp $"); */
17 17
18#ifndef COMPRESS_H 18#ifndef COMPRESS_H
19#define COMPRESS_H 19#define COMPRESS_H
diff --git a/crc32.c b/crc32.c
index 2d3867d0b..05a1af7b3 100644
--- a/crc32.c
+++ b/crc32.c
@@ -6,7 +6,7 @@
6 */ 6 */
7 7
8#include "includes.h" 8#include "includes.h"
9RCSID("$Id: crc32.c,v 1.2 1999/11/24 13:26:22 damien Exp $"); 9RCSID("$OpenBSD: crc32.c,v 1.5 2000/06/20 01:39:40 markus Exp $");
10 10
11#include "crc32.h" 11#include "crc32.h"
12 12
diff --git a/crc32.h b/crc32.h
index 15ac29999..45495b422 100644
--- a/crc32.h
+++ b/crc32.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: crc32.h,v 1.4 2000/04/16 01:18:42 damien Exp $"); */ 16/* RCSID("$OpenBSD: crc32.h,v 1.6 2000/06/20 01:39:40 markus Exp $"); */
17 17
18#ifndef CRC32_H 18#ifndef CRC32_H
19#define CRC32_H 19#define CRC32_H
diff --git a/deattack.c b/deattack.c
index 81b1c8efb..7f95eca31 100644
--- a/deattack.c
+++ b/deattack.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: deattack.c,v 1.3 1999/11/24 13:26:22 damien Exp $ 2 * $OpenBSD: deattack.c,v 1.7 2000/06/20 01:39:41 markus Exp $
3 * Cryptographic attack detector for ssh - source code 3 * Cryptographic attack detector for ssh - source code
4 * 4 *
5 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina. 5 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
diff --git a/dispatch.c b/dispatch.c
index 50f11f3cc..8df08b173 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -27,7 +27,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29#include "includes.h" 29#include "includes.h"
30RCSID("$Id: dispatch.c,v 1.3 2000/04/16 01:18:42 damien Exp $"); 30RCSID("$OpenBSD: dispatch.c,v 1.3 2000/06/20 01:39:41 markus Exp $");
31#include "ssh.h" 31#include "ssh.h"
32#include "dispatch.h" 32#include "dispatch.h"
33#include "packet.h" 33#include "packet.h"
diff --git a/dsa.c b/dsa.c
index 51d7ff285..c1c37bceb 100644
--- a/dsa.c
+++ b/dsa.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: dsa.c,v 1.7 2000/05/08 17:42:24 markus Exp $"); 31RCSID("$OpenBSD: dsa.c,v 1.9 2000/06/20 01:39:41 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "xmalloc.h" 34#include "xmalloc.h"
@@ -72,7 +72,7 @@ dsa_key_from_blob(
72 buffer_append(&b, blob, blen); 72 buffer_append(&b, blob, blen);
73 ktype = buffer_get_string(&b, NULL); 73 ktype = buffer_get_string(&b, NULL);
74 if (strcmp(KEX_DSS, ktype) != 0) { 74 if (strcmp(KEX_DSS, ktype) != 0) {
75 error("dsa_key_from_blob: cannot handle type %s", ktype); 75 error("dsa_key_from_blob: cannot handle type %s", ktype);
76 key_free(key); 76 key_free(key);
77 return NULL; 77 return NULL;
78 } 78 }
@@ -197,7 +197,6 @@ dsa_verify(
197 DSA_SIG *sig; 197 DSA_SIG *sig;
198 EVP_MD *evp_md = EVP_sha1(); 198 EVP_MD *evp_md = EVP_sha1();
199 EVP_MD_CTX md; 199 EVP_MD_CTX md;
200 char *ktype;
201 unsigned char *sigblob; 200 unsigned char *sigblob;
202 char *txt; 201 char *txt;
203 unsigned int len; 202 unsigned int len;
@@ -227,14 +226,24 @@ dsa_verify(
227 len = signaturelen; 226 len = signaturelen;
228 } else { 227 } else {
229 /* ietf-drafts */ 228 /* ietf-drafts */
229 char *ktype;
230 buffer_init(&b); 230 buffer_init(&b);
231 buffer_append(&b, (char *) signature, signaturelen); 231 buffer_append(&b, (char *) signature, signaturelen);
232 ktype = buffer_get_string(&b, NULL); 232 ktype = buffer_get_string(&b, NULL);
233 if (strcmp(KEX_DSS, ktype) != 0) {
234 error("dsa_verify: cannot handle type %s", ktype);
235 buffer_free(&b);
236 return -1;
237 }
233 sigblob = (unsigned char *)buffer_get_string(&b, &len); 238 sigblob = (unsigned char *)buffer_get_string(&b, &len);
234 rlen = buffer_len(&b); 239 rlen = buffer_len(&b);
235 if(rlen != 0) 240 if(rlen != 0) {
236 error("remaining bytes in signature %d", rlen); 241 error("remaining bytes in signature %d", rlen);
242 buffer_free(&b);
243 return -1;
244 }
237 buffer_free(&b); 245 buffer_free(&b);
246 xfree(ktype);
238 } 247 }
239 248
240 if (len != SIGBLOB_LEN) { 249 if (len != SIGBLOB_LEN) {
diff --git a/fingerprint.c b/fingerprint.c
index 4b0966d91..801f6a6e2 100644
--- a/fingerprint.c
+++ b/fingerprint.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: fingerprint.c,v 1.6 2000/04/12 09:39:10 markus Exp $"); 31RCSID("$OpenBSD: fingerprint.c,v 1.7 2000/06/20 01:39:41 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "xmalloc.h" 34#include "xmalloc.h"
diff --git a/fingerprint.h b/fingerprint.h
index fbb0d4c46..3d7bcb32c 100644
--- a/fingerprint.h
+++ b/fingerprint.h
@@ -26,7 +26,7 @@
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29/* RCSID("$Id: fingerprint.h,v 1.3 1999/11/24 16:15:25 markus Exp $"); */ 29/* RCSID("$OpenBSD: fingerprint.h,v 1.4 2000/06/20 01:39:41 markus Exp $"); */
30 30
31#ifndef FINGERPRINT_H 31#ifndef FINGERPRINT_H
32#define FINGERPRINT_H 32#define FINGERPRINT_H
diff --git a/getput.h b/getput.h
index 22235f5d9..5f6b14114 100644
--- a/getput.h
+++ b/getput.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: getput.h,v 1.3 2000/04/16 01:18:42 damien Exp $"); */ 16/* RCSID("$OpenBSD: getput.h,v 1.4 2000/06/20 01:39:41 markus Exp $"); */
17 17
18#ifndef GETPUT_H 18#ifndef GETPUT_H
19#define GETPUT_H 19#define GETPUT_H
diff --git a/hmac.c b/hmac.c
index fe53aa47e..27590ec80 100644
--- a/hmac.c
+++ b/hmac.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: hmac.c,v 1.2 2000/04/12 09:39:10 markus Exp $"); 31RCSID("$OpenBSD: hmac.c,v 1.3 2000/06/20 01:39:41 markus Exp $");
32 32
33#include "xmalloc.h" 33#include "xmalloc.h"
34#include "ssh.h" 34#include "ssh.h"
diff --git a/kex.c b/kex.c
index 199e04264..b0d47b5b1 100644
--- a/kex.c
+++ b/kex.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: kex.c,v 1.9 2000/05/30 03:44:53 damien Exp $"); 31RCSID("$OpenBSD: kex.c,v 1.8 2000/06/20 01:39:41 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "ssh2.h" 34#include "ssh2.h"
diff --git a/key.c b/key.c
index d474f85c6..be38a88f5 100644
--- a/key.c
+++ b/key.c
@@ -121,8 +121,6 @@ key_equal(Key *a, Key *b)
121 return 0; 121 return 0;
122} 122}
123 123
124#define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
125
126/* 124/*
127 * Generate key fingerprint in ascii format. 125 * Generate key fingerprint in ascii format.
128 * Based on ideas and code from Bjoern Groenvall <bg@sics.se> 126 * Based on ideas and code from Bjoern Groenvall <bg@sics.se>
@@ -130,7 +128,7 @@ key_equal(Key *a, Key *b)
130char * 128char *
131key_fingerprint(Key *k) 129key_fingerprint(Key *k)
132{ 130{
133 static char retval[80]; 131 static char retval[(EVP_MAX_MD_SIZE+1)*3];
134 unsigned char *blob = NULL; 132 unsigned char *blob = NULL;
135 int len = 0; 133 int len = 0;
136 int nlen, elen; 134 int nlen, elen;
@@ -151,15 +149,22 @@ key_fingerprint(Key *k)
151 fatal("key_fingerprint: bad key type %d", k->type); 149 fatal("key_fingerprint: bad key type %d", k->type);
152 break; 150 break;
153 } 151 }
152 retval[0] = '\0';
153
154 if (blob != NULL) { 154 if (blob != NULL) {
155 unsigned char d[16]; 155 int i;
156 EVP_MD_CTX md; 156 unsigned char digest[EVP_MAX_MD_SIZE];
157 EVP_DigestInit(&md, EVP_md5()); 157 EVP_MD *md = EVP_md5();
158 EVP_DigestUpdate(&md, blob, len); 158 EVP_MD_CTX ctx;
159 EVP_DigestFinal(&md, d, NULL); 159 EVP_DigestInit(&ctx, md);
160 snprintf(retval, sizeof(retval), FPRINT, 160 EVP_DigestUpdate(&ctx, blob, len);
161 d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], 161 EVP_DigestFinal(&ctx, digest, NULL);
162 d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); 162 for(i = 0; i < md->md_size; i++) {
163 char hex[4];
164 snprintf(hex, sizeof(hex), "%02x:", digest[i]);
165 strlcat(retval, hex, sizeof(retval));
166 }
167 retval[strlen(retval) - 1] = '\0';
163 memset(blob, 0, len); 168 memset(blob, 0, len);
164 xfree(blob); 169 xfree(blob);
165 } 170 }
diff --git a/log-client.c b/log-client.c
index e86a2e330..7e9fd61e7 100644
--- a/log-client.c
+++ b/log-client.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: log-client.c,v 1.6 2000/04/16 01:18:43 damien Exp $"); 18RCSID("$OpenBSD: log-client.c,v 1.9 2000/06/20 01:39:42 markus Exp $");
19 19
20#include "xmalloc.h" 20#include "xmalloc.h"
21#include "ssh.h" 21#include "ssh.h"
diff --git a/log-server.c b/log-server.c
index 57c7b3715..9db77d9e0 100644
--- a/log-server.c
+++ b/log-server.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: log-server.c,v 1.10 2000/05/01 23:56:42 damien Exp $"); 18RCSID("$OpenBSD: log-server.c,v 1.15 2000/06/20 01:39:42 markus Exp $");
19 19
20#include <syslog.h> 20#include <syslog.h>
21#include "packet.h" 21#include "packet.h"
diff --git a/login.c b/login.c
index eb320178a..c50721823 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.32 2000/06/04 17:07:49 andre Exp $"); 21RCSID("$OpenBSD: login.c,v 1.14 2000/06/20 01:39:42 markus Exp $");
22 22
23#include "loginrec.h" 23#include "loginrec.h"
24 24
diff --git a/match.c b/match.c
index 1551ed574..c4f54b2c4 100644
--- a/match.c
+++ b/match.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: match.c,v 1.6 2000/06/07 09:55:44 djm Exp $"); 17RCSID("$OpenBSD: match.c,v 1.8 2000/06/20 01:39:42 markus Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20 20
diff --git a/mpaux.c b/mpaux.c
index 2384c826b..6caae64d6 100644
--- a/mpaux.c
+++ b/mpaux.c
@@ -15,7 +15,7 @@
15*/ 15*/
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: mpaux.c,v 1.12 2000/04/16 02:31:51 damien Exp $"); 18RCSID("$OpenBSD: mpaux.c,v 1.13 2000/06/20 01:39:42 markus Exp $");
19 19
20#include <openssl/bn.h> 20#include <openssl/bn.h>
21#include "getput.h" 21#include "getput.h"
diff --git a/mpaux.h b/mpaux.h
index d3e24cfd6..b05c14bf7 100644
--- a/mpaux.h
+++ b/mpaux.h
@@ -13,7 +13,7 @@
13 * precision integers. 13 * precision integers.
14 */ 14 */
15 15
16/* RCSID("$Id: mpaux.h,v 1.5 2000/04/16 01:18:43 damien Exp $"); */ 16/* RCSID("$OpenBSD: mpaux.h,v 1.7 2000/06/20 01:39:42 markus Exp $"); */
17 17
18#ifndef MPAUX_H 18#ifndef MPAUX_H
19#define MPAUX_H 19#define MPAUX_H
diff --git a/nchan.c b/nchan.c
index 0ea88da33..cef56497b 100644
--- a/nchan.c
+++ b/nchan.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: nchan.c,v 1.10 2000/05/09 01:03:01 damien Exp $"); 31RCSID("$OpenBSD: nchan.c,v 1.18 2000/06/20 01:39:42 markus Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34 34
diff --git a/nchan.h b/nchan.h
index ae2b70619..38205cfaf 100644
--- a/nchan.h
+++ b/nchan.h
@@ -27,7 +27,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30/* RCSID("$Id: nchan.h,v 1.5 2000/04/04 04:39:02 damien Exp $"); */ 30/* RCSID("$OpenBSD: nchan.h,v 1.8 2000/06/20 01:39:43 markus Exp $"); */
31 31
32#ifndef NCHAN_H 32#ifndef NCHAN_H
33#define NCHAN_H 33#define NCHAN_H
diff --git a/packet.c b/packet.c
index fd7a32259..137d0181a 100644
--- a/packet.c
+++ b/packet.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: packet.c,v 1.23 2000/05/17 12:53:35 damien Exp $"); 20RCSID("$OpenBSD: packet.c,v 1.33 2000/06/20 01:39:43 markus Exp $");
21 21
22#include "xmalloc.h" 22#include "xmalloc.h"
23#include "buffer.h" 23#include "buffer.h"
diff --git a/packet.h b/packet.h
index b5fc196ef..015d9ec85 100644
--- a/packet.h
+++ b/packet.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: packet.h,v 1.15 2000/04/16 02:31:51 damien Exp $"); */ 16/* RCSID("$OpenBSD: packet.h,v 1.16 2000/06/20 01:39:43 markus Exp $"); */
17 17
18#ifndef PACKET_H 18#ifndef PACKET_H
19#define PACKET_H 19#define PACKET_H
diff --git a/pty.c b/pty.c
index 21ddab5c2..a6c238bd9 100644
--- a/pty.c
+++ b/pty.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: pty.c,v 1.19 2000/04/20 13:12:59 damien Exp $"); 17RCSID("$OpenBSD: pty.c,v 1.14 2000/06/20 01:39:43 markus Exp $");
18 18
19#ifdef HAVE_UTIL_H 19#ifdef HAVE_UTIL_H
20# include <util.h> 20# include <util.h>
diff --git a/pty.h b/pty.h
index a9bdeaee8..284196813 100644
--- a/pty.h
+++ b/pty.h
@@ -13,7 +13,7 @@
13 * tty. 13 * tty.
14 */ 14 */
15 15
16/* RCSID("$Id: pty.h,v 1.8 2000/04/16 01:18:44 damien Exp $"); */ 16/* RCSID("$OpenBSD: pty.h,v 1.7 2000/06/20 01:39:43 markus Exp $"); */
17 17
18#ifndef PTY_H 18#ifndef PTY_H
19#define PTY_H 19#define PTY_H
diff --git a/readconf.c b/readconf.c
index c6d6f67db..6d015a202 100644
--- a/readconf.c
+++ b/readconf.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: readconf.c,v 1.17 2000/06/18 04:50:44 djm Exp $"); 17RCSID("$OpenBSD: readconf.c,v 1.37 2000/06/20 01:39:43 markus Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "cipher.h" 20#include "cipher.h"
diff --git a/readconf.h b/readconf.h
index aeaf39a1c..e33cebce1 100644
--- a/readconf.h
+++ b/readconf.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: readconf.h,v 1.12 2000/06/07 09:55:44 djm Exp $"); */ 16/* RCSID("$OpenBSD: readconf.h,v 1.20 2000/06/20 01:39:43 markus Exp $"); */
17 17
18#ifndef READCONF_H 18#ifndef READCONF_H
19#define READCONF_H 19#define READCONF_H
diff --git a/readpass.c b/readpass.c
index e3402b480..c38292f15 100644
--- a/readpass.c
+++ b/readpass.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#include "includes.h" 34#include "includes.h"
35RCSID("$Id: readpass.c,v 1.6 2000/04/16 01:18:44 damien Exp $"); 35RCSID("$OpenBSD: readpass.c,v 1.11 2000/06/20 01:39:44 markus Exp $");
36 36
37#include "xmalloc.h" 37#include "xmalloc.h"
38#include "ssh.h" 38#include "ssh.h"
diff --git a/rsa.c b/rsa.c
index 1e8c434f9..46ad6b6e2 100644
--- a/rsa.c
+++ b/rsa.c
@@ -35,7 +35,7 @@
35*/ 35*/
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$Id: rsa.c,v 1.14 2000/04/16 01:18:45 damien Exp $"); 38RCSID("$OpenBSD: rsa.c,v 1.15 2000/06/20 01:39:44 markus Exp $");
39 39
40#include "rsa.h" 40#include "rsa.h"
41#include "ssh.h" 41#include "ssh.h"
diff --git a/rsa.h b/rsa.h
index 672f20d49..dfbf6f487 100644
--- a/rsa.h
+++ b/rsa.h
@@ -13,7 +13,7 @@
13 * 13 *
14*/ 14*/
15 15
16/* RCSID("$Id: rsa.h,v 1.9 2000/04/16 02:31:51 damien Exp $"); */ 16/* RCSID("$OpenBSD: rsa.h,v 1.7 2000/06/20 01:39:44 markus Exp $"); */
17 17
18#ifndef RSA_H 18#ifndef RSA_H
19#define RSA_H 19#define RSA_H
diff --git a/scp.c b/scp.c
index 773a4f59f..0a89985de 100644
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
45 */ 45 */
46 46
47#include "includes.h" 47#include "includes.h"
48RCSID("$Id: scp.c,v 1.24 2000/06/18 04:50:44 djm Exp $"); 48RCSID("$OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $");
49 49
50#include "ssh.h" 50#include "ssh.h"
51#include "xmalloc.h" 51#include "xmalloc.h"
@@ -1007,7 +1007,7 @@ run_err(const char *fmt,...)
1007 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1007 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1008 * SUCH DAMAGE. 1008 * SUCH DAMAGE.
1009 * 1009 *
1010 * $Id: scp.c,v 1.24 2000/06/18 04:50:44 djm Exp $ 1010 * $OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $
1011 */ 1011 */
1012 1012
1013char * 1013char *
diff --git a/servconf.c b/servconf.c
index 0e323231d..12cc15260 100644
--- a/servconf.c
+++ b/servconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$Id: servconf.c,v 1.19 2000/06/18 04:50:44 djm Exp $"); 15RCSID("$OpenBSD: servconf.c,v 1.45 2000/06/20 01:39:44 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "servconf.h" 18#include "servconf.h"
diff --git a/servconf.h b/servconf.h
index 6c647c2ed..c698bc74e 100644
--- a/servconf.h
+++ b/servconf.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: servconf.h,v 1.13 2000/06/18 04:50:44 djm Exp $"); */ 16/* RCSID("$OpenBSD: servconf.h,v 1.25 2000/06/20 01:39:44 markus Exp $"); */
17 17
18#ifndef SERVCONF_H 18#ifndef SERVCONF_H
19#define SERVCONF_H 19#define SERVCONF_H
diff --git a/ssh-add.c b/ssh-add.c
index ad9423977..661e1ffa9 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$Id: ssh-add.c,v 1.18 2000/05/01 10:59:50 damien Exp $"); 10RCSID("$OpenBSD: ssh-add.c,v 1.17 2000/06/20 01:39:44 markus Exp $");
11 11
12#include <openssl/rsa.h> 12#include <openssl/rsa.h>
13#include <openssl/dsa.h> 13#include <openssl/dsa.h>
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 621b9c143..4b89c15e1 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$Id: ssh-keygen.c,v 1.19 2000/06/07 09:55:44 djm Exp $"); 10RCSID("$OpenBSD: ssh-keygen.c,v 1.27 2000/06/20 01:39:44 markus Exp $");
11 11
12#include <openssl/evp.h> 12#include <openssl/evp.h>
13#include <openssl/pem.h> 13#include <openssl/pem.h>
diff --git a/ssh.c b/ssh.c
index a5c1ac6ba..f9742dc8d 100644
--- a/ssh.c
+++ b/ssh.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include "includes.h" 13#include "includes.h"
14RCSID("$Id: ssh.c,v 1.34 2000/06/07 09:55:44 djm Exp $"); 14RCSID("$OpenBSD: ssh.c,v 1.56 2000/06/20 01:39:44 markus Exp $");
15 15
16#include <openssl/evp.h> 16#include <openssl/evp.h>
17#include <openssl/dsa.h> 17#include <openssl/dsa.h>
diff --git a/ssh.h b/ssh.h
index ed124cece..213f73def 100644
--- a/ssh.h
+++ b/ssh.h
@@ -13,7 +13,7 @@
13 * 13 *
14 */ 14 */
15 15
16/* RCSID("$Id: ssh.h,v 1.40 2000/05/17 12:34:24 damien Exp $"); */ 16/* RCSID("$OpenBSD: ssh.h,v 1.47 2000/06/20 01:39:45 markus Exp $"); */
17 17
18#ifndef SSH_H 18#ifndef SSH_H
19#define SSH_H 19#define SSH_H
diff --git a/sshconnect2.c b/sshconnect2.c
index 77b8652ea..ae96d534e 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$OpenBSD: sshconnect2.c,v 1.13 2000/06/02 02:00:19 todd Exp $"); 31RCSID("$OpenBSD: sshconnect2.c,v 1.15 2000/06/21 16:46:10 markus Exp $");
32 32
33#include <openssl/bn.h> 33#include <openssl/bn.h>
34#include <openssl/rsa.h> 34#include <openssl/rsa.h>
@@ -295,6 +295,7 @@ ssh2_try_pubkey(char *filename,
295 unsigned char *blob, *signature; 295 unsigned char *blob, *signature;
296 int bloblen, slen; 296 int bloblen, slen;
297 struct stat st; 297 struct stat st;
298 int skip = 0;
298 299
299 if (stat(filename, &st) != 0) { 300 if (stat(filename, &st) != 0) {
300 debug("key does not exist: %s", filename); 301 debug("key does not exist: %s", filename);
@@ -314,14 +315,22 @@ ssh2_try_pubkey(char *filename,
314 success = load_private_key(filename, passphrase, k, NULL); 315 success = load_private_key(filename, passphrase, k, NULL);
315 memset(passphrase, 0, strlen(passphrase)); 316 memset(passphrase, 0, strlen(passphrase));
316 xfree(passphrase); 317 xfree(passphrase);
317 if (!success) 318 if (!success) {
319 key_free(k);
318 return 0; 320 return 0;
321 }
319 } 322 }
320 dsa_make_key_blob(k, &blob, &bloblen); 323 dsa_make_key_blob(k, &blob, &bloblen);
321 324
322 /* data to be signed */ 325 /* data to be signed */
323 buffer_init(&b); 326 buffer_init(&b);
324 buffer_append(&b, session_id2, session_id2_len); 327 if (datafellows & SSH_COMPAT_SESSIONID_ENCODING) {
328 buffer_put_string(&b, session_id2, session_id2_len);
329 skip = buffer_len(&b);
330 } else {
331 buffer_append(&b, session_id2, session_id2_len);
332 skip = session_id2_len;
333 }
325 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); 334 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
326 buffer_put_cstring(&b, server_user); 335 buffer_put_cstring(&b, server_user);
327 buffer_put_cstring(&b, 336 buffer_put_cstring(&b,
@@ -340,7 +349,6 @@ ssh2_try_pubkey(char *filename,
340 buffer_dump(&b); 349 buffer_dump(&b);
341#endif 350#endif
342 if (datafellows & SSH_BUG_PUBKEYAUTH) { 351 if (datafellows & SSH_BUG_PUBKEYAUTH) {
343 /* e.g. ssh-2.0.13: data-to-be-signed != data-on-the-wire */
344 buffer_clear(&b); 352 buffer_clear(&b);
345 buffer_append(&b, session_id2, session_id2_len); 353 buffer_append(&b, session_id2, session_id2_len);
346 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); 354 buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
@@ -357,9 +365,9 @@ ssh2_try_pubkey(char *filename,
357 xfree(signature); 365 xfree(signature);
358 366
359 /* skip session id and packet type */ 367 /* skip session id and packet type */
360 if (buffer_len(&b) < session_id2_len + 1) 368 if (buffer_len(&b) < skip + 1)
361 fatal("ssh2_try_pubkey: internal error"); 369 fatal("ssh2_try_pubkey: internal error");
362 buffer_consume(&b, session_id2_len + 1); 370 buffer_consume(&b, skip + 1);
363 371
364 /* put remaining data from buffer into packet */ 372 /* put remaining data from buffer into packet */
365 packet_start(SSH2_MSG_USERAUTH_REQUEST); 373 packet_start(SSH2_MSG_USERAUTH_REQUEST);
diff --git a/tildexpand.c b/tildexpand.c
index f615362f9..d10ea0054 100644
--- a/tildexpand.c
+++ b/tildexpand.c
@@ -6,7 +6,7 @@
6 */ 6 */
7 7
8#include "includes.h" 8#include "includes.h"
9RCSID("$Id: tildexpand.c,v 1.4 1999/12/07 04:38:32 damien Exp $"); 9RCSID("$OpenBSD: tildexpand.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
10 10
11#include "xmalloc.h" 11#include "xmalloc.h"
12#include "ssh.h" 12#include "ssh.h"
diff --git a/ttymodes.c b/ttymodes.c
index 647c66035..f4b7af580 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$Id: ttymodes.c,v 1.4 2000/04/16 01:18:49 damien Exp $"); 13RCSID("$OpenBSD: ttymodes.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
14 14
15#include "packet.h" 15#include "packet.h"
16#include "ssh.h" 16#include "ssh.h"
diff --git a/ttymodes.h b/ttymodes.h
index 41aad79d6..b0ef24760 100644
--- a/ttymodes.h
+++ b/ttymodes.h
@@ -12,7 +12,7 @@
12 * 12 *
13 */ 13 */
14 14
15/* RCSID("$Id: ttymodes.h,v 1.4 2000/04/16 01:18:49 damien Exp $"); */ 15/* RCSID("$OpenBSD: ttymodes.h,v 1.8 2000/06/20 01:39:45 markus Exp $"); */
16 16
17/* The tty mode description is a stream of bytes. The stream consists of 17/* The tty mode description is a stream of bytes. The stream consists of
18 * opcode-arguments pairs. It is terminated by opcode TTY_OP_END (0). 18 * opcode-arguments pairs. It is terminated by opcode TTY_OP_END (0).
diff --git a/uidswap.c b/uidswap.c
index e57be3a3d..4213d34ec 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$Id: uidswap.c,v 1.5 2000/04/16 01:18:49 damien Exp $"); 10RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
11 11
12#include "ssh.h" 12#include "ssh.h"
13#include "uidswap.h" 13#include "uidswap.h"
diff --git a/xmalloc.c b/xmalloc.c
index fb29a62e9..ec62c5804 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -8,7 +8,7 @@
8 */ 8 */
9 9
10#include "includes.h" 10#include "includes.h"
11RCSID("$Id: xmalloc.c,v 1.3 2000/04/16 01:18:49 damien Exp $"); 11RCSID("$OpenBSD: xmalloc.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
12 12
13#include "ssh.h" 13#include "ssh.h"
14 14
diff --git a/xmalloc.h b/xmalloc.h
index a5603522d..b11b49cbf 100644
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -14,7 +14,7 @@
14 * 14 *
15 */ 15 */
16 16
17/* RCSID("$Id: xmalloc.h,v 1.3 2000/04/16 01:18:49 damien Exp $"); */ 17/* RCSID("$OpenBSD: xmalloc.h,v 1.4 2000/06/20 01:39:45 markus Exp $"); */
18 18
19#ifndef XMALLOC_H 19#ifndef XMALLOC_H
20#define XMALLOC_H 20#define XMALLOC_H