#ifndef OSSL_INTERNAL_ASN1_H
# define OSSL_INTERNAL_ASN1_H
+# pragma once
int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb);
#ifndef OSSL_INTERNAL_BIO_H
# define OSSL_INTERNAL_BIO_H
+# pragma once
-#include <openssl/bio.h>
+# include <openssl/bio.h>
struct bio_method_st {
int type;
# define BIO_clear_ktls_ctrl_msg_flag(b) \
BIO_clear_flags(b, BIO_FLAGS_KTLS_TX_CTRL_MSG)
-# define BIO_set_ktls(b, keyblob, is_tx) \
+# define BIO_set_ktls(b, keyblob, is_tx) \
BIO_ctrl(b, BIO_CTRL_SET_KTLS, is_tx, keyblob)
-# define BIO_set_ktls_ctrl_msg(b, record_type) \
+# define BIO_set_ktls_ctrl_msg(b, record_type) \
BIO_ctrl(b, BIO_CTRL_SET_KTLS_TX_SEND_CTRL_MSG, record_type, NULL)
-# define BIO_clear_ktls_ctrl_msg(b) \
+# define BIO_clear_ktls_ctrl_msg(b) \
BIO_ctrl(b, BIO_CTRL_CLEAR_KTLS_TX_CTRL_MSG, 0, NULL)
#endif
#ifndef OSSL_INTERNAL_CONF_H
# define OSSL_INTERNAL_CONF_H
+# pragma once
-#include <openssl/conf.h>
+# include <openssl/conf.h>
-#define DEFAULT_CONF_MFLAGS \
+# define DEFAULT_CONF_MFLAGS \
(CONF_MFLAGS_DEFAULT_SECTION | \
CONF_MFLAGS_IGNORE_MISSING_FILE | \
CONF_MFLAGS_IGNORE_RETURN_CODES)
#ifndef OSSL_INTERNAL_CONSTANT_TIME_H
# define OSSL_INTERNAL_CONSTANT_TIME_H
+# pragma once
# include <stdlib.h>
# include <string.h>
#ifndef OSSL_INTERNAL_CORE_H
# define OSSL_INTERNAL_CORE_H
+# pragma once
/*
* namespaces:
#ifndef OSSL_INTERNAL_CRYPTLIB_H
# define OSSL_INTERNAL_CRYPTLIB_H
+# pragma once
# include <stdlib.h>
# include <string.h>
#ifndef OSSL_INTERNAL_DANE_H
#define OSSL_INTERNAL_DANE_H
+# pragma once
-#include <openssl/safestack.h>
+# include <openssl/safestack.h>
/*-
* Certificate usages:
#ifndef OSSL_INTERNAL_DEPRECATED_H
# define OSSL_INTERNAL_DEPRECATED_H
+# pragma once
# include <openssl/configuration.h>
#ifndef OSSL_INTERNAL_DSO_H
# define OSSL_INTERNAL_DSO_H
+# pragma once
# include <openssl/crypto.h>
# include "internal/dsoerr.h"
#ifndef OSSL_INTERNAL_ENDIAN_H
# define OSSL_INTERNAL_ENDIAN_H
+# pragma once
/*
* IS_LITTLE_ENDIAN and IS_BIG_ENDIAN can be used to detect the endiannes
#ifndef OSSL_INTERNAL_ERR_H
# define OSSL_INTERNAL_ERR_H
+# pragma once
void err_free_strings_int(void);
#ifndef OSSL_INTERNAL_FFC_H
# define OSSL_INTERNAL_FFC_H
+# pragma once
# include <openssl/core.h>
# include <openssl/bn.h>
#ifndef HEADER_INTERNAL_KTLS
# define HEADER_INTERNAL_KTLS
+# pragma once
+
# ifndef OPENSSL_NO_KTLS
# if defined(__FreeBSD__)
#ifndef OSSL_INTERNAL_NELEM_H
# define OSSL_INTERNAL_NELEM_H
+# pragma once
# define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
#endif
#ifndef OSSL_INTERNAL_NUMBERS_H
# define OSSL_INTERNAL_NUMBERS_H
+# pragma once
# include <limits.h>
#ifndef OSSL_INTERNAL_O_DIR_H
# define OSSL_INTERNAL_O_DIR_H
+# pragma once
typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
#ifndef OSSL_INTERNAL_PACKET_H
# define OSSL_INTERNAL_PACKET_H
+# pragma once
# include <string.h>
# include <openssl/bn.h>
* https://www.openssl.org/source/license.html
*/
-#include <openssl/safestack.h>
-#include <openssl/param_build.h>
+#ifndef OSSL_INTERNAL_PARAM_BUILD_SET_H
+# define OSSL_INTERNAL_PARAM_BUILD_SET_H
+# pragma once
+
+# include <openssl/safestack.h>
+# include <openssl/param_build.h>
int ossl_param_build_set_int(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
const char *key, int num);
int ossl_param_build_set_multi_key_bn(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
const char *names[],
STACK_OF(BIGNUM_const) *stk);
+
+#endif /* OSSL_INTERNAL_PARAM_BUILD_SET_H */
#ifndef OSSL_INTERNAL_PASSPHRASE_H
# define OSSL_INTERNAL_PASSPHRASE_H
+# pragma once
/*
* This is a passphrase reader bridge with bells and whistles.
#ifndef OSSL_INTERNAL_PROPERTY_H
# define OSSL_INTERNAL_PROPERTY_H
+# pragma once
-#include "internal/cryptlib.h"
+# include "internal/cryptlib.h"
typedef struct ossl_method_store_st OSSL_METHOD_STORE;
typedef struct ossl_property_list_st OSSL_PROPERTY_LIST;
#ifndef OSSL_INTERNAL_PROVIDER_H
# define OSSL_INTERNAL_PROVIDER_H
+# pragma once
# include <openssl/core.h>
# include <openssl/core_dispatch.h>
*/
#ifndef OSSL_INTERNAL_REFCOUNT_H
# define OSSL_INTERNAL_REFCOUNT_H
+# pragma once
# include <openssl/e_os2.h>
/* TODO(3.0) Move this header into provider when dependencies are removed */
#ifndef OSSL_INTERNAL_SHA3_H
# define OSSL_INTERNAL_SHA3_H
+# pragma once
# include <openssl/e_os2.h>
# include <stddef.h>
#ifndef OSSL_INTERNAL_SIZES_H
# define OSSL_INTERNAL_SIZES_H
+# pragma once
/*
* Max sizes used to allocate buffers with a fixed sizes, for example for
/* TODO(3.0) Move this header into provider when dependencies are removed */
#ifndef OSSL_INTERNAL_SM3_H
# define OSSL_INTERNAL_SM3_H
+# pragma once
# include <openssl/opensslconf.h>
#ifndef OSSL_INTERNAL_SOCKETS_H
# define OSSL_INTERNAL_SOCKETS_H
+# pragma once
# if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)
# define NO_SYS_PARAM_H
#ifndef OSSL_INTERNAL_SSLCONF_H
# define OSSL_INTERNAL_SSLCONF_H
+# pragma once
typedef struct ssl_conf_cmd_st SSL_CONF_CMD;
#ifndef OSSL_INTERNAL_SYMHACKS_H
# define OSSL_INTERNAL_SYMHACKS_H
+# pragma once
# include <openssl/e_os2.h>
* https://www.openssl.org/source/license.html
*/
-#include <openssl/crypto.h>
+#ifndef OSSL_INTERNAL_THREAD_ONCE_H
+# define OSSL_INTERNAL_THREAD_ONCE_H
+# pragma once
+
+# include <openssl/crypto.h>
/*
* Initialisation of global data should never happen via "RUN_ONCE" inside the
* OSSL_LIB_CTX object. In this way data will get cleaned up correctly when the
* module gets unloaded.
*/
-#if !defined(FIPS_MODULE) || defined(ALLOW_RUN_ONCE_IN_FIPS)
+# if !defined(FIPS_MODULE) || defined(ALLOW_RUN_ONCE_IN_FIPS)
/*
* DEFINE_RUN_ONCE: Define an initialiser function that should be run exactly
* once. It takes no arguments and returns an int result (1 for success or
* return 0;
* }
*/
-# define DEFINE_RUN_ONCE(init) \
+# define DEFINE_RUN_ONCE(init) \
static int init(void); \
int init##_ossl_ret_ = 0; \
void init##_ossl_(void) \
* DECLARE_RUN_ONCE: Declare an initialiser function that should be run exactly
* once that has been defined in another file via DEFINE_RUN_ONCE().
*/
-# define DECLARE_RUN_ONCE(init) \
+# define DECLARE_RUN_ONCE(init) \
extern int init##_ossl_ret_; \
void init##_ossl_(void);
* return 0;
* }
*/
-# define DEFINE_RUN_ONCE_STATIC(init) \
+# define DEFINE_RUN_ONCE_STATIC(init) \
static int init(void); \
static int init##_ossl_ret_ = 0; \
static void init##_ossl_(void) \
* return 0;
* }
*/
-# define DEFINE_RUN_ONCE_STATIC_ALT(initalt, init) \
+# define DEFINE_RUN_ONCE_STATIC_ALT(initalt, init) \
static int initalt(void); \
static void initalt##_ossl_(void) \
{ \
*
* (*) by convention, since the init function must return 1 on success.
*/
-# define RUN_ONCE(once, init) \
+# define RUN_ONCE(once, init) \
(CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
/*
*
* (*) by convention, since the init function must return 1 on success.
*/
-# define RUN_ONCE_ALT(once, initalt, init) \
+# define RUN_ONCE_ALT(once, initalt, init) \
(CRYPTO_THREAD_run_once(once, initalt##_ossl_) ? init##_ossl_ret_ : 0)
-#endif /* FIPS_MODULE */
+# endif /* FIPS_MODULE */
+#endif /* OSSL_INTERNAL_THREAD_ONCE_H */
#ifndef OSSL_INTERNAL_TLSGROUPS_H
# define OSSL_INTERNAL_TLSGROUPS_H
+# pragma once
# define OSSL_TLS_GROUP_ID_sect163k1 0x0001
# define OSSL_TLS_GROUP_ID_sect163r1 0x0002