]> andersk Git - openssh.git/commitdiff
- OpenBSD CVS Updates:
authordjm <djm>
Thu, 22 Jun 2000 11:32:31 +0000 (11:32 +0000)
committerdjm <djm>
Thu, 22 Jun 2000 11:32:31 +0000 (11:32 +0000)
   - markus@cvs.openbsd.org  2000/06/18 18:50:11
     [auth2.c compat.c compat.h sshconnect2.c]
     make userauth+pubkey interop with ssh.com-2.2.0
   - markus@cvs.openbsd.org  2000/06/18 20:56:17
     [dsa.c]
     mem leak + be more paranoid in dsa_verify.
   - markus@cvs.openbsd.org  2000/06/18 21:29:50
     [key.c]
     cleanup fingerprinting, less hardcoded sizes
   - markus@cvs.openbsd.org  2000/06/19 19:39:45
     [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
     [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h]
     [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h]
     [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h]
     [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c]
     [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c]
     [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c]
     [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c]
     [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h]
     OpenBSD tag
   - markus@cvs.openbsd.org  2000/06/21 10:46:10
     sshconnect2.c missing free; nuke old comment

68 files changed:
ChangeLog
atomicio.c
auth-options.c
auth-passwd.c
auth-rh-rsa.c
auth-rhosts.c
auth-rsa.c
auth-skey.c
auth2.c
authfd.c
authfd.h
authfile.c
bufaux.c
bufaux.h
buffer.c
buffer.h
canohost.c
channels.c
channels.h
cipher.c
cipher.h
clientloop.c
compat.c
compat.h
compress.c
compress.h
crc32.c
crc32.h
deattack.c
dispatch.c
dsa.c
fingerprint.c
fingerprint.h
getput.h
hmac.c
kex.c
key.c
log-client.c
log-server.c
login.c
match.c
mpaux.c
mpaux.h
nchan.c
nchan.h
packet.c
packet.h
pty.c
pty.h
readconf.c
readconf.h
readpass.c
rsa.c
rsa.h
scp.c
servconf.c
servconf.h
ssh-add.c
ssh-keygen.c
ssh.c
ssh.h
sshconnect2.c
tildexpand.c
ttymodes.c
ttymodes.h
uidswap.c
xmalloc.c
xmalloc.h

index c35b7366cc44be4b2e6f1dd1e54d768918e983c6..af56ec53a21e42ca012add4f9ff6bfab20006cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,29 @@
  - (djm) Automatically generate host key during "make install". Suggested
    by Gary E. Miller <gem@rellim.com>
  - (djm) Paranoia before kill() system call
+ - OpenBSD CVS Updates:
+   - markus@cvs.openbsd.org  2000/06/18 18:50:11
+     [auth2.c compat.c compat.h sshconnect2.c]
+     make userauth+pubkey interop with ssh.com-2.2.0
+   - markus@cvs.openbsd.org  2000/06/18 20:56:17
+     [dsa.c]
+     mem leak + be more paranoid in dsa_verify.
+   - markus@cvs.openbsd.org  2000/06/18 21:29:50
+     [key.c]
+     cleanup fingerprinting, less hardcoded sizes
+   - markus@cvs.openbsd.org  2000/06/19 19:39:45
+     [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
+     [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h]
+     [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h] 
+     [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h]
+     [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c]
+     [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c] 
+     [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c] 
+     [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c]
+     [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h]
+     OpenBSD tag
+   - markus@cvs.openbsd.org  2000/06/21 10:46:10
+     sshconnect2.c missing free; nuke old comment
 
 20000620
  - (djm) Replace use of '-o' and '-a' logical operators in configure tests
index 1060dc0e896888af1b21a348693092e001e2c88b..7d9f9340c04d1973541238ad872f9c6c743e38ac 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: atomicio.c,v 1.4 2000/06/20 01:39:37 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
index bee3ba9436b3d2c38c09586ae4f06e876070d7a2..55ccc85196822b037bd00471169597d2600b1b84 100644 (file)
@@ -1,5 +1,5 @@
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-options.c,v 1.2 2000/06/20 01:39:38 markus Exp $");
 
 #include "ssh.h"
 #include "packet.h"
index d8ecb1dcf5cdb7d8f9db47676d108d01e3d1d842..d722122c7163e2565e7c768be9f288cd4b1525ec 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifndef USE_PAM
 
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-passwd.c,v 1.16 2000/06/20 01:39:38 markus Exp $");
 
 #include "packet.h"
 #include "ssh.h"
index 52ce688ce9d38a93c18e7053ae69bcae5013ffd4..4386758d0ffb012ed45075a0180191ddd940e4be 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-rh-rsa.c,v 1.14 2000/06/20 01:39:38 markus Exp $");
 
 #include "packet.h"
 #include "ssh.h"
index 767f55c2c36bd98528185d1fb6a91e5e7ad9f4bc..f670276b90e462ccd28d857667e04f0768432e97 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-rhosts.c,v 1.14 2000/06/20 01:39:38 markus Exp $");
 
 #include "packet.h"
 #include "ssh.h"
index 9b22e66e68c0faf608c7f60a403f5d9ce3d9ff3e..1a246f7f23831ae4997ad00d0331d0620ecb9bd1 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-rsa.c,v 1.26 2000/06/20 01:39:38 markus Exp $");
 
 #include "rsa.h"
 #include "packet.h"
index 16b06bf36324d152881861697d22e36fa7dc2307..d66d84e7d6a99463dc15d77666490a7c705fda9c 100644 (file)
@@ -1,6 +1,6 @@
 #include "includes.h"
 #ifdef SKEY
-RCSID("$Id$");
+RCSID("$OpenBSD: auth-skey.c,v 1.7 2000/06/20 01:39:38 markus Exp $");
 
 #include "ssh.h"
 #include "packet.h"
diff --git a/auth2.c b/auth2.c
index c7dcf1953b7c939a9a3312bc4b4fd6e1552b5d11..a3d4ab60ea7c777d4780d6d9797f6a780a6880e0 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.10 2000/06/18 04:05:02 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.11 2000/06/19 00:50:11 markus Exp $");
 
 #include <openssl/dsa.h>
 #include <openssl/rsa.h>
@@ -302,8 +302,11 @@ ssh2_auth_pubkey(struct passwd *pw, char *service)
                        sig = packet_get_string(&slen);
                        packet_done();
                        buffer_init(&b);
-                       buffer_append(&b, session_id2, session_id2_len);
-
+                       if (datafellows & SSH_COMPAT_SESSIONID_ENCODING) {
+                               buffer_put_string(&b, session_id2, session_id2_len);
+                       } else {
+                               buffer_append(&b, session_id2, session_id2_len);
+                       }
                        /* reconstruct packet */
                        buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
                        buffer_put_cstring(&b, pw->pw_name);
index 6e0cf5b40fcf93c6693524dd12324b0f748dd463..69d77d7dde95382210cc690d70fd06e85b8c5cc0 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: authfd.c,v 1.20 2000/06/20 01:39:38 markus Exp $");
 
 #include "ssh.h"
 #include "rsa.h"
index 3763f390337231535dd47c1b2cb04db92122d09f..d7ff4be2037dba76d8c6c79ad3538cdcf1b8f3d5 100644 (file)
--- a/authfd.h
+++ b/authfd.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: authfd.h,v 1.8 2000/06/20 01:39:38 markus Exp $"); */
 
 #ifndef AUTHFD_H
 #define AUTHFD_H
index c284a646f8ddeebb94d8a45e65b7007313b10522..71c4a5d84ee0918db250a2454565b66d46854680 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: authfile.c,v 1.17 2000/06/20 01:39:38 markus Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/dsa.h>
index 29ff477f10e9f67358616aea766965846081b118..ecf529ff6961a1f378e6b0938463574de6a01489 100644 (file)
--- a/bufaux.c
+++ b/bufaux.c
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: bufaux.c,v 1.12 2000/06/20 01:39:39 markus Exp $");
 
 #include "ssh.h"
 #include <openssl/bn.h>
index 5d66730daedae57400a41f0c27f68adfae03dfd1..42df46394fd00766e834da075d2209350cb383bc 100644 (file)
--- a/bufaux.h
+++ b/bufaux.h
@@ -11,7 +11,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: bufaux.h,v 1.7 2000/06/20 01:39:39 markus Exp $"); */
 
 #ifndef BUFAUX_H
 #define BUFAUX_H
index 8610e0c6669475024c2a11eac64d06e4d3aabdb1..db5ae0a2301109945c285fc51d59cda9216e6e60 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: buffer.c,v 1.7 2000/06/20 01:39:39 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
index ecab2add784e98c344a929549d5214c5ba73d678..a2b4effff0d98065a6153f354f36cb7fc742d2b8 100644 (file)
--- a/buffer.h
+++ b/buffer.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: buffer.h,v 1.5 2000/06/20 01:39:39 markus Exp $"); */
 
 #ifndef BUFFER_H
 #define BUFFER_H
index 73f10653a050c00c2925b2e13eea9a55d5e40bd4..7ded0e3ba4909aa20ee81824b6d6c1af813105f5 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: canohost.c,v 1.13 2000/06/20 01:39:39 markus Exp $");
 
 #include "packet.h"
 #include "xmalloc.h"
index ebc7dea8a754b59cbc4ed5b11200a71b5834867a..038670da23decebc34d0b3e150371e480daa6856 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: channels.c,v 1.62 2000/06/20 01:39:39 markus Exp $");
 
 #include "ssh.h"
 #include "packet.h"
index 02aa3c507fe5e115f3e34b69b6ed10a31715eab8..9629124b968ef56d2d73d129c28ff891962fef34 100644 (file)
@@ -1,4 +1,4 @@
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: channels.h,v 1.14 2000/06/20 01:39:40 markus Exp $"); */
 
 #ifndef CHANNELS_H
 #define CHANNELS_H
index aeabbc352d32d0721711f63fb6fef73a9e3e75d5..97cbd38cae7ac1857c2a785a23ef049eb0dae406 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: cipher.c,v 1.28 2000/06/20 01:39:40 markus Exp $");
 
 #include "ssh.h"
 #include "cipher.h"
index 82cf68fe7b343b401f23bde7e4e52bc7daddae19..a13799077f105963b573523b92ed01db1b4e7001 100644 (file)
--- a/cipher.h
+++ b/cipher.h
@@ -11,7 +11,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: cipher.h,v 1.18 2000/06/20 01:39:40 markus Exp $"); */
 
 #ifndef CIPHER_H
 #define CIPHER_H
index 47ef2fc97e224f7cd417d56ec287e74fb5fad888..5df584ab27e846b92305e8379975965b6737653d 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: clientloop.c,v 1.27 2000/06/20 01:39:40 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
index 05f6fe655e27302b7bb54a3e75b38d99aaf5bcfc..e3410d4979f161d1bdcd19cac03ac2e7260caeb8 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: compat.c,v 1.17 2000/06/20 01:39:40 markus Exp $");
 
 #include "ssh.h"
 #include "packet.h"
@@ -61,7 +61,7 @@ compat_datafellows(const char *version)
                char    *version;
                int     bugs;
        } check[] = {
-               {"2.2.0",       SSH_BUG_HMAC},
+               {"2.2.0",       SSH_BUG_HMAC|SSH_COMPAT_SESSIONID_ENCODING},
                {"2.1.0",       SSH_BUG_SIGBLOB|SSH_BUG_HMAC},
                {"2.0.1",       SSH_BUG_SIGBLOB|SSH_BUG_HMAC|SSH_BUG_PUBKEYAUTH|SSH_BUG_X11FWD},
                {NULL,          0}
index 3ed7a84f1502838bbfe24c2ba7ab02348c0c0cf9..2060a39f437826f7cdd160976b11965e4016c7dd 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: compat.h,v 1.9 2000/06/20 01:39:40 markus Exp $"); */
 
 #ifndef COMPAT_H
 #define COMPAT_H
@@ -40,6 +40,7 @@
 #define SSH_BUG_PUBKEYAUTH     0x02
 #define SSH_BUG_HMAC           0x04
 #define SSH_BUG_X11FWD         0x08
+#define SSH_COMPAT_SESSIONID_ENCODING          0x10
 
 void    enable_compat13(void);
 void    enable_compat20(void);
index cc974ce4433f7aa7ba646fa12f354371cc75f33a..4ec20104eb745cf77f8d953388073a9a36356d3d 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: compress.c,v 1.8 2000/06/20 01:39:40 markus Exp $");
 
 #include "ssh.h"
 #include "buffer.h"
index ebe4e48f00b8eb8bba1f21a8dc206eb7ca122499..ce7d7fab4b8f641fe6e2474204f30cd581f3a7aa 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: compress.h,v 1.5 2000/06/20 01:39:40 markus Exp $"); */
 
 #ifndef COMPRESS_H
 #define COMPRESS_H
diff --git a/crc32.c b/crc32.c
index 8a2f2a7dfdded9d9f64ac565211e70e0ca45490b..05a1af7b35afc33a5c667034151dbb8f7d27db4e 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -6,7 +6,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: crc32.c,v 1.5 2000/06/20 01:39:40 markus Exp $");
 
 #include "crc32.h"
 
diff --git a/crc32.h b/crc32.h
index 545cac3b87c100b5603a6e718cd5f0ac11db026a..45495b4223c4a8bcc4d8972bad7ff462b1067e69 100644 (file)
--- a/crc32.h
+++ b/crc32.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: crc32.h,v 1.6 2000/06/20 01:39:40 markus Exp $"); */
 
 #ifndef CRC32_H
 #define CRC32_H
index 27b80f3a253a80e4440f5ad7b246d7c10cb1fca8..7f95eca31999ec29154039493422e3e16c1ca67b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $OpenBSD: deattack.c,v 1.7 2000/06/20 01:39:41 markus Exp $
  * Cryptographic attack detector for ssh - source code
  *
  * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
index b1e34608991f83e9f5a8fb5c1f8249e3ff3470d1..8df08b173973cccf7c46b8329c9cd2a12a834371 100644 (file)
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: dispatch.c,v 1.3 2000/06/20 01:39:41 markus Exp $");
 #include "ssh.h"
 #include "dispatch.h"
 #include "packet.h"
diff --git a/dsa.c b/dsa.c
index ce874a2b973d97697b5975f360f87f6e4a932047..c1c37bceb2d11359541ac1c78769dbd5a22d4e59 100644 (file)
--- a/dsa.c
+++ b/dsa.c
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: dsa.c,v 1.9 2000/06/20 01:39:41 markus Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -72,7 +72,7 @@ dsa_key_from_blob(
        buffer_append(&b, blob, blen);
        ktype = buffer_get_string(&b, NULL);
        if (strcmp(KEX_DSS, ktype) != 0) {
-               error("dsa_key_from_blob: cannot handle type  %s", ktype);
+               error("dsa_key_from_blob: cannot handle type %s", ktype);
                key_free(key);
                return NULL;
        }
@@ -197,7 +197,6 @@ dsa_verify(
        DSA_SIG *sig;
        EVP_MD *evp_md = EVP_sha1();
        EVP_MD_CTX md;
-       char *ktype;
        unsigned char *sigblob;
        char *txt;
        unsigned int len;
@@ -227,14 +226,24 @@ dsa_verify(
                len = signaturelen;
        } else {
                /* ietf-drafts */
+               char *ktype;
                buffer_init(&b);
                buffer_append(&b, (char *) signature, signaturelen);
                ktype = buffer_get_string(&b, NULL);
+               if (strcmp(KEX_DSS, ktype) != 0) {
+                       error("dsa_verify: cannot handle type %s", ktype);
+                       buffer_free(&b);
+                       return -1;
+               }
                sigblob = (unsigned char *)buffer_get_string(&b, &len);
                rlen = buffer_len(&b);
-               if(rlen != 0)
+               if(rlen != 0) {
                        error("remaining bytes in signature %d", rlen);
+                       buffer_free(&b);
+                       return -1;
+               }
                buffer_free(&b);
+               xfree(ktype);
        }
 
        if (len != SIGBLOB_LEN) {
index 88d99bfc16c72fb988664b125322994371f870b2..801f6a6e297c58c293012c42cc1c768e1f1d7211 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: fingerprint.c,v 1.7 2000/06/20 01:39:41 markus Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
index d7abe34563a3144e5b4404a62a2dc2ab7663d5e3..3d7bcb32c2d34535ab094336b2a4081a8e46c883 100644 (file)
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: fingerprint.h,v 1.4 2000/06/20 01:39:41 markus Exp $"); */
 
 #ifndef FINGERPRINT_H
 #define FINGERPRINT_H
index b9d8654625aa317f49802ac22dee6db564f13776..5f6b14114a6de7a9091d5e1308c04a662e0e8c9f 100644 (file)
--- a/getput.h
+++ b/getput.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: getput.h,v 1.4 2000/06/20 01:39:41 markus Exp $"); */
 
 #ifndef GETPUT_H
 #define GETPUT_H
diff --git a/hmac.c b/hmac.c
index 181170c67a5f2e3fa31fc255101bf282dab52125..27590ec8067b805542b9138c8fd4ce19b4f7e10a 100644 (file)
--- a/hmac.c
+++ b/hmac.c
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: hmac.c,v 1.3 2000/06/20 01:39:41 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
diff --git a/kex.c b/kex.c
index 3a925f94e64826641f7715784155db376036a8ec..b0d47b5b140b9d472b8a5c23b29dda299f4435f4 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: kex.c,v 1.8 2000/06/20 01:39:41 markus Exp $");
 
 #include "ssh.h"
 #include "ssh2.h"
diff --git a/key.c b/key.c
index d474f85c666a749e275010d1d9852780dd51a381..be38a88f5e6c4ef7cc312fa75defb319298cf36d 100644 (file)
--- a/key.c
+++ b/key.c
@@ -121,8 +121,6 @@ key_equal(Key *a, Key *b)
        return 0;
 }
 
-#define FPRINT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
-
 /*
  * Generate key fingerprint in ascii format.
  * Based on ideas and code from Bjoern Groenvall <bg@sics.se>
@@ -130,7 +128,7 @@ key_equal(Key *a, Key *b)
 char *
 key_fingerprint(Key *k)
 {
-       static char retval[80];
+       static char retval[(EVP_MAX_MD_SIZE+1)*3];
        unsigned char *blob = NULL;
        int len = 0;
        int nlen, elen;
@@ -151,15 +149,22 @@ key_fingerprint(Key *k)
                fatal("key_fingerprint: bad key type %d", k->type);
                break;
        }
+       retval[0] = '\0';
+
        if (blob != NULL) {
-               unsigned char d[16];
-               EVP_MD_CTX md;
-               EVP_DigestInit(&md, EVP_md5());
-               EVP_DigestUpdate(&md, blob, len);
-               EVP_DigestFinal(&md, d, NULL);
-               snprintf(retval, sizeof(retval), FPRINT,
-                   d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
-                   d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]);
+               int i;
+               unsigned char digest[EVP_MAX_MD_SIZE];
+               EVP_MD *md = EVP_md5();
+               EVP_MD_CTX ctx;
+               EVP_DigestInit(&ctx, md);
+               EVP_DigestUpdate(&ctx, blob, len);
+               EVP_DigestFinal(&ctx, digest, NULL);
+               for(i = 0; i < md->md_size; i++) {
+                       char hex[4];
+                       snprintf(hex, sizeof(hex), "%02x:", digest[i]);
+                       strlcat(retval, hex, sizeof(retval));
+               }
+               retval[strlen(retval) - 1] = '\0';
                memset(blob, 0, len);
                xfree(blob);
        }
index 04eb6433daf82428fd5aecbfd414840e58b8e29c..7e9fd61e78cc676a66d44ca860a75e612f6d85eb 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: log-client.c,v 1.9 2000/06/20 01:39:42 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
index 86fcf2a114db1ed3c6b05ea039a7b3e98c1c841a..9db77d9e06cbf12e787a866f45ff5605e2ae5016 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: log-server.c,v 1.15 2000/06/20 01:39:42 markus Exp $");
 
 #include <syslog.h>
 #include "packet.h"
diff --git a/login.c b/login.c
index b8836b2db25ff13eb54388b84049e48b6dafdacf..c50721823b41495c9bc415bfb96283e17abbab31 100644 (file)
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: login.c,v 1.14 2000/06/20 01:39:42 markus Exp $");
 
 #include "loginrec.h"
 
diff --git a/match.c b/match.c
index 4f07223fca376aff59af99c473343a289d573a36..c4f54b2c42057c2f00c5a61a219c73e95ce4988e 100644 (file)
--- a/match.c
+++ b/match.c
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: match.c,v 1.8 2000/06/20 01:39:42 markus Exp $");
 
 #include "ssh.h"
 
diff --git a/mpaux.c b/mpaux.c
index 4c8ee5ab28d3bf5e8defb754c4a4fa239228e7d4..6caae64d67d39be6be4fbe8f008ab38b28764c38 100644 (file)
--- a/mpaux.c
+++ b/mpaux.c
@@ -15,7 +15,7 @@
 */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: mpaux.c,v 1.13 2000/06/20 01:39:42 markus Exp $");
 
 #include <openssl/bn.h>
 #include "getput.h"
diff --git a/mpaux.h b/mpaux.h
index 75d1da9f0e93134a7b3946458a4966087d4c5b81..b05c14bf75ef5eac636e4380db327cc28f65294d 100644 (file)
--- a/mpaux.h
+++ b/mpaux.h
@@ -13,7 +13,7 @@
  * precision integers.
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: mpaux.h,v 1.7 2000/06/20 01:39:42 markus Exp $"); */
 
 #ifndef MPAUX_H
 #define MPAUX_H
diff --git a/nchan.c b/nchan.c
index d0e614ce197d6fc6a0fd795b9a19cd490465b980..cef56497bc1b29b428002845c114900e3857343a 100644 (file)
--- a/nchan.c
+++ b/nchan.c
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: nchan.c,v 1.18 2000/06/20 01:39:42 markus Exp $");
 
 #include "ssh.h"
 
diff --git a/nchan.h b/nchan.h
index 9227442c544af6a718be2b4dfc5935b42528492b..38205cfaf2f022b72862c156ac060d0897ecf748 100644 (file)
--- a/nchan.h
+++ b/nchan.h
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: nchan.h,v 1.8 2000/06/20 01:39:43 markus Exp $"); */
 
 #ifndef NCHAN_H
 #define NCHAN_H
index d4b16ba78838b7335be153d34b11bd338eb2e9d7..137d0181a19f584e35bc16b38273d2d11d3b2416 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: packet.c,v 1.33 2000/06/20 01:39:43 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
index 86647f6ac1e75bc10995321ed4491e8aab5670e8..015d9ec85e18d6fbf02320afc108d180ade496ff 100644 (file)
--- a/packet.h
+++ b/packet.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: packet.h,v 1.16 2000/06/20 01:39:43 markus Exp $"); */
 
 #ifndef PACKET_H
 #define PACKET_H
diff --git a/pty.c b/pty.c
index acdbb806d5e1e7bb26848843e7dd785a4a985b62..a6c238bd943cd8d83a075e4d62de900172d069e3 100644 (file)
--- a/pty.c
+++ b/pty.c
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: pty.c,v 1.14 2000/06/20 01:39:43 markus Exp $");
 
 #ifdef HAVE_UTIL_H
 # include <util.h>
diff --git a/pty.h b/pty.h
index 59befb900178286ac25cfc29c50504bd1692f011..284196813be33f7da7c93b5aeed9057418819fb3 100644 (file)
--- a/pty.h
+++ b/pty.h
@@ -13,7 +13,7 @@
  * tty.
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: pty.h,v 1.7 2000/06/20 01:39:43 markus Exp $"); */
 
 #ifndef PTY_H
 #define PTY_H
index 0ede55d947be9273b339506b7bd329e71f148cd6..6d015a2025f2c306d0afbf9ebcf5782f9541340d 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: readconf.c,v 1.37 2000/06/20 01:39:43 markus Exp $");
 
 #include "ssh.h"
 #include "cipher.h"
index 07da7e7c050f5d0259c08385fe4b941d2b3f2251..e33cebce1924fbfc8fc6d81a997e3f2feff282dd 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: readconf.h,v 1.20 2000/06/20 01:39:43 markus Exp $"); */
 
 #ifndef READCONF_H
 #define READCONF_H
index 3bfec82cc1b8c02ef50d8dfcd33d78af81dafc10..c38292f15716f801cbd12417c970488bbd6ce0f5 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: readpass.c,v 1.11 2000/06/20 01:39:44 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
diff --git a/rsa.c b/rsa.c
index 1a509de30427cabc83437b8f4c146e4f98332be4..46ad6b6e2d308576c91d7d145a28d9276659c73d 100644 (file)
--- a/rsa.c
+++ b/rsa.c
@@ -35,7 +35,7 @@
 */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: rsa.c,v 1.15 2000/06/20 01:39:44 markus Exp $");
 
 #include "rsa.h"
 #include "ssh.h"
diff --git a/rsa.h b/rsa.h
index bbe19cfa6038f67d03aa1398dd14615a369942b0..dfbf6f487672634cb42949817be782e550efeaf5 100644 (file)
--- a/rsa.h
+++ b/rsa.h
@@ -13,7 +13,7 @@
  *
 */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: rsa.h,v 1.7 2000/06/20 01:39:44 markus Exp $"); */
 
 #ifndef RSA_H
 #define RSA_H
diff --git a/scp.c b/scp.c
index 3455b165c7b4f24006f72c1fc48b0fac14f7ce3e..0a89985de1d5dbb893a7352e54395976f52f3e98 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $");
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -1007,7 +1007,7 @@ run_err(const char *fmt,...)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $Id$
+ *     $OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $
  */
 
 char *
index 42bd5df56d5c07889b3b5208f0181cc8becceec8..12cc15260f629711c4702d102227cd356b40360c 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: servconf.c,v 1.45 2000/06/20 01:39:44 markus Exp $");
 
 #include "ssh.h"
 #include "servconf.h"
index 5b724ad83a4e8de45569ffe7cdf0a1516bf26aaa..c698bc74eac296b12dd3e48c197df1fd5387c1a0 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: servconf.h,v 1.25 2000/06/20 01:39:44 markus Exp $"); */
 
 #ifndef SERVCONF_H
 #define SERVCONF_H
index d9b9e04feea08b12e031f383a8f1f72b18d6ff1c..661e1ffa92d7f2c623b4be8a1a9d007cbde1d6d1 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -7,7 +7,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: ssh-add.c,v 1.17 2000/06/20 01:39:44 markus Exp $");
 
 #include <openssl/rsa.h>
 #include <openssl/dsa.h>
index 83034cb9d4ce577d8882a8c63490402bbaea0e44..4b89c15e1a09975d0347289ff73260cf55f7bae1 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.27 2000/06/20 01:39:44 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/pem.h>
diff --git a/ssh.c b/ssh.c
index 01603b467efebccb42d4732a14fd639529c62a15..f9742dc8de63ed1ab6cd6b8e923894ab8de4517c 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -11,7 +11,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: ssh.c,v 1.56 2000/06/20 01:39:44 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/dsa.h>
diff --git a/ssh.h b/ssh.h
index 577e1e30d14ab6bfa3735a24a46aa313848430e6..213f73defe9712ad94a8f50fb6c26f2eb8e6e12b 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -13,7 +13,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: ssh.h,v 1.47 2000/06/20 01:39:45 markus Exp $"); */
 
 #ifndef SSH_H
 #define SSH_H
index 77b8652ea7faeff2ef51c3842e37480282dd8df1..ae96d534e0d0f7b8d1b82a6116746bfff3c38d50 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.13 2000/06/02 02:00:19 todd Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.15 2000/06/21 16:46:10 markus Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
@@ -295,6 +295,7 @@ ssh2_try_pubkey(char *filename,
        unsigned char *blob, *signature;
        int bloblen, slen;
        struct stat st;
+       int skip = 0;
 
        if (stat(filename, &st) != 0) {
                debug("key does not exist: %s", filename);
@@ -314,14 +315,22 @@ ssh2_try_pubkey(char *filename,
                success = load_private_key(filename, passphrase, k, NULL);
                memset(passphrase, 0, strlen(passphrase));
                xfree(passphrase);
-               if (!success)
+               if (!success) {
+                       key_free(k);
                        return 0;
+               }
        }
        dsa_make_key_blob(k, &blob, &bloblen);
 
        /* data to be signed */
        buffer_init(&b);
-       buffer_append(&b, session_id2, session_id2_len);
+       if (datafellows & SSH_COMPAT_SESSIONID_ENCODING) {
+               buffer_put_string(&b, session_id2, session_id2_len);
+               skip = buffer_len(&b);
+       } else {
+               buffer_append(&b, session_id2, session_id2_len);
+               skip = session_id2_len; 
+       }
        buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
        buffer_put_cstring(&b, server_user);
        buffer_put_cstring(&b,
@@ -340,7 +349,6 @@ ssh2_try_pubkey(char *filename,
        buffer_dump(&b);
 #endif
        if (datafellows & SSH_BUG_PUBKEYAUTH) {
-               /* e.g. ssh-2.0.13: data-to-be-signed != data-on-the-wire */
                buffer_clear(&b);
                buffer_append(&b, session_id2, session_id2_len);
                buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
@@ -357,9 +365,9 @@ ssh2_try_pubkey(char *filename,
        xfree(signature);
 
        /* skip session id and packet type */
-       if (buffer_len(&b) < session_id2_len + 1)
+       if (buffer_len(&b) < skip + 1)
                fatal("ssh2_try_pubkey: internal error");
-       buffer_consume(&b, session_id2_len + 1);
+       buffer_consume(&b, skip + 1);
 
        /* put remaining data from buffer into packet */
        packet_start(SSH2_MSG_USERAUTH_REQUEST);
index 9fd430bd40b93bfb5a7ad0ea5a5cd5eab3562940..d10ea0054ff17d7f5bf66361d1fb6c8404abe3f7 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: tildexpand.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
 
 #include "xmalloc.h"
 #include "ssh.h"
index d69ac2a91aea3bee79f20378df944404f6f42223..f4b7af580ce85625b2e3e78b8d02ea6089adc9e4 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: ttymodes.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
 
 #include "packet.h"
 #include "ssh.h"
index 312b84480b08ffc56247c9bc8270435263406132..b0ef247607cb95eb814ea41e5e064c259d3b153f 100644 (file)
@@ -12,7 +12,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: ttymodes.h,v 1.8 2000/06/20 01:39:45 markus Exp $"); */
 
 /* The tty mode description is a stream of bytes.  The stream consists of
  * opcode-arguments pairs.  It is terminated by opcode TTY_OP_END (0).
index 8668aed7fc7dbc97b252b12a190ff48d70d525d0..4213d34ecbfa85eb2968a8d14fec36442ad90b8a 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -7,7 +7,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
 
 #include "ssh.h"
 #include "uidswap.h"
index dcb3d4eddb954d4fb20a34f4cae163f477375fa9..ec62c5804e2834aab9203c31ed2c8d9f27110829 100644 (file)
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -8,7 +8,7 @@
  */
 
 #include "includes.h"
-RCSID("$Id$");
+RCSID("$OpenBSD: xmalloc.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
 
 #include "ssh.h"
 
index c3d95ff460b7c443cf94e1081e64b343b4c344df..b11b49cbf8ee254dd8db022a3c819e1ec123f8fc 100644 (file)
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -14,7 +14,7 @@
  *
  */
 
-/* RCSID("$Id$"); */
+/* RCSID("$OpenBSD: xmalloc.h,v 1.4 2000/06/20 01:39:45 markus Exp $"); */
 
 #ifndef XMALLOC_H
 #define XMALLOC_H
This page took 0.239001 seconds and 5 git commands to generate.