diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-05 15:45:27 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-14 20:00:56 +0900 |
commit | 47866b4554c1a0cbec019d552c69289b73976e14 (patch) | |
tree | 6f10239bab07a5da0b251e9df74d74dfc37f4489 | |
parent | d9c2a47f68c8584ee98e058b4f46af325dcd1b39 (diff) | |
download | ruby-47866b4554c1a0cbec019d552c69289b73976e14.tar.gz |
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.
-rw-r--r-- | ext/openssl/openssl_missing.c | 6 | ||||
-rw-r--r-- | ext/openssl/ossl_hmac.c | 11 |
2 files changed, 1 insertions, 16 deletions
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index 6f547b6b06..47c5ee8166 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -13,9 +13,7 @@ #if !defined(OPENSSL_NO_ENGINE) # include <openssl/engine.h> #endif -#if !defined(OPENSSL_NO_HMAC) -# include <openssl/hmac.h> -#endif +#include <openssl/hmac.h> #include <openssl/x509_vfy.h> #include "openssl_missing.h" @@ -44,7 +42,6 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) } #endif -#if !defined(OPENSSL_NO_HMAC) #if !defined(HAVE_HMAC_CTX_COPY) void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) @@ -57,7 +54,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 */ /* added in 1.0.2 */ #if !defined(HAVE_CRYPTO_MEMCMP) 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 */ |