mirror of
https://github.com/openssl/openssl.git
synced 2025-04-12 20:30:52 +08:00
include/internal: add a few missing #pragma once directives
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/14096)
This commit is contained in:
parent
d59068bd14
commit
3a111aadc3
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_ASN1_H
|
||||
# define OSSL_INTERNAL_ASN1_H
|
||||
# pragma once
|
||||
|
||||
int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb);
|
||||
|
||||
|
@ -9,8 +9,9 @@
|
||||
|
||||
#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;
|
||||
@ -62,11 +63,11 @@ int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);
|
||||
# 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
|
||||
|
@ -9,10 +9,11 @@
|
||||
|
||||
#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)
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_CONSTANT_TIME_H
|
||||
# define OSSL_INTERNAL_CONSTANT_TIME_H
|
||||
# pragma once
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_CORE_H
|
||||
# define OSSL_INTERNAL_CORE_H
|
||||
# pragma once
|
||||
|
||||
/*
|
||||
* namespaces:
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_CRYPTLIB_H
|
||||
# define OSSL_INTERNAL_CRYPTLIB_H
|
||||
# pragma once
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
|
@ -9,8 +9,9 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_DANE_H
|
||||
#define OSSL_INTERNAL_DANE_H
|
||||
# pragma once
|
||||
|
||||
#include <openssl/safestack.h>
|
||||
# include <openssl/safestack.h>
|
||||
|
||||
/*-
|
||||
* Certificate usages:
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_DEPRECATED_H
|
||||
# define OSSL_INTERNAL_DEPRECATED_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/configuration.h>
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_DSO_H
|
||||
# define OSSL_INTERNAL_DSO_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/crypto.h>
|
||||
# include "internal/dsoerr.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#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
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_ERR_H
|
||||
# define OSSL_INTERNAL_ERR_H
|
||||
# pragma once
|
||||
|
||||
void err_free_strings_int(void);
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_FFC_H
|
||||
# define OSSL_INTERNAL_FFC_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/bn.h>
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#ifndef HEADER_INTERNAL_KTLS
|
||||
# define HEADER_INTERNAL_KTLS
|
||||
# pragma once
|
||||
|
||||
# ifndef OPENSSL_NO_KTLS
|
||||
|
||||
# if defined(__FreeBSD__)
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_NELEM_H
|
||||
# define OSSL_INTERNAL_NELEM_H
|
||||
# pragma once
|
||||
|
||||
# define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_NUMBERS_H
|
||||
# define OSSL_INTERNAL_NUMBERS_H
|
||||
# pragma once
|
||||
|
||||
# include <limits.h>
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_O_DIR_H
|
||||
# define OSSL_INTERNAL_O_DIR_H
|
||||
# pragma once
|
||||
|
||||
typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_PACKET_H
|
||||
# define OSSL_INTERNAL_PACKET_H
|
||||
# pragma once
|
||||
|
||||
# include <string.h>
|
||||
# include <openssl/bn.h>
|
||||
|
@ -7,8 +7,12 @@
|
||||
* 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);
|
||||
@ -27,3 +31,5 @@ int ossl_param_build_set_bn_pad(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
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 */
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_PASSPHRASE_H
|
||||
# define OSSL_INTERNAL_PASSPHRASE_H
|
||||
# pragma once
|
||||
|
||||
/*
|
||||
* This is a passphrase reader bridge with bells and whistles.
|
||||
|
@ -10,8 +10,9 @@
|
||||
|
||||
#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;
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_PROVIDER_H
|
||||
# define OSSL_INTERNAL_PROVIDER_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/core_dispatch.h>
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
#ifndef OSSL_INTERNAL_REFCOUNT_H
|
||||
# define OSSL_INTERNAL_REFCOUNT_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
/* 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>
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#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
|
||||
|
@ -11,6 +11,7 @@
|
||||
/* 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>
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#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
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_SSLCONF_H
|
||||
# define OSSL_INTERNAL_SSLCONF_H
|
||||
# pragma once
|
||||
|
||||
typedef struct ssl_conf_cmd_st SSL_CONF_CMD;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#ifndef OSSL_INTERNAL_SYMHACKS_H
|
||||
# define OSSL_INTERNAL_SYMHACKS_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
|
@ -7,7 +7,11 @@
|
||||
* 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
|
||||
@ -15,7 +19,7 @@
|
||||
* 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
|
||||
@ -30,7 +34,7 @@
|
||||
* 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) \
|
||||
@ -43,7 +47,7 @@
|
||||
* 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);
|
||||
|
||||
@ -62,7 +66,7 @@
|
||||
* 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) \
|
||||
@ -103,7 +107,7 @@
|
||||
* 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) \
|
||||
{ \
|
||||
@ -122,7 +126,7 @@
|
||||
*
|
||||
* (*) 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)
|
||||
|
||||
/*
|
||||
@ -140,7 +144,8 @@
|
||||
*
|
||||
* (*) 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 */
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#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
|
||||
|
Loading…
x
Reference in New Issue
Block a user