mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-25 14:54:45 +02:00
Move OPENSSL_NO_RIPEMD160 to compat.
Move OPENSSL_NO_RIPEMD160 to compat and add ifdefs to mac.c around the ripemd160 MACs.
This commit is contained in:
parent
bce5888516
commit
a9ff3950b8
@ -32,8 +32,7 @@
|
|||||||
#include "digest.h"
|
#include "digest.h"
|
||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
|
|
||||||
#if !defined(HAVE_EVP_RIPEMD160) || defined(OPENSSL_NO_RIPEMD) || \
|
#ifndef HAVE_EVP_RIPEMD160
|
||||||
defined(OPENSSL_NO_RMD160)
|
|
||||||
# define EVP_ripemd160 NULL
|
# define EVP_ripemd160 NULL
|
||||||
#endif /* HAVE_EVP_RIPEMD160 */
|
#endif /* HAVE_EVP_RIPEMD160 */
|
||||||
#ifndef HAVE_EVP_SHA256
|
#ifndef HAVE_EVP_SHA256
|
||||||
|
4
mac.c
4
mac.c
@ -64,8 +64,10 @@ static const struct macalg macs[] = {
|
|||||||
#endif
|
#endif
|
||||||
{ "hmac-md5", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 },
|
{ "hmac-md5", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 },
|
||||||
{ "hmac-md5-96", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 },
|
{ "hmac-md5-96", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 },
|
||||||
|
#ifdef HAVE_EVP_RIPEMD160
|
||||||
{ "hmac-ripemd160", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
|
{ "hmac-ripemd160", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
|
||||||
{ "hmac-ripemd160@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
|
{ "hmac-ripemd160@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
|
||||||
|
#endif
|
||||||
{ "umac-64@openssh.com", SSH_UMAC, 0, 0, 128, 64, 0 },
|
{ "umac-64@openssh.com", SSH_UMAC, 0, 0, 128, 64, 0 },
|
||||||
{ "umac-128@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 0 },
|
{ "umac-128@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 0 },
|
||||||
|
|
||||||
@ -78,7 +80,9 @@ static const struct macalg macs[] = {
|
|||||||
#endif
|
#endif
|
||||||
{ "hmac-md5-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 1 },
|
{ "hmac-md5-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 1 },
|
||||||
{ "hmac-md5-96-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 1 },
|
{ "hmac-md5-96-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 1 },
|
||||||
|
#ifdef HAVE_EVP_RIPEMD160
|
||||||
{ "hmac-ripemd160-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 1 },
|
{ "hmac-ripemd160-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 1 },
|
||||||
|
#endif
|
||||||
{ "umac-64-etm@openssh.com", SSH_UMAC, 0, 0, 128, 64, 1 },
|
{ "umac-64-etm@openssh.com", SSH_UMAC, 0, 0, 128, 64, 1 },
|
||||||
{ "umac-128-etm@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 1 },
|
{ "umac-128-etm@openssh.com", SSH_UMAC128, 0, 0, 128, 128, 1 },
|
||||||
|
|
||||||
|
@ -69,6 +69,12 @@ void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_EVP_RIPEMD160)
|
||||||
|
# if defined(OPENSSL_NO_RIPEMD) || defined(OPENSSL_NO_RMD160)
|
||||||
|
# undef HAVE_EVP_RIPEMD160
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We overload some of the OpenSSL crypto functions with ssh_* equivalents
|
* We overload some of the OpenSSL crypto functions with ssh_* equivalents
|
||||||
* to automatically handle OpenSSL engine initialisation.
|
* to automatically handle OpenSSL engine initialisation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user