]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/01/31 13:35:11
authordjm <djm>
Tue, 5 Feb 2002 01:19:52 +0000 (01:19 +0000)
committerdjm <djm>
Tue, 5 Feb 2002 01:19:52 +0000 (01:19 +0000)
     [kexdh.c kexgex.c]
     cross check announced key type and type from key blob

ChangeLog
kexdh.c
kexgex.c

index 0c45515fe67fca74b1f16ff27ac48d7880c979bc..df3ade6f65b066607963b8366d213c10d9ec7ceb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,9 @@
    - markus@cvs.openbsd.org 2002/01/29 23:50:37
      [scp.1 ssh.1]
      mention exit status; ok stevesk@
+   - markus@cvs.openbsd.org 2002/01/31 13:35:11
+     [kexdh.c kexgex.c]
+     cross check announced key type and type from key blob
 
 20020130
  - (djm) Delay PRNG seeding until we need it in ssh-keygen, from markus@
diff --git a/kexdh.c b/kexdh.c
index 60d13a8b9a06c846fc147ec96b1544d79056586c..f87d5295211dd7efad97de8a6e2cd2f5e5615f65 100644 (file)
--- a/kexdh.c
+++ b/kexdh.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexdh.c,v 1.13 2002/01/25 22:07:40 markus Exp $");
+RCSID("$OpenBSD: kexdh.c,v 1.14 2002/01/31 13:35:11 markus Exp $");
 
 #include <openssl/crypto.h>
 #include <openssl/bn.h>
@@ -121,7 +121,8 @@ kexdh_client(Kex *kex)
        server_host_key = key_from_blob(server_host_key_blob, sbloblen);
        if (server_host_key == NULL)
                fatal("cannot decode server_host_key_blob");
-
+       if (server_host_key->type != kex->hostkey_type)
+               fatal("type mismatch for decoded server_host_key_blob");
        if (kex->verify_host_key == NULL)
                fatal("cannot verify server_host_key");
        if (kex->verify_host_key(server_host_key) == -1)
index b50a7114f29116aa11c858094221f29af07002d3..dc2fa67239340938428419bfb9eb80e649035d62 100644 (file)
--- a/kexgex.c
+++ b/kexgex.c
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.16 2002/01/25 22:07:40 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.17 2002/01/31 13:35:11 markus Exp $");
 
 #include <openssl/bn.h>
 
@@ -176,7 +176,8 @@ kexgex_client(Kex *kex)
        server_host_key = key_from_blob(server_host_key_blob, sbloblen);
        if (server_host_key == NULL)
                fatal("cannot decode server_host_key_blob");
-
+       if (server_host_key->type != kex->hostkey_type)
+               fatal("type mismatch for decoded server_host_key_blob");
        if (kex->verify_host_key == NULL)
                fatal("cannot verify server_host_key");
        if (kex->verify_host_key(server_host_key) == -1)
This page took 0.069303 seconds and 5 git commands to generate.