]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (tim) [mac.c myproposal.h] Wrap SHA256 and SHA512 in ifdefs for
authorTim Rice <tim@multitalents.net>
Wed, 17 Aug 2011 00:29:01 +0000 (17:29 -0700)
committerTim Rice <tim@multitalents.net>
Wed, 17 Aug 2011 00:29:01 +0000 (17:29 -0700)
   OpenSSL 0.9.7. ok djm

ChangeLog
mac.c
myproposal.h

index 2fc1f12a165e64e6c308308cdddad7552d55b6a3..cc29abce426c92b0f97bc11f0a4bb28bd034fc90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20110817
+ - (tim) [mac.c myproposal.h] Wrap SHA256 and SHA512 in ifdefs for
+   OpenSSL 0.9.7. ok djm
+
 20110812
  - (dtucker) [openbsd-compat/port-linux.c] Bug 1924: Improve selinux context
    change error by reporting old and new context names  Patch from
diff --git a/mac.c b/mac.c
index 4965f38c8936eb7c735b5a315ebd345cf39bc62b..eef50f48d6d3fb744103c4c0a7ead267d04316db 100644 (file)
--- a/mac.c
+++ b/mac.c
@@ -57,10 +57,12 @@ struct {
 } macs[] = {
        { "hmac-sha1",                  SSH_EVP, EVP_sha1, 0, -1, -1 },
        { "hmac-sha1-96",               SSH_EVP, EVP_sha1, 96, -1, -1 },
+#ifdef HAVE_EVP_SHA256
        { "hmac-sha2-256",              SSH_EVP, EVP_sha256, 0, -1, -1 },
        { "hmac-sha2-256-96",           SSH_EVP, EVP_sha256, 96, -1, -1 },
        { "hmac-sha2-512",              SSH_EVP, EVP_sha512, 0, -1, -1 },
        { "hmac-sha2-512-96",           SSH_EVP, EVP_sha512, 96, -1, -1 },
+#endif
        { "hmac-md5",                   SSH_EVP, EVP_md5, 0, -1, -1 },
        { "hmac-md5-96",                SSH_EVP, EVP_md5, 96, -1, -1 },
        { "hmac-ripemd160",             SSH_EVP, EVP_ripemd160, 0, -1, -1 },
index aeb5201dcabd3c9b2424781c832d19c91d8a5a8d..0bc1c778c63137510799a213fad269b7f60ea03c 100644 (file)
        "arcfour256,arcfour128," \
        "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
        "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se"
+#ifdef HAVE_EVP_SHA256
+#define        SHA2_HMAC_MODES \
+       "hmac-sha2-256," \
+       "hmac-sha2-256-96," \
+       "hmac-sha2-512," \
+       "hmac-sha2-512-96,"
+#else
+# define SHA2_HMAC_MODES
+#endif
 #define        KEX_DEFAULT_MAC \
        "hmac-md5," \
        "hmac-sha1," \
        "umac-64@openssh.com," \
-       "hmac-sha2-256," \
-       "hmac-sha2-256-96," \
-       "hmac-sha2-512," \
-       "hmac-sha2-512-96," \
+       SHA2_HMAC_MODES \
        "hmac-ripemd160," \
        "hmac-ripemd160@openssh.com," \
        "hmac-sha1-96," \