* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_BLAKE2
+#include <openssl/core_numbers.h>
+#include <openssl/core_names.h>
+#include <openssl/params.h>
-# include <openssl/core_numbers.h>
-# include <openssl/core_names.h>
-# include <openssl/params.h>
-
-# include "internal/blake2.h"
-# include "internal/cryptlib.h"
-# include "internal/providercommonerr.h"
-# include "internal/provider_algs.h"
+#include "internal/blake2.h"
+#include "internal/cryptlib.h"
+#include "internal/providercommonerr.h"
+#include "internal/provider_algs.h"
/*
* Forward declaration of everything implemented here. This is not strictly
{ OSSL_FUNC_MAC_SET_CTX_PARAMS, (void (*)(void))blake2_mac_set_ctx_params },
{ 0, NULL }
};
-
-#endif
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_BLAKE2
-
/* Constants */
-# define BLAKE2_CTX BLAKE2B_CTX
-# define BLAKE2_PARAM BLAKE2B_PARAM
-# define BLAKE2_KEYBYTES BLAKE2B_KEYBYTES
-# define BLAKE2_OUTBYTES BLAKE2B_OUTBYTES
-# define BLAKE2_PERSONALBYTES BLAKE2B_PERSONALBYTES
-# define BLAKE2_SALTBYTES BLAKE2B_SALTBYTES
+#define BLAKE2_CTX BLAKE2B_CTX
+#define BLAKE2_PARAM BLAKE2B_PARAM
+#define BLAKE2_KEYBYTES BLAKE2B_KEYBYTES
+#define BLAKE2_OUTBYTES BLAKE2B_OUTBYTES
+#define BLAKE2_PERSONALBYTES BLAKE2B_PERSONALBYTES
+#define BLAKE2_SALTBYTES BLAKE2B_SALTBYTES
/* Function names */
-# define BLAKE2_PARAM_INIT blake2b_param_init
-# define BLAKE2_INIT_KEY blake2b_init_key
-# define BLAKE2_UPDATE blake2b_update
-# define BLAKE2_FINAL blake2b_final
-# define BLAKE2_PARAM_SET_DIGEST_LENGTH blake2b_param_set_digest_length
-# define BLAKE2_PARAM_SET_KEY_LENGTH blake2b_param_set_key_length
-# define BLAKE2_PARAM_SET_PERSONAL blake2b_param_set_personal
-# define BLAKE2_PARAM_SET_SALT blake2b_param_set_salt
+#define BLAKE2_PARAM_INIT blake2b_param_init
+#define BLAKE2_INIT_KEY blake2b_init_key
+#define BLAKE2_UPDATE blake2b_update
+#define BLAKE2_FINAL blake2b_final
+#define BLAKE2_PARAM_SET_DIGEST_LENGTH blake2b_param_set_digest_length
+#define BLAKE2_PARAM_SET_KEY_LENGTH blake2b_param_set_key_length
+#define BLAKE2_PARAM_SET_PERSONAL blake2b_param_set_personal
+#define BLAKE2_PARAM_SET_SALT blake2b_param_set_salt
/* OSSL_DISPATCH symbol */
-# define BLAKE2_FUNCTIONS blake2bmac_functions
+#define BLAKE2_FUNCTIONS blake2bmac_functions
-# include "blake2_mac_impl.c"
+#include "blake2_mac_impl.c"
-#endif
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_BLAKE2
-
/* Constants */
-# define BLAKE2_CTX BLAKE2S_CTX
-# define BLAKE2_PARAM BLAKE2S_PARAM
-# define BLAKE2_KEYBYTES BLAKE2S_KEYBYTES
-# define BLAKE2_OUTBYTES BLAKE2S_OUTBYTES
-# define BLAKE2_PERSONALBYTES BLAKE2S_PERSONALBYTES
-# define BLAKE2_SALTBYTES BLAKE2S_SALTBYTES
+#define BLAKE2_CTX BLAKE2S_CTX
+#define BLAKE2_PARAM BLAKE2S_PARAM
+#define BLAKE2_KEYBYTES BLAKE2S_KEYBYTES
+#define BLAKE2_OUTBYTES BLAKE2S_OUTBYTES
+#define BLAKE2_PERSONALBYTES BLAKE2S_PERSONALBYTES
+#define BLAKE2_SALTBYTES BLAKE2S_SALTBYTES
/* Function names */
-# define BLAKE2_PARAM_INIT blake2s_param_init
-# define BLAKE2_INIT_KEY blake2s_init_key
-# define BLAKE2_UPDATE blake2s_update
-# define BLAKE2_FINAL blake2s_final
-# define BLAKE2_PARAM_SET_DIGEST_LENGTH blake2s_param_set_digest_length
-# define BLAKE2_PARAM_SET_KEY_LENGTH blake2s_param_set_key_length
-# define BLAKE2_PARAM_SET_PERSONAL blake2s_param_set_personal
-# define BLAKE2_PARAM_SET_SALT blake2s_param_set_salt
+#define BLAKE2_PARAM_INIT blake2s_param_init
+#define BLAKE2_INIT_KEY blake2s_init_key
+#define BLAKE2_UPDATE blake2s_update
+#define BLAKE2_FINAL blake2s_final
+#define BLAKE2_PARAM_SET_DIGEST_LENGTH blake2s_param_set_digest_length
+#define BLAKE2_PARAM_SET_KEY_LENGTH blake2s_param_set_key_length
+#define BLAKE2_PARAM_SET_PERSONAL blake2s_param_set_personal
+#define BLAKE2_PARAM_SET_SALT blake2s_param_set_salt
/* OSSL_DISPATCH symbol */
-# define BLAKE2_FUNCTIONS blake2smac_functions
-
-# include "blake2_mac_impl.c"
+#define BLAKE2_FUNCTIONS blake2smac_functions
-#endif
+#include "blake2_mac_impl.c"
LIBS=../../../libcrypto
-SOURCE[../../../libcrypto]=\
- blake2b_mac.c blake2s_mac.c siphash_prov.c poly1305_prov.c
+
+IF[{- !$disabled{blake2} -}]
+ SOURCE[../../../libcrypto]=blake2b_mac.c blake2s_mac.c
+ENDIF
+
+IF[{- !$disabled{siphash} -}]
+ SOURCE[../../../libcrypto]=siphash_prov.c
+ENDIF
+
+IF[{- !$disabled{poly1305} -}]
+ SOURCE[../../../libcrypto]=poly1305_prov.c
+ENDIF
+
INCLUDE[../../../libcrypto]=. ../../../crypto
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_POLY1305
+#include <openssl/core_numbers.h>
+#include <openssl/core_names.h>
+#include <openssl/params.h>
+#include <openssl/evp.h>
+#include <openssl/err.h>
-# include <openssl/core_numbers.h>
-# include <openssl/core_names.h>
-# include <openssl/params.h>
-# include <openssl/evp.h>
-# include <openssl/err.h>
-
-# include "internal/poly1305.h"
+#include "internal/poly1305.h"
/*
* TODO(3.0) when poly1305 has moved entirely to our providers, this
* header should be moved to the provider include directory. For the
* moment, crypto/poly1305/poly1305_ameth.c has us stuck.
*/
-# include "../../../crypto/poly1305/poly1305_local.h"
+#include "../../../crypto/poly1305/poly1305_local.h"
-# include "internal/providercommonerr.h"
-# include "internal/provider_algs.h"
+#include "internal/providercommonerr.h"
+#include "internal/provider_algs.h"
/*
* Forward declaration of everything implemented here. This is not strictly
{ OSSL_FUNC_MAC_SET_CTX_PARAMS, (void (*)(void))poly1305_set_ctx_params },
{ 0, NULL }
};
-
-#endif
* https://www.openssl.org/source/license.html
*/
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_SIPHASH
-
-# include <string.h>
-# include <openssl/core_numbers.h>
-# include <openssl/core_names.h>
-# include <openssl/params.h>
-# include <openssl/evp.h>
-# include <openssl/err.h>
-
-# include "internal/siphash.h"
+#include <string.h>
+#include <openssl/core_numbers.h>
+#include <openssl/core_names.h>
+#include <openssl/params.h>
+#include <openssl/evp.h>
+#include <openssl/err.h>
+
+#include "internal/siphash.h"
/*
* TODO(3.0) when siphash has moved entirely to our providers, this
* header should be moved to the provider include directory. For the
* moment, crypto/siphash/siphash_ameth.c has us stuck.
*/
-# include "../../../crypto/siphash/siphash_local.h"
+#include "../../../crypto/siphash/siphash_local.h"
-# include "internal/providercommonerr.h"
-# include "internal/provider_algs.h"
+#include "internal/providercommonerr.h"
+#include "internal/provider_algs.h"
/*
* Forward declaration of everything implemented here. This is not strictly
{ OSSL_FUNC_MAC_SET_CTX_PARAMS, (void (*)(void))siphash_set_params },
{ 0, NULL }
};
-
-#endif