diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-02-06 12:16:58 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-02-06 12:16:58 +0000 |
commit | a283d2a80adfaa88573bcd9acd3d8d7ab55c1af4 (patch) | |
tree | 319cd33b1def09641c6caf981564bdc3565b9f3e /crypto | |
parent | 3c33c6f6b10864355553961e638514a6d1bb00f6 (diff) | |
download | openssl-a283d2a80adfaa88573bcd9acd3d8d7ab55c1af4.tar.gz |
Remove OPENSSL_NO_HMAC
Disabling HMAC doesn't work. If it did it would end up disabling a lot of
OpenSSL functionality (it is required for all versions of TLS for example).
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_pbe.c | 5 | ||||
-rw-r--r-- | crypto/evp/p5_crpt2.c | 2 | ||||
-rw-r--r-- | crypto/hmac/hmac.h | 4 | ||||
-rw-r--r-- | crypto/hmac/hmactest.c | 8 | ||||
-rw-r--r-- | crypto/pkcs12/p12_mutl.c | 2 |
5 files changed, 1 insertions, 20 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index e3fa95db92..35346525ee 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -87,9 +87,7 @@ static const EVP_PBE_CTL builtin_pbe[] = { {EVP_PBE_TYPE_OUTER, NID_pbeWithSHA1AndRC2_CBC, NID_rc2_64_cbc, NID_sha1, PKCS5_PBE_keyivgen}, -#ifndef OPENSSL_NO_HMAC {EVP_PBE_TYPE_OUTER, NID_id_pbkdf2, -1, -1, PKCS5_v2_PBKDF2_keyivgen}, -#endif {EVP_PBE_TYPE_OUTER, NID_pbe_WithSHA1And128BitRC4, NID_rc4, NID_sha1, PKCS12_PBE_keyivgen}, @@ -104,9 +102,8 @@ static const EVP_PBE_CTL builtin_pbe[] = { {EVP_PBE_TYPE_OUTER, NID_pbe_WithSHA1And40BitRC2_CBC, NID_rc2_40_cbc, NID_sha1, PKCS12_PBE_keyivgen}, -#ifndef OPENSSL_NO_HMAC {EVP_PBE_TYPE_OUTER, NID_pbes2, -1, -1, PKCS5_v2_PBE_keyivgen}, -#endif + {EVP_PBE_TYPE_OUTER, NID_pbeWithMD2AndRC2_CBC, NID_rc2_64_cbc, NID_md2, PKCS5_PBE_keyivgen}, {EVP_PBE_TYPE_OUTER, NID_pbeWithMD5AndRC2_CBC, diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c index b9c4dcbeda..6c458e9df8 100644 --- a/crypto/evp/p5_crpt2.c +++ b/crypto/evp/p5_crpt2.c @@ -59,7 +59,6 @@ #include <stdio.h> #include <stdlib.h> #include "cryptlib.h" -#if !defined(OPENSSL_NO_HMAC) # include <openssl/x509.h> # include <openssl/evp.h> # include <openssl/hmac.h> @@ -331,4 +330,3 @@ static void h__dump(const unsigned char *p, int len) fprintf(stderr, "\n"); } # endif -#endif diff --git a/crypto/hmac/hmac.h b/crypto/hmac/hmac.h index 2712e011f9..2404e530ee 100644 --- a/crypto/hmac/hmac.h +++ b/crypto/hmac/hmac.h @@ -60,10 +60,6 @@ # include <openssl/opensslconf.h> -# ifdef OPENSSL_NO_HMAC -# error HMAC is disabled. -# endif - # include <openssl/evp.h> # define HMAC_MAX_MD_CBLOCK 128/* largest known is SHA512 */ diff --git a/crypto/hmac/hmactest.c b/crypto/hmac/hmactest.c index 492f5c5e81..de8d1c911c 100644 --- a/crypto/hmac/hmactest.c +++ b/crypto/hmac/hmactest.c @@ -62,13 +62,6 @@ #include "../e_os.h" -#ifdef OPENSSL_NO_HMAC -int main(int argc, char *argv[]) -{ - printf("No HMAC support\n"); - return (0); -} -#else # include <openssl/hmac.h> # ifndef OPENSSL_NO_MD5 # include <openssl/md5.h> @@ -163,4 +156,3 @@ static char *pt(unsigned char *md) return (buf); } # endif -#endif diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c index 256b210cce..4138a4d508 100644 --- a/crypto/pkcs12/p12_mutl.c +++ b/crypto/pkcs12/p12_mutl.c @@ -57,7 +57,6 @@ * */ -#ifndef OPENSSL_NO_HMAC # include <stdio.h> # include "cryptlib.h" # include <openssl/hmac.h> @@ -191,4 +190,3 @@ int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, return 1; } -#endif |