summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--digest-openssl.c3
-rw-r--r--mac.c4
-rw-r--r--openbsd-compat/openssl-compat.h6
3 files changed, 11 insertions, 2 deletions
diff --git a/digest-openssl.c b/digest-openssl.c
index 517d2a24c..13b63c2f0 100644
--- a/digest-openssl.c
+++ b/digest-openssl.c
@@ -32,8 +32,7 @@
32#include "digest.h" 32#include "digest.h"
33#include "ssherr.h" 33#include "ssherr.h"
34 34
35#if !defined(HAVE_EVP_RIPEMD160) || defined(OPENSSL_NO_RIPEMD) || \ 35#ifndef HAVE_EVP_RIPEMD160
36 defined(OPENSSL_NO_RMD160)
37# define EVP_ripemd160 NULL 36# define EVP_ripemd160 NULL
38#endif /* HAVE_EVP_RIPEMD160 */ 37#endif /* HAVE_EVP_RIPEMD160 */
39#ifndef HAVE_EVP_SHA256 38#ifndef HAVE_EVP_SHA256
diff --git a/mac.c b/mac.c
index 6b12cd197..5ba7fae19 100644
--- a/mac.c
+++ b/mac.c
@@ -64,8 +64,10 @@ static const struct macalg macs[] = {
64#endif 64#endif
65 { "hmac-md5", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 }, 65 { "hmac-md5", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 },
66 { "hmac-md5-96", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 }, 66 { "hmac-md5-96", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 },
67#ifdef HAVE_EVP_RIPEMD160
67 { "hmac-ripemd160", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 }, 68 { "hmac-ripemd160", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
68 { "hmac-ripemd160@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 }, 69 { "hmac-ripemd160@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
70#endif
69 { "umac-64@openssh.com", SSH_UMAC, 0, 0, 128, 64, 0 }, 71 { "umac-64@openssh.com", SSH_UMAC, 0, 0, 128, 64, 0 },
70 { "umac-128@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 0 }, 72 { "umac-128@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 0 },
71 73
@@ -78,7 +80,9 @@ static const struct macalg macs[] = {
78#endif 80#endif
79 { "hmac-md5-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 1 }, 81 { "hmac-md5-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 1 },
80 { "hmac-md5-96-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 1 }, 82 { "hmac-md5-96-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 1 },
83#ifdef HAVE_EVP_RIPEMD160
81 { "hmac-ripemd160-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 1 }, 84 { "hmac-ripemd160-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 1 },
85#endif
82 { "umac-64-etm@openssh.com", SSH_UMAC, 0, 0, 128, 64, 1 }, 86 { "umac-64-etm@openssh.com", SSH_UMAC, 0, 0, 128, 64, 1 },
83 { "umac-128-etm@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 1 }, 87 { "umac-128-etm@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 1 },
84 88
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 3513d6011..2ae42bacf 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -69,6 +69,12 @@ void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
69# endif 69# endif
70#endif 70#endif
71 71
72#if defined(HAVE_EVP_RIPEMD160)
73# if defined(OPENSSL_NO_RIPEMD) || defined(OPENSSL_NO_RMD160)
74# undef HAVE_EVP_RIPEMD160
75# endif
76#endif
77
72/* 78/*
73 * We overload some of the OpenSSL crypto functions with ssh_* equivalents 79 * We overload some of the OpenSSL crypto functions with ssh_* equivalents
74 * to automatically handle OpenSSL engine initialisation. 80 * to automatically handle OpenSSL engine initialisation.