Commit a283d2a8 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

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: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 3c33c6f6
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -133,9 +133,7 @@
#ifndef OPENSSL_NO_MD5
# include <openssl/md5.h>
#endif
#ifndef OPENSSL_NO_HMAC
# include <openssl/hmac.h>
#endif
#include <openssl/evp.h>
# include <openssl/sha.h>
#ifndef OPENSSL_NO_RMD160
@@ -1079,9 +1077,7 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_MD5
            BIO_printf(bio_err, "md5      ");
# ifndef OPENSSL_NO_HMAC
            BIO_printf(bio_err, "hmac     ");
# endif
#endif
            BIO_printf(bio_err, "sha1     ");
            BIO_printf(bio_err, "sha256   ");
@@ -1590,7 +1586,7 @@ int MAIN(int argc, char **argv)
    }
#endif

#if !defined(OPENSSL_NO_MD5) && !defined(OPENSSL_NO_HMAC)
#if !defined(OPENSSL_NO_MD5)
    if (doit[D_HMAC]) {
        HMAC_CTX hctx;

+1 −4
Original line number Diff line number Diff line
@@ -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,
+0 −2
Original line number Diff line number Diff line
@@ -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
+0 −4
Original line number Diff line number Diff line
@@ -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 */
+0 −8
Original line number Diff line number Diff line
@@ -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
Loading