e_old.c pmeth_lib.c pmeth_fn.c pmeth_gn.c m_sigver.c \
e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c e_rc4_hmac_md5.c \
e_chacha20_poly1305.c cmeth_lib.c \
- mac_lib.c
+ mac_lib.c c_allm.c
INCLUDE[e_aes.o]=.. ../modes
INCLUDE[e_aes_cbc_hmac_sha1.o]=../modes
--- /dev/null
+/*
+ * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#include <openssl/evp.h>
+#include "internal/evp_int.h"
+
+void openssl_add_all_macs_int(void)
+{
+}
void openssl_add_all_ciphers_int(void);
void openssl_add_all_digests_int(void);
+void openssl_add_all_macs_int(void);
void evp_cleanup_int(void);
void evp_app_cleanup_int(void);
return 1;
}
+static CRYPTO_ONCE add_all_macs = CRYPTO_ONCE_STATIC_INIT;
+DEFINE_RUN_ONCE_STATIC(ossl_init_add_all_macs)
+{
+ /*
+ * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
+ * pulling in all the macs during static linking
+ */
+#ifndef OPENSSL_NO_AUTOALGINIT
+# ifdef OPENSSL_INIT_DEBUG
+ fprintf(stderr, "OPENSSL_INIT: ossl_init_add_all_macs: "
+ "openssl_add_all_macs_int()\n");
+# endif
+ openssl_add_all_macs_int();
+#endif
+ return 1;
+}
+
DEFINE_RUN_ONCE_STATIC(ossl_init_no_add_algs)
{
/* Do nothing */
&& !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
return 0;
+ if ((opts & OPENSSL_INIT_NO_ADD_ALL_MACS)
+ && !RUN_ONCE(&add_all_macs, ossl_init_no_add_algs))
+ return 0;
+
+ if ((opts & OPENSSL_INIT_ADD_ALL_MACS)
+ && !RUN_ONCE(&add_all_macs, ossl_init_add_all_macs))
+ return 0;
+
if ((opts & OPENSSL_INIT_ATFORK)
&& !openssl_init_fork_handlers())
return 0;
/* OPENSSL_INIT_ZLIB 0x00010000L */
# define OPENSSL_INIT_ATFORK 0x00020000L
/* OPENSSL_INIT_BASE_ONLY 0x00040000L */
-/* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */
+/* FREE: 0x00080000L */
+/* OPENSSL_INIT flag range 0x03f00000 reserved for OPENSSL_init_ssl() */
+# define OPENSSL_INIT_NO_ADD_ALL_MACS 0x04000000L
+# define OPENSSL_INIT_ADD_ALL_MACS 0x08000000L
+/* FREE: 0x10000000L */
+/* FREE: 0x20000000L */
+/* FREE: 0x40000000L */
+/* FREE: 0x80000000L */
/* Max OPENSSL_INIT flag value is 0x80000000 */
/* openssl and dasync not counted as builtin */
| OPENSSL_INIT_LOAD_CONFIG
#endif
| OPENSSL_INIT_ADD_ALL_CIPHERS
- | OPENSSL_INIT_ADD_ALL_DIGESTS,
+ | OPENSSL_INIT_ADD_ALL_DIGESTS
+ | OPENSSL_INIT_ADD_ALL_MACS,
settings))
return 0;