From 684ab990cd76643db37b29826fdaa3d52459a552 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 20 Apr 2016 01:25:02 +0900 Subject: ext/openssl: drop support for OPENSSL_NO_HMAC It has not been actually supported: since ossl.h includes openssl/hmac.h without any guards, it wouldn't compile if OPENSSL_NO_HMAC is enabled. --- ext/openssl/openssl_missing.c | 6 +----- ext/openssl/ossl_hmac.c | 11 ----------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index df60c662a7..91797a8d7d 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -13,14 +13,11 @@ #if !defined(OPENSSL_NO_ENGINE) # include #endif -#if !defined(OPENSSL_NO_HMAC) -# include -#endif +#include #include #include "openssl_missing.h" -#if !defined(OPENSSL_NO_HMAC) #if !defined(HAVE_HMAC_CTX_COPY) void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) @@ -33,7 +30,6 @@ HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) EVP_MD_CTX_copy(&out->o_ctx, &in->o_ctx); } #endif /* HAVE_HMAC_CTX_COPY */ -#endif /* NO_HMAC */ #if !defined(HAVE_EVP_CIPHER_CTX_COPY) /* diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c index 5513cb20de..7c114cfb68 100644 --- a/ext/openssl/ossl_hmac.c +++ b/ext/openssl/ossl_hmac.c @@ -7,8 +7,6 @@ * This program is licensed under the same licence as Ruby. * (See the file 'LICENCE'.) */ -#if !defined(OPENSSL_NO_HMAC) - #include "ossl.h" #define MakeHMAC(obj, klass, ctx) \ @@ -360,12 +358,3 @@ Init_ossl_hmac(void) rb_define_alias(cHMAC, "inspect", "hexdigest"); rb_define_alias(cHMAC, "to_s", "hexdigest"); } - -#else /* NO_HMAC */ -# warning >>> OpenSSL is compiled without HMAC support <<< -void -Init_ossl_hmac(void) -{ - rb_warning("HMAC is not available: OpenSSL is compiled without HMAC."); -} -#endif /* NO_HMAC */ -- cgit v1.2.3