aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2014-06-20 18:16:47 -0700
committerKenny Root <kroot@google.com>2014-06-20 18:17:55 -0700
commit649dde2ebc3f8d2e68a4a68cb52fc5cc725eaefc (patch)
tree618eb94fd42dee86c6d7f13da8670f76f11a231a
parent47da33088eb8dc14f930f09ba0b5b4ff017b0002 (diff)
downloadplatform_external_openssh-649dde2ebc3f8d2e68a4a68cb52fc5cc725eaefc.tar.gz
platform_external_openssh-649dde2ebc3f8d2e68a4a68cb52fc5cc725eaefc.tar.bz2
platform_external_openssh-649dde2ebc3f8d2e68a4a68cb52fc5cc725eaefc.zip
Conditionalize RIPEMD references
This unconditionally includes RIPEMD, but it's the only place in the Android source code base. Instead of restoring RIPEMD to OpenSSL, just remove it here. Change-Id: Ie949f64cef1cb7de39baae3f118f2188e663c875
-rw-r--r--mac.c2
-rw-r--r--myproposal.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/mac.c b/mac.c
index eef50f48..0ac9dd82 100644
--- a/mac.c
+++ b/mac.c
@@ -65,8 +65,10 @@ struct {
#endif
{ "hmac-md5", SSH_EVP, EVP_md5, 0, -1, -1 },
{ "hmac-md5-96", SSH_EVP, EVP_md5, 96, -1, -1 },
+#ifdef HAVE_EVP_RIPEMD
{ "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 },
{ "hmac-ripemd160@openssh.com", SSH_EVP, EVP_ripemd160, 0, -1, -1 },
+#endif
{ "umac-64@openssh.com", SSH_UMAC, NULL, 0, 128, 64 },
{ NULL, 0, NULL, 0, -1, -1 }
};
diff --git a/myproposal.h b/myproposal.h
index 0bc1c778..c0516902 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -84,13 +84,19 @@
#else
# define SHA2_HMAC_MODES
#endif
+#ifdef HAVE_EVP_RIPEMD
+#define RIPEMD_MAC_MODES \
+ "hmac-ripemd160," \
+ "hmac-ripemd160@openssh.com,"
+#else
+# define RIPEMD_MAC_MODES
+#endif
#define KEX_DEFAULT_MAC \
"hmac-md5," \
"hmac-sha1," \
"umac-64@openssh.com," \
SHA2_HMAC_MODES \
- "hmac-ripemd160," \
- "hmac-ripemd160@openssh.com," \
+ RIPEMD_MAC_MODES \
"hmac-sha1-96," \
"hmac-md5-96"