]> andersk Git - openssh.git/blobdiff - kex.c
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
[openssh.git] / kex.c
diff --git a/kex.c b/kex.c
index 3082b73f2488f5110918230a54110646867f54d1..9c41b5123e1d2c8b1e7e71a5a3ff5525d59caabd 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -38,20 +38,14 @@ RCSID("$Id$");
 #include "cipher.h"
 #include "compat.h"
 
-#if HAVE_OPENSSL
-# include <openssl/bn.h>
-# include <openssl/dh.h>
-# include <openssl/crypto.h>
-# include <openssl/bio.h>
-# include <openssl/pem.h>
-#endif /* HAVE_OPENSSL */
-#if HAVE_SSL
-# include <ssl/bn.h>
-# include <ssl/dh.h>
-# include <ssl/crypto.h>
-# include <ssl/bio.h>
-# include <ssl/pem.h>
-#endif /* HAVE_SSL */
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+
+#include <openssl/crypto.h>
+#include <openssl/bio.h>
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+#include <openssl/pem.h>
 
 #include "kex.h"
 
@@ -149,12 +143,12 @@ void
 dump_digest(unsigned char *digest, int len)
 {
        int i;
-        for (i = 0; i< len; i++){
-                fprintf(stderr, "%02x", digest[i]);
+       for (i = 0; i< len; i++){
+               fprintf(stderr, "%02x", digest[i]);
                if(i%2!=0)
                        fprintf(stderr, " ");
        }
-        fprintf(stderr, "\n");
+       fprintf(stderr, "\n");
 }
 
 unsigned char *
@@ -201,7 +195,7 @@ kex_hash(
        buffer_free(&b);
 
 #ifdef DEBUG_KEX
-        dump_digest(digest, evp_md->md_size);
+       dump_digest(digest, evp_md->md_size);
 #endif
        return digest;
 }
@@ -320,7 +314,7 @@ choose_mac(Mac *mac, char *client, char *server)
        }
        mac->name = name;
        mac->mac_len = mac->md->md_size;
-       mac->key_len = datafellows ? 16 : mac->mac_len;
+       mac->key_len = (datafellows & SSH_BUG_HMAC) ? 16 : mac->mac_len;
        mac->key = NULL;
        mac->enabled = 0;
 }
@@ -345,7 +339,7 @@ choose_kex(Kex *k, char *client, char *server)
        k->name = get_match(client, server);
        if (k->name == NULL)
                fatal("no kex alg");
-       if (strcmp(k->name, KEX_DH1) != 0)
+       if (strcmp(k->name, KEX_DH1) != 0)
                fatal("bad kex alg %s", k->name);
 }
 void
This page took 0.03751 seconds and 4 git commands to generate.