[openssl] OpenSSL_1_1_1-stable update
matthias.st.pierre at ncp-e.com
matthias.st.pierre at ncp-e.com
Sat Sep 28 18:37:56 UTC 2019
The branch OpenSSL_1_1_1-stable has been updated
via ea21f6f88e4699d231f7ef51eb774f343b39d6ab (commit)
via fbbfd128c9aa884216ace8c63be9071b3b690bee (commit)
via b5acbf914833a83368e51766de4cf2e2074a9436 (commit)
via 0c994d54afbb734ed744330d4b03a653a8477fe3 (commit)
from 61df2198e20ca47a4e8418c5bc47a362fd491ea3 (commit)
- Log -----------------------------------------------------------------
commit ea21f6f88e4699d231f7ef51eb774f343b39d6ab
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Fri Sep 27 23:58:12 2019 +0200
Add util/fix-includes script
This script contains all adjustments to header files which were made
during the reorganization of the header files. It is meant as an aid
for other contributors which encounter preprocessor #include errors
after rebasing over this pull request. Simply running
util/fix-includes
from the root of the source directory should hopefully fix the problem.
Note: such #include errors are expected only for pull requests which
add a lot of new code, in particular new compilation modules.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9681)
commit fbbfd128c9aa884216ace8c63be9071b3b690bee
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Fri Sep 27 23:58:12 2019 +0200
Fix header file include guard names
Make the include guards consistent by renaming them systematically according
to the naming conventions below
The public header files (in the 'include/openssl' directory) are not changed
in 1.1.1, because it is a stable release.
For the private header files files, the guard names try to match the path
specified in the include directives, with all letters converted to upper case
and '/' and '.' replaced by '_'. An extra 'OSSL_' is added as prefix.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9681)
commit b5acbf914833a83368e51766de4cf2e2074a9436
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Fri Sep 27 23:58:06 2019 +0200
Reorganize local header files
Apart from public and internal header files, there is a third type called
local header files, which are located next to source files in the source
directory. Currently, they have different suffixes like
'*_lcl.h', '*_local.h', or '*_int.h'
This commit changes the different suffixes to '*_local.h' uniformly.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9681)
commit 0c994d54afbb734ed744330d4b03a653a8477fe3
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Fri Sep 27 23:57:58 2019 +0200
Reorganize private crypto header files
Currently, there are two different directories which contain internal
header files of libcrypto which are meant to be shared internally:
While header files in 'include/internal' are intended to be shared
between libcrypto and libssl, the files in 'crypto/include/internal'
are intended to be shared inside libcrypto only.
To make things complicated, the include search path is set up in such
a way that the directive #include "internal/file.h" could refer to
a file in either of these two directoroes. This makes it necessary
in some cases to add a '_int.h' suffix to some files to resolve this
ambiguity:
#include "internal/file.h" # located in 'include/internal'
#include "internal/file_int.h" # located in 'crypto/include/internal'
This commit moves the private crypto headers from
'crypto/include/internal' to 'include/crypto'
As a result, the include directives become unambiguous
#include "internal/file.h" # located in 'include/internal'
#include "crypto/file.h" # located in 'include/crypto'
hence the superfluous '_int.h' suffixes can be stripped.
The files 'store_int.h' and 'store.h' need to be treated specially;
they are joined into a single file.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9681)
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 2 +-
Configurations/10-main.conf | 2 +-
apps/apps.h | 4 ++--
apps/timeouts.h | 6 +++---
apps/vms_term_sock.h | 4 ++--
build.info | 14 +++++++-------
crypto/aes/aes_core.c | 2 +-
crypto/aes/aes_ecb.c | 2 +-
crypto/aes/aes_ige.c | 2 +-
crypto/aes/{aes_locl.h => aes_local.h} | 6 +++---
crypto/aes/aes_misc.c | 2 +-
crypto/aes/aes_x86core.c | 2 +-
crypto/aria/aria.c | 2 +-
crypto/arm_arch.h | 4 ++--
crypto/asn1/a_bitstr.c | 2 +-
crypto/asn1/a_d2i_fp.c | 2 +-
crypto/asn1/a_gentm.c | 2 +-
crypto/asn1/a_int.c | 2 +-
crypto/asn1/a_mbstr.c | 2 +-
crypto/asn1/a_object.c | 6 +++---
crypto/asn1/a_print.c | 2 +-
crypto/asn1/a_sign.c | 4 ++--
crypto/asn1/a_strex.c | 2 +-
crypto/asn1/a_time.c | 4 ++--
crypto/asn1/a_type.c | 2 +-
crypto/asn1/a_utctm.c | 2 +-
crypto/asn1/a_verify.c | 4 ++--
crypto/asn1/ameth_lib.c | 4 ++--
crypto/asn1/asn1_lib.c | 2 +-
crypto/asn1/{asn1_locl.h => asn1_local.h} | 0
crypto/asn1/asn_mime.c | 6 +++---
crypto/asn1/asn_moid.c | 6 +++---
crypto/asn1/d2i_pr.c | 4 ++--
crypto/asn1/d2i_pu.c | 2 +-
crypto/asn1/f_int.c | 2 +-
crypto/asn1/f_string.c | 2 +-
crypto/asn1/i2d_pr.c | 4 ++--
crypto/asn1/p8_pkey.c | 2 +-
crypto/asn1/t_pkey.c | 2 +-
crypto/asn1/tasn_dec.c | 2 +-
crypto/asn1/tasn_enc.c | 4 ++--
crypto/asn1/tasn_fre.c | 2 +-
crypto/asn1/tasn_new.c | 2 +-
crypto/asn1/tasn_prn.c | 4 ++--
crypto/asn1/tasn_scn.c | 2 +-
crypto/asn1/tasn_utl.c | 2 +-
crypto/asn1/x_algor.c | 2 +-
crypto/asn1/x_int64.c | 2 +-
crypto/asn1/x_sig.c | 2 +-
crypto/async/arch/async_null.c | 2 +-
crypto/async/arch/async_posix.c | 2 +-
crypto/async/arch/async_posix.h | 6 +++---
crypto/async/arch/async_win.c | 2 +-
crypto/async/async.c | 4 ++--
crypto/async/{async_locl.h => async_local.h} | 2 +-
crypto/async/async_wait.c | 2 +-
crypto/bf/bf_cfb64.c | 2 +-
crypto/bf/bf_ecb.c | 2 +-
crypto/bf/bf_enc.c | 2 +-
crypto/bf/{bf_locl.h => bf_local.h} | 4 ++--
crypto/bf/bf_ofb64.c | 2 +-
crypto/bf/bf_skey.c | 2 +-
crypto/bio/b_addr.c | 6 +++---
crypto/bio/b_dump.c | 2 +-
crypto/bio/b_print.c | 2 +-
crypto/bio/b_sock.c | 2 +-
crypto/bio/b_sock2.c | 2 +-
crypto/bio/bf_buff.c | 2 +-
crypto/bio/bf_lbuf.c | 2 +-
crypto/bio/bf_nbio.c | 2 +-
crypto/bio/bf_null.c | 2 +-
crypto/bio/bio_cb.c | 2 +-
crypto/bio/bio_lib.c | 2 +-
crypto/bio/{bio_lcl.h => bio_local.h} | 6 +++---
crypto/bio/bio_meth.c | 2 +-
crypto/bio/bss_acpt.c | 2 +-
crypto/bio/bss_bio.c | 2 +-
crypto/bio/bss_conn.c | 2 +-
crypto/bio/bss_dgram.c | 2 +-
crypto/bio/bss_fd.c | 2 +-
crypto/bio/bss_file.c | 2 +-
crypto/bio/bss_log.c | 2 +-
crypto/bio/bss_mem.c | 2 +-
crypto/bio/bss_null.c | 2 +-
crypto/bio/bss_sock.c | 2 +-
crypto/blake2/{blake2_locl.h => blake2_local.h} | 0
crypto/blake2/blake2b.c | 2 +-
crypto/blake2/blake2s.c | 2 +-
crypto/blake2/m_blake2b.c | 4 ++--
crypto/blake2/m_blake2s.c | 4 ++--
crypto/bn/README.pod | 2 +-
crypto/bn/asm/x86_64-gcc.c | 2 +-
crypto/bn/bn_add.c | 2 +-
crypto/bn/bn_asm.c | 2 +-
crypto/bn/bn_blind.c | 2 +-
crypto/bn/bn_ctx.c | 2 +-
crypto/bn/bn_depr.c | 2 +-
crypto/bn/bn_dh.c | 4 ++--
crypto/bn/bn_div.c | 2 +-
crypto/bn/bn_exp.c | 4 ++--
crypto/bn/bn_exp2.c | 2 +-
crypto/bn/bn_gcd.c | 2 +-
crypto/bn/bn_gf2m.c | 2 +-
crypto/bn/bn_intern.c | 2 +-
crypto/bn/bn_kron.c | 2 +-
crypto/bn/bn_lib.c | 4 ++--
crypto/bn/{bn_lcl.h => bn_local.h} | 8 ++++----
crypto/bn/bn_mod.c | 2 +-
crypto/bn/bn_mont.c | 2 +-
crypto/bn/bn_mpi.c | 2 +-
crypto/bn/bn_mul.c | 2 +-
crypto/bn/bn_nist.c | 2 +-
crypto/bn/bn_prime.c | 2 +-
crypto/bn/bn_print.c | 4 ++--
crypto/bn/bn_rand.c | 2 +-
crypto/bn/bn_recp.c | 2 +-
crypto/bn/bn_shift.c | 2 +-
crypto/bn/bn_sqr.c | 2 +-
crypto/bn/bn_sqrt.c | 2 +-
crypto/bn/bn_srp.c | 4 ++--
crypto/bn/bn_word.c | 2 +-
crypto/bn/bn_x931p.c | 2 +-
crypto/bn/rsaz_exp.h | 4 ++--
crypto/camellia/camellia.c | 2 +-
crypto/camellia/cmll_ecb.c | 2 +-
crypto/camellia/{cmll_locl.h => cmll_local.h} | 6 +++---
crypto/camellia/cmll_misc.c | 2 +-
crypto/cast/c_cfb64.c | 2 +-
crypto/cast/c_ecb.c | 2 +-
crypto/cast/c_enc.c | 2 +-
crypto/cast/c_ofb64.c | 2 +-
crypto/cast/c_skey.c | 2 +-
crypto/cast/{cast_lcl.h => cast_local.h} | 0
crypto/chacha/chacha_enc.c | 2 +-
crypto/cmac/cm_ameth.c | 2 +-
crypto/cmac/cm_pmeth.c | 2 +-
crypto/cms/cms_asn1.c | 2 +-
crypto/cms/cms_att.c | 2 +-
crypto/cms/cms_cd.c | 2 +-
crypto/cms/cms_dd.c | 2 +-
crypto/cms/cms_enc.c | 2 +-
crypto/cms/cms_env.c | 6 +++---
crypto/cms/cms_ess.c | 2 +-
crypto/cms/cms_io.c | 2 +-
crypto/cms/cms_kari.c | 4 ++--
crypto/cms/cms_lib.c | 2 +-
crypto/cms/{cms_lcl.h => cms_local.h} | 4 ++--
crypto/cms/cms_pwri.c | 4 ++--
crypto/cms/cms_sd.c | 6 +++---
crypto/cms/cms_smime.c | 4 ++--
crypto/comp/c_zlib.c | 4 ++--
crypto/comp/comp_lib.c | 2 +-
crypto/comp/{comp_lcl.h => comp_local.h} | 0
crypto/conf/conf_lib.c | 2 +-
crypto/conf/{conf_lcl.h => conf_local.h} | 0
crypto/conf/conf_mall.c | 2 +-
crypto/conf/conf_ssl.c | 2 +-
crypto/cryptlib.c | 4 ++--
crypto/ct/ct_b64.c | 2 +-
crypto/ct/{ct_locl.h => ct_local.h} | 0
crypto/ct/ct_oct.c | 2 +-
crypto/ct/ct_policy.c | 2 +-
crypto/ct/ct_prn.c | 2 +-
crypto/ct/ct_sct.c | 2 +-
crypto/ct/ct_sct_ctx.c | 2 +-
crypto/ct/ct_vfy.c | 2 +-
crypto/ct/ct_x509v3.c | 2 +-
crypto/ctype.c | 2 +-
crypto/des/cbc_cksm.c | 2 +-
crypto/des/cfb64ede.c | 2 +-
crypto/des/cfb64enc.c | 2 +-
crypto/des/cfb_enc.c | 2 +-
crypto/des/des_enc.c | 2 +-
crypto/des/{des_locl.h => des_local.h} | 4 ++--
crypto/des/ecb3_enc.c | 2 +-
crypto/des/ecb_enc.c | 2 +-
crypto/des/fcrypt.c | 2 +-
crypto/des/fcrypt_b.c | 2 +-
crypto/des/ncbc_enc.c | 2 +-
crypto/des/ofb64ede.c | 2 +-
crypto/des/ofb64enc.c | 2 +-
crypto/des/ofb_enc.c | 2 +-
crypto/des/pcbc_enc.c | 2 +-
crypto/des/qud_cksm.c | 2 +-
crypto/des/set_key.c | 2 +-
crypto/des/str2key.c | 2 +-
crypto/des/xcbc_enc.c | 2 +-
crypto/dh/dh_ameth.c | 6 +++---
crypto/dh/dh_asn1.c | 2 +-
crypto/dh/dh_check.c | 2 +-
crypto/dh/dh_gen.c | 2 +-
crypto/dh/dh_key.c | 4 ++--
crypto/dh/dh_lib.c | 2 +-
crypto/dh/{dh_locl.h => dh_local.h} | 0
crypto/dh/dh_meth.c | 2 +-
crypto/dh/dh_pmeth.c | 4 ++--
crypto/dh/dh_rfc5114.c | 4 ++--
crypto/dh/dh_rfc7919.c | 4 ++--
crypto/dllmain.c | 2 +-
crypto/dsa/dsa_ameth.c | 6 +++---
crypto/dsa/dsa_asn1.c | 2 +-
crypto/dsa/dsa_gen.c | 2 +-
crypto/dsa/dsa_key.c | 2 +-
crypto/dsa/dsa_lib.c | 2 +-
crypto/dsa/{dsa_locl.h => dsa_local.h} | 0
crypto/dsa/dsa_meth.c | 2 +-
crypto/dsa/dsa_ossl.c | 4 ++--
crypto/dsa/dsa_pmeth.c | 4 ++--
crypto/dsa/dsa_sign.c | 2 +-
crypto/dsa/dsa_vrf.c | 2 +-
crypto/dso/dso_dl.c | 2 +-
crypto/dso/dso_dlfcn.c | 2 +-
crypto/dso/dso_lib.c | 2 +-
crypto/dso/{dso_locl.h => dso_local.h} | 2 +-
crypto/dso/dso_openssl.c | 2 +-
crypto/dso/dso_vms.c | 2 +-
crypto/dso/dso_win32.c | 2 +-
crypto/ec/curve25519.c | 2 +-
crypto/ec/curve448/arch_32/arch_intrinsics.h | 8 ++++----
crypto/ec/curve448/arch_32/f_impl.h | 6 +++---
crypto/ec/curve448/curve448.c | 2 +-
.../ec/curve448/{curve448_lcl.h => curve448_local.h} | 6 +++---
crypto/ec/curve448/curve448utils.h | 4 ++--
crypto/ec/curve448/ed448.h | 6 +++---
crypto/ec/curve448/eddsa.c | 2 +-
crypto/ec/curve448/field.h | 8 ++++----
crypto/ec/curve448/point_448.h | 6 +++---
crypto/ec/curve448/word.h | 6 +++---
crypto/ec/ec2_oct.c | 2 +-
crypto/ec/ec2_smpl.c | 4 ++--
crypto/ec/ec_ameth.c | 6 +++---
crypto/ec/ec_asn1.c | 2 +-
crypto/ec/ec_check.c | 2 +-
crypto/ec/ec_curve.c | 2 +-
crypto/ec/ec_cvt.c | 2 +-
crypto/ec/ec_key.c | 2 +-
crypto/ec/ec_kmeth.c | 2 +-
crypto/ec/ec_lib.c | 2 +-
crypto/ec/{ec_lcl.h => ec_local.h} | 2 +-
crypto/ec/ec_mult.c | 4 ++--
crypto/ec/ec_oct.c | 2 +-
crypto/ec/ec_pmeth.c | 4 ++--
crypto/ec/ec_print.c | 2 +-
crypto/ec/ecdh_kdf.c | 2 +-
crypto/ec/ecdh_ossl.c | 2 +-
crypto/ec/ecdsa_ossl.c | 4 ++--
crypto/ec/ecdsa_sign.c | 2 +-
crypto/ec/ecdsa_vrf.c | 2 +-
crypto/ec/ecp_mont.c | 2 +-
crypto/ec/ecp_nist.c | 2 +-
crypto/ec/ecp_nistp224.c | 2 +-
crypto/ec/ecp_nistp256.c | 2 +-
crypto/ec/ecp_nistp521.c | 2 +-
crypto/ec/ecp_nistputil.c | 2 +-
crypto/ec/ecp_nistz256.c | 4 ++--
crypto/ec/ecp_oct.c | 2 +-
crypto/ec/ecp_smpl.c | 2 +-
crypto/ec/ecx_meth.c | 8 ++++----
crypto/engine/README | 2 +-
crypto/engine/eng_all.c | 2 +-
crypto/engine/eng_cnf.c | 2 +-
crypto/engine/eng_ctrl.c | 2 +-
crypto/engine/eng_devcrypto.c | 2 +-
crypto/engine/eng_dyn.c | 2 +-
crypto/engine/eng_fat.c | 2 +-
crypto/engine/eng_init.c | 2 +-
crypto/engine/eng_lib.c | 2 +-
crypto/engine/eng_list.c | 2 +-
crypto/engine/{eng_int.h => eng_local.h} | 8 ++++----
crypto/engine/eng_openssl.c | 2 +-
crypto/engine/eng_pkey.c | 2 +-
crypto/engine/eng_rdrand.c | 2 +-
crypto/engine/eng_table.c | 6 +++---
crypto/engine/tb_asnmth.c | 4 ++--
crypto/engine/tb_cipher.c | 2 +-
crypto/engine/tb_dh.c | 2 +-
crypto/engine/tb_digest.c | 2 +-
crypto/engine/tb_dsa.c | 2 +-
crypto/engine/tb_eckey.c | 2 +-
crypto/engine/tb_pkmeth.c | 2 +-
crypto/engine/tb_rand.c | 2 +-
crypto/engine/tb_rsa.c | 2 +-
crypto/err/err.c | 8 ++++----
crypto/err/err_all.c | 2 +-
crypto/err/openssl.ec | 10 +++++-----
crypto/evp/bio_md.c | 4 ++--
crypto/evp/bio_ok.c | 2 +-
crypto/evp/c_allc.c | 2 +-
crypto/evp/c_alld.c | 2 +-
crypto/evp/cmeth_lib.c | 4 ++--
crypto/evp/digest.c | 4 ++--
crypto/evp/e_aes.c | 6 +++---
crypto/evp/e_aes_cbc_hmac_sha1.c | 6 +++---
crypto/evp/e_aes_cbc_hmac_sha256.c | 6 +++---
crypto/evp/e_aria.c | 8 ++++----
crypto/evp/e_bf.c | 2 +-
crypto/evp/e_camellia.c | 4 ++--
crypto/evp/e_cast.c | 2 +-
crypto/evp/e_chacha20_poly1305.c | 8 ++++----
crypto/evp/e_des.c | 2 +-
crypto/evp/e_des3.c | 4 ++--
crypto/evp/e_idea.c | 2 +-
crypto/evp/e_null.c | 2 +-
crypto/evp/e_rc2.c | 2 +-
crypto/evp/e_rc4.c | 2 +-
crypto/evp/e_rc4_hmac_md5.c | 2 +-
crypto/evp/e_rc5.c | 4 ++--
crypto/evp/e_seed.c | 2 +-
crypto/evp/e_sm4.c | 4 ++--
crypto/evp/e_xcbc_d.c | 2 +-
crypto/evp/encode.c | 4 ++--
crypto/evp/evp_enc.c | 4 ++--
crypto/evp/evp_lib.c | 4 ++--
crypto/evp/{evp_locl.h => evp_local.h} | 0
crypto/evp/evp_pbe.c | 2 +-
crypto/evp/evp_pkey.c | 6 +++---
crypto/evp/m_md2.c | 2 +-
crypto/evp/m_md4.c | 2 +-
crypto/evp/m_md5.c | 2 +-
crypto/evp/m_md5_sha1.c | 2 +-
crypto/evp/m_mdc2.c | 2 +-
crypto/evp/m_null.c | 2 +-
crypto/evp/m_ripemd.c | 2 +-
crypto/evp/m_sha1.c | 4 ++--
crypto/evp/m_sha3.c | 4 ++--
crypto/evp/m_sigver.c | 4 ++--
crypto/evp/m_wp.c | 2 +-
crypto/evp/names.c | 4 ++--
crypto/evp/p5_crpt2.c | 2 +-
crypto/evp/p_lib.c | 4 ++--
crypto/evp/p_sign.c | 2 +-
crypto/evp/p_verify.c | 2 +-
crypto/evp/pmeth_fn.c | 2 +-
crypto/evp/pmeth_gn.c | 6 +++---
crypto/evp/pmeth_lib.c | 4 ++--
crypto/ex_data.c | 2 +-
crypto/hmac/hm_ameth.c | 4 ++--
crypto/hmac/hm_pmeth.c | 2 +-
crypto/hmac/hmac.c | 2 +-
crypto/hmac/{hmac_lcl.h => hmac_local.h} | 4 ++--
crypto/idea/i_cbc.c | 2 +-
crypto/idea/i_cfb64.c | 2 +-
crypto/idea/i_ecb.c | 2 +-
crypto/idea/i_ofb64.c | 2 +-
crypto/idea/i_skey.c | 2 +-
crypto/idea/{idea_lcl.h => idea_local.h} | 0
crypto/include/internal/store.h | 10 ----------
crypto/init.c | 18 +++++++++---------
crypto/kdf/hkdf.c | 2 +-
crypto/kdf/scrypt.c | 2 +-
crypto/kdf/tls1_prf.c | 2 +-
crypto/lhash/lh_stats.c | 2 +-
crypto/lhash/lhash.c | 6 +++---
crypto/lhash/{lhash_lcl.h => lhash_local.h} | 0
crypto/md4/md4_dgst.c | 4 ++--
crypto/md4/{md4_locl.h => md4_local.h} | 2 +-
crypto/md5/md5_dgst.c | 4 ++--
crypto/md5/{md5_locl.h => md5_local.h} | 2 +-
crypto/mem.c | 2 +-
crypto/mips_arch.h | 4 ++--
crypto/modes/cbc128.c | 2 +-
crypto/modes/ccm128.c | 2 +-
crypto/modes/cfb128.c | 2 +-
crypto/modes/ctr128.c | 2 +-
crypto/modes/cts128.c | 2 +-
crypto/modes/gcm128.c | 2 +-
crypto/modes/{modes_lcl.h => modes_local.h} | 0
crypto/modes/ocb128.c | 2 +-
crypto/modes/ofb128.c | 2 +-
crypto/modes/xts128.c | 2 +-
crypto/objects/o_names.c | 4 ++--
crypto/objects/obj_dat.c | 8 ++++----
crypto/objects/obj_lib.c | 2 +-
crypto/objects/{obj_lcl.h => obj_local.h} | 0
crypto/ocsp/ocsp_asn.c | 2 +-
crypto/ocsp/ocsp_cl.c | 2 +-
crypto/ocsp/ocsp_ext.c | 2 +-
crypto/ocsp/ocsp_ht.c | 2 +-
crypto/ocsp/ocsp_lib.c | 2 +-
crypto/ocsp/{ocsp_lcl.h => ocsp_local.h} | 0
crypto/ocsp/ocsp_prn.c | 2 +-
crypto/ocsp/ocsp_srv.c | 2 +-
crypto/ocsp/ocsp_vfy.c | 2 +-
crypto/ocsp/v3_ocsp.c | 2 +-
crypto/pem/pem_lib.c | 4 ++--
crypto/pem/pem_pkey.c | 4 ++--
crypto/pkcs12/p12_add.c | 2 +-
crypto/pkcs12/p12_asn.c | 2 +-
crypto/pkcs12/p12_attr.c | 2 +-
crypto/pkcs12/p12_crt.c | 2 +-
crypto/pkcs12/p12_init.c | 2 +-
crypto/pkcs12/{p12_lcl.h => p12_local.h} | 0
crypto/pkcs12/p12_mutl.c | 2 +-
crypto/pkcs12/p12_npas.c | 2 +-
crypto/pkcs12/p12_p8e.c | 2 +-
crypto/pkcs12/p12_sbag.c | 2 +-
crypto/pkcs7/pk7_lib.c | 4 ++--
crypto/poly1305/poly1305.c | 4 ++--
crypto/poly1305/poly1305_ameth.c | 6 +++---
crypto/poly1305/poly1305_pmeth.c | 4 ++--
crypto/ppc_arch.h | 4 ++--
crypto/ppccap.c | 4 ++--
crypto/rand/drbg_ctr.c | 2 +-
crypto/rand/drbg_lib.c | 6 +++---
crypto/rand/rand_lib.c | 4 ++--
crypto/rand/{rand_lcl.h => rand_local.h} | 4 ++--
crypto/rand/rand_unix.c | 4 ++--
crypto/rand/rand_vms.c | 4 ++--
crypto/rand/rand_win.c | 4 ++--
crypto/rc2/rc2_cbc.c | 2 +-
crypto/rc2/rc2_ecb.c | 2 +-
crypto/rc2/{rc2_locl.h => rc2_local.h} | 0
crypto/rc2/rc2_skey.c | 2 +-
crypto/rc2/rc2cfb64.c | 2 +-
crypto/rc2/rc2ofb64.c | 2 +-
crypto/rc4/rc4_enc.c | 2 +-
crypto/rc4/{rc4_locl.h => rc4_local.h} | 4 ++--
crypto/rc4/rc4_skey.c | 2 +-
crypto/rc5/rc5_ecb.c | 2 +-
crypto/rc5/rc5_enc.c | 2 +-
crypto/rc5/{rc5_locl.h => rc5_local.h} | 0
crypto/rc5/rc5_skey.c | 2 +-
crypto/rc5/rc5cfb64.c | 2 +-
crypto/rc5/rc5ofb64.c | 2 +-
crypto/ripemd/rmd_dgst.c | 4 ++--
crypto/ripemd/{rmd_locl.h => rmd_local.h} | 4 ++--
crypto/rsa/rsa_ameth.c | 6 +++---
crypto/rsa/rsa_asn1.c | 2 +-
crypto/rsa/rsa_chk.c | 2 +-
crypto/rsa/rsa_crpt.c | 4 ++--
crypto/rsa/rsa_gen.c | 2 +-
crypto/rsa/rsa_lib.c | 6 +++---
crypto/rsa/{rsa_locl.h => rsa_local.h} | 0
crypto/rsa/rsa_meth.c | 2 +-
crypto/rsa/rsa_mp.c | 2 +-
crypto/rsa/rsa_oaep.c | 4 ++--
crypto/rsa/rsa_ossl.c | 6 +++---
crypto/rsa/rsa_pk1.c | 2 +-
crypto/rsa/rsa_pmeth.c | 6 +++---
crypto/rsa/rsa_pss.c | 2 +-
crypto/rsa/rsa_sign.c | 4 ++--
crypto/rsa/rsa_ssl.c | 2 +-
crypto/rsa/rsa_x931g.c | 2 +-
crypto/s390x_arch.h | 4 ++--
crypto/seed/seed.c | 2 +-
crypto/seed/{seed_locl.h => seed_local.h} | 6 +++---
crypto/sha/sha1dgst.c | 2 +-
crypto/sha/sha256.c | 2 +-
crypto/sha/sha512.c | 2 +-
crypto/sha/{sha_locl.h => sha_local.h} | 2 +-
crypto/siphash/siphash.c | 2 +-
crypto/siphash/siphash_ameth.c | 6 +++---
crypto/siphash/siphash_pmeth.c | 4 ++--
crypto/sm2/sm2_crypt.c | 6 +++---
crypto/sm2/sm2_err.c | 2 +-
crypto/sm2/sm2_pmeth.c | 6 +++---
crypto/sm2/sm2_sign.c | 6 +++---
crypto/sm3/m_sm3.c | 4 ++--
crypto/sm3/sm3.c | 2 +-
crypto/sm3/{sm3_locl.h => sm3_local.h} | 4 ++--
crypto/sm4/sm4.c | 2 +-
crypto/sparc_arch.h | 6 +++---
crypto/srp/srp_lib.c | 2 +-
crypto/srp/srp_vfy.c | 2 +-
crypto/store/loader_file.c | 8 ++++----
crypto/store/store_init.c | 4 ++--
crypto/store/store_lib.c | 4 ++--
crypto/store/{store_locl.h => store_local.h} | 0
crypto/store/store_register.c | 4 ++--
crypto/ts/ts_asn1.c | 2 +-
crypto/ts/ts_lib.c | 2 +-
crypto/ts/{ts_lcl.h => ts_local.h} | 0
crypto/ts/ts_req_print.c | 2 +-
crypto/ts/ts_req_utils.c | 2 +-
crypto/ts/ts_rsp_print.c | 2 +-
crypto/ts/ts_rsp_sign.c | 2 +-
crypto/ts/ts_rsp_utils.c | 2 +-
crypto/ts/ts_rsp_verify.c | 2 +-
crypto/ts/ts_verify_ctx.c | 2 +-
crypto/ui/ui_lib.c | 2 +-
crypto/ui/{ui_locl.h => ui_local.h} | 4 ++--
crypto/ui/ui_null.c | 2 +-
crypto/ui/ui_openssl.c | 2 +-
crypto/ui/ui_util.c | 2 +-
crypto/whrlpool/wp_block.c | 2 +-
crypto/whrlpool/wp_dgst.c | 2 +-
crypto/whrlpool/{wp_locl.h => wp_local.h} | 0
crypto/x509/by_dir.c | 4 ++--
crypto/x509/by_file.c | 2 +-
crypto/x509/t_x509.c | 2 +-
crypto/x509/x509_att.c | 2 +-
crypto/x509/x509_cmp.c | 2 +-
crypto/x509/x509_ext.c | 2 +-
crypto/x509/{x509_lcl.h => x509_local.h} | 0
crypto/x509/x509_lu.c | 4 ++--
crypto/x509/x509_meth.c | 2 +-
crypto/x509/x509_obj.c | 2 +-
crypto/x509/x509_r2x.c | 2 +-
crypto/x509/x509_req.c | 2 +-
crypto/x509/x509_set.c | 6 +++---
crypto/x509/x509_trs.c | 2 +-
crypto/x509/x509_v3.c | 2 +-
crypto/x509/x509_vfy.c | 6 +++---
crypto/x509/x509_vpm.c | 4 ++--
crypto/x509/x509cset.c | 2 +-
crypto/x509/x509name.c | 2 +-
crypto/x509/x509rset.c | 2 +-
crypto/x509/x_all.c | 2 +-
crypto/x509/x_attrib.c | 2 +-
crypto/x509/x_crl.c | 4 ++--
crypto/x509/x_exten.c | 2 +-
crypto/x509/x_name.c | 8 ++++----
crypto/x509/x_pubkey.c | 6 +++---
crypto/x509/x_req.c | 2 +-
crypto/x509/x_x509.c | 2 +-
crypto/x509/x_x509a.c | 2 +-
crypto/x509v3/pcy_cache.c | 4 ++--
crypto/x509v3/pcy_data.c | 2 +-
crypto/x509v3/pcy_lib.c | 2 +-
crypto/x509v3/{pcy_int.h => pcy_local.h} | 0
crypto/x509v3/pcy_map.c | 4 ++--
crypto/x509v3/pcy_node.c | 2 +-
crypto/x509v3/pcy_tree.c | 2 +-
crypto/x509v3/v3_addr.c | 2 +-
crypto/x509v3/v3_admis.h | 4 ++--
crypto/x509v3/v3_asid.c | 2 +-
crypto/x509v3/v3_conf.c | 4 ++--
crypto/x509v3/v3_cpols.c | 2 +-
crypto/x509v3/v3_crld.c | 2 +-
crypto/x509v3/v3_ncons.c | 4 ++--
crypto/x509v3/v3_purp.c | 2 +-
crypto/x509v3/v3_skey.c | 2 +-
crypto/x509v3/v3_utl.c | 4 ++--
e_os.h | 4 ++--
engines/e_afalg.h | 4 ++--
engines/e_afalg_err.h | 4 ++--
engines/e_capi_err.h | 4 ++--
engines/e_dasync_err.h | 4 ++--
engines/e_ossltest_err.h | 4 ++--
.../crypto}/__DECC_INCLUDE_EPILOGUE.H | 0
.../crypto}/__DECC_INCLUDE_PROLOGUE.H | 0
{crypto/include/internal => include/crypto}/aria.h | 4 ++--
.../internal/asn1_int.h => include/crypto/asn1.h | 0
{crypto/include/internal => include/crypto}/async.h | 0
.../include/internal/bn_int.h => include/crypto/bn.h | 4 ++--
.../include/internal => include/crypto}/bn_conf.h.in | 4 ++--
{crypto/include/internal => include/crypto}/bn_dh.h | 0
{crypto/include/internal => include/crypto}/bn_srp.h | 0
{crypto/include/internal => include/crypto}/chacha.h | 4 ++--
.../cryptlib_int.h => include/crypto/cryptlib.h | 0
{crypto/include/internal => include/crypto}/ctype.h | 4 ++--
.../include/internal => include/crypto}/dso_conf.h.in | 4 ++--
.../include/internal/ec_int.h => include/crypto/ec.h | 4 ++--
{crypto/include/internal => include/crypto}/engine.h | 0
.../internal/err_int.h => include/crypto/err.h | 4 ++--
.../internal/evp_int.h => include/crypto/evp.h | 0
{crypto/include/internal => include/crypto}/lhash.h | 4 ++--
.../include/internal => include/crypto}/md32_common.h | 0
{crypto/include/internal => include/crypto}/objects.h | 0
.../include/internal => include/crypto}/poly1305.h | 0
.../internal/rand_int.h => include/crypto/rand.h | 4 ++--
{crypto/include/internal => include/crypto}/sha.h | 4 ++--
{crypto/include/internal => include/crypto}/siphash.h | 0
{crypto/include/internal => include/crypto}/sm2.h | 4 ++--
{crypto/include/internal => include/crypto}/sm2err.h | 4 ++--
{crypto/include/internal => include/crypto}/sm3.h | 4 ++--
{crypto/include/internal => include/crypto}/sm4.h | 4 ++--
.../internal/store_int.h => include/crypto/store.h | 8 +++++---
.../internal/x509_int.h => include/crypto/x509.h | 0
include/internal/conf.h | 4 ++--
.../{constant_time_locl.h => constant_time.h} | 6 +++---
include/internal/cryptlib.h | 4 ++--
include/internal/dane.h | 6 +++---
include/internal/dso.h | 4 ++--
include/internal/dsoerr.h | 4 ++--
include/internal/err.h | 4 ++--
include/internal/nelem.h | 4 ++--
include/internal/numbers.h | 4 ++--
include/internal/o_dir.h | 4 ++--
include/internal/o_str.h | 4 ++--
include/internal/refcount.h | 4 ++--
include/internal/sockets.h | 4 ++--
include/internal/sslconf.h | 4 ++--
ssl/bio_ssl.c | 2 +-
ssl/d1_lib.c | 2 +-
ssl/d1_msg.c | 2 +-
ssl/d1_srtp.c | 2 +-
ssl/methods.c | 2 +-
ssl/packet.c | 2 +-
ssl/{packet_locl.h => packet_local.h} | 6 +++---
ssl/pqueue.c | 2 +-
ssl/record/README | 4 ++--
ssl/record/dtls1_bitmap.c | 4 ++--
ssl/record/rec_layer_d1.c | 6 +++---
ssl/record/rec_layer_s3.c | 6 +++---
ssl/record/{record_locl.h => record_local.h} | 0
ssl/record/ssl3_buffer.c | 4 ++--
ssl/record/ssl3_record.c | 6 +++---
ssl/record/ssl3_record_tls13.c | 4 ++--
ssl/s3_cbc.c | 4 ++--
ssl/s3_enc.c | 2 +-
ssl/s3_lib.c | 2 +-
ssl/s3_msg.c | 2 +-
ssl/ssl_asn1.c | 2 +-
ssl/ssl_cert.c | 2 +-
ssl/ssl_ciph.c | 4 ++--
ssl/ssl_conf.c | 2 +-
ssl/ssl_init.c | 2 +-
ssl/ssl_lib.c | 2 +-
ssl/{ssl_locl.h => ssl_local.h} | 6 +++---
ssl/ssl_mcnf.c | 2 +-
ssl/ssl_rsa.c | 4 ++--
ssl/ssl_sess.c | 4 ++--
ssl/ssl_stat.c | 2 +-
ssl/ssl_txt.c | 2 +-
ssl/ssl_utst.c | 2 +-
ssl/statem/README | 2 +-
ssl/statem/extensions.c | 6 +++---
ssl/statem/extensions_clnt.c | 4 ++--
ssl/statem/extensions_cust.c | 4 ++--
ssl/statem/extensions_srvr.c | 4 ++--
ssl/statem/statem.c | 4 ++--
ssl/statem/statem_clnt.c | 4 ++--
ssl/statem/statem_dtls.c | 4 ++--
ssl/statem/statem_lib.c | 4 ++--
ssl/statem/{statem_locl.h => statem_local.h} | 0
ssl/statem/statem_srvr.c | 6 +++---
ssl/t1_enc.c | 2 +-
ssl/t1_lib.c | 2 +-
ssl/t1_trce.c | 2 +-
ssl/tls13_enc.c | 2 +-
ssl/tls_srp.c | 2 +-
test/asn1_internal_test.c | 2 +-
test/asynciotest.c | 2 +-
test/bad_dtls_test.c | 2 +-
test/build.info | 2 +-
test/chacha_internal_test.c | 2 +-
test/cipher_overhead_test.c | 2 +-
test/clienthellotest.c | 2 +-
test/constant_time_test.c | 2 +-
test/ctype_internal_test.c | 2 +-
test/curve448_internal_test.c | 2 +-
test/drbg_cavs_data.h | 4 ++--
test/drbg_cavs_test.c | 2 +-
test/drbgtest.c | 4 ++--
test/dtls_mtu_test.c | 2 +-
test/ec_internal_test.c | 2 +-
test/ecdsatest.h | 6 +++---
test/evp_extra_test.c | 2 +-
test/handshake_helper.c | 2 +-
test/handshake_helper.h | 6 +++---
test/modes_internal_test.c | 2 +-
test/ossl_shim/async_bio.h | 6 +++---
test/ossl_shim/include/openssl/base.h | 6 +++---
test/ossl_shim/packeted_bio.h | 6 +++---
test/ossl_shim/test_config.h | 6 +++---
test/packettest.c | 2 +-
test/poly1305_internal_test.c | 2 +-
test/servername_test.c | 2 +-
test/shlibloadtest.c | 2 +-
test/siphash_internal_test.c | 2 +-
test/sm2_internal_test.c | 2 +-
test/sm4_internal_test.c | 2 +-
test/ssl_cert_table_internal_test.c | 2 +-
test/ssl_test_ctx.h | 6 +++---
test/sslapitest.c | 2 +-
test/sslbuffertest.c | 2 +-
test/ssltestlib.h | 6 +++---
test/testutil.h | 6 +++---
test/testutil/output.h | 6 +++---
test/tls13ccstest.c | 2 +-
test/tls13encryptiontest.c | 4 ++--
test/tls13secretstest.c | 2 +-
test/wpackettest.c | 2 +-
util/fix-includes | 19 +++++++++++++++++++
util/fix-includes.sed | 5 +++++
util/mkerr.pl | 4 ++--
677 files changed, 985 insertions(+), 969 deletions(-)
rename crypto/aes/{aes_locl.h => aes_local.h} (90%)
rename crypto/asn1/{asn1_locl.h => asn1_local.h} (100%)
rename crypto/async/{async_locl.h => async_local.h} (98%)
rename crypto/bf/{bf_locl.h => bf_local.h} (98%)
rename crypto/bio/{bio_lcl.h => bio_local.h} (97%)
rename crypto/blake2/{blake2_locl.h => blake2_local.h} (100%)
rename crypto/bn/{bn_lcl.h => bn_local.h} (99%)
rename crypto/camellia/{cmll_locl.h => cmll_local.h} (91%)
rename crypto/cast/{cast_lcl.h => cast_local.h} (100%)
rename crypto/cms/{cms_lcl.h => cms_local.h} (99%)
rename crypto/comp/{comp_lcl.h => comp_local.h} (100%)
rename crypto/conf/{conf_lcl.h => conf_local.h} (100%)
rename crypto/ct/{ct_locl.h => ct_local.h} (100%)
rename crypto/des/{des_locl.h => des_local.h} (99%)
rename crypto/dh/{dh_locl.h => dh_local.h} (100%)
rename crypto/dsa/{dsa_locl.h => dsa_local.h} (100%)
rename crypto/dso/{dso_locl.h => dso_local.h} (99%)
rename crypto/ec/curve448/{curve448_lcl.h => curve448_local.h} (91%)
rename crypto/ec/{ec_lcl.h => ec_local.h} (99%)
rename crypto/engine/{eng_int.h => eng_local.h} (97%)
rename crypto/evp/{evp_locl.h => evp_local.h} (100%)
rename crypto/hmac/{hmac_lcl.h => hmac_local.h} (90%)
rename crypto/idea/{idea_lcl.h => idea_local.h} (100%)
delete mode 100644 crypto/include/internal/store.h
rename crypto/lhash/{lhash_lcl.h => lhash_local.h} (100%)
rename crypto/md4/{md4_locl.h => md4_local.h} (98%)
rename crypto/md5/{md5_locl.h => md5_local.h} (98%)
rename crypto/modes/{modes_lcl.h => modes_local.h} (100%)
rename crypto/objects/{obj_lcl.h => obj_local.h} (100%)
rename crypto/ocsp/{ocsp_lcl.h => ocsp_local.h} (100%)
rename crypto/pkcs12/{p12_lcl.h => p12_local.h} (100%)
rename crypto/rand/{rand_lcl.h => rand_local.h} (99%)
rename crypto/rc2/{rc2_locl.h => rc2_local.h} (100%)
rename crypto/rc4/{rc4_locl.h => rc4_local.h} (86%)
rename crypto/rc5/{rc5_locl.h => rc5_local.h} (100%)
rename crypto/ripemd/{rmd_locl.h => rmd_local.h} (96%)
rename crypto/rsa/{rsa_locl.h => rsa_local.h} (100%)
rename crypto/seed/{seed_locl.h => seed_local.h} (97%)
rename crypto/sha/{sha_locl.h => sha_local.h} (99%)
rename crypto/sm3/{sm3_locl.h => sm3_local.h} (97%)
rename crypto/store/{store_locl.h => store_local.h} (100%)
rename crypto/ts/{ts_lcl.h => ts_local.h} (100%)
rename crypto/ui/{ui_locl.h => ui_local.h} (98%)
rename crypto/whrlpool/{wp_locl.h => wp_local.h} (100%)
rename crypto/x509/{x509_lcl.h => x509_local.h} (100%)
rename crypto/x509v3/{pcy_int.h => pcy_local.h} (100%)
rename {crypto/include/internal => include/crypto}/__DECC_INCLUDE_EPILOGUE.H (100%)
rename {crypto/include/internal => include/crypto}/__DECC_INCLUDE_PROLOGUE.H (100%)
rename {crypto/include/internal => include/crypto}/aria.h (96%)
rename crypto/include/internal/asn1_int.h => include/crypto/asn1.h (100%)
rename {crypto/include/internal => include/crypto}/async.h (100%)
rename crypto/include/internal/bn_int.h => include/crypto/bn.h (98%)
rename {crypto/include/internal => include/crypto}/bn_conf.h.in (93%)
rename {crypto/include/internal => include/crypto}/bn_dh.h (100%)
rename {crypto/include/internal => include/crypto}/bn_srp.h (100%)
rename {crypto/include/internal => include/crypto}/chacha.h (96%)
rename crypto/include/internal/cryptlib_int.h => include/crypto/cryptlib.h (100%)
rename {crypto/include/internal => include/crypto}/ctype.h (98%)
rename {crypto/include/internal => include/crypto}/dso_conf.h.in (95%)
rename crypto/include/internal/ec_int.h => include/crypto/ec.h (96%)
rename {crypto/include/internal => include/crypto}/engine.h (100%)
rename crypto/include/internal/err_int.h => include/crypto/err.h (90%)
rename crypto/include/internal/evp_int.h => include/crypto/evp.h (100%)
rename {crypto/include/internal => include/crypto}/lhash.h (87%)
rename {crypto/include/internal => include/crypto}/md32_common.h (100%)
rename {crypto/include/internal => include/crypto}/objects.h (100%)
rename {crypto/include/internal => include/crypto}/poly1305.h (100%)
rename crypto/include/internal/rand_int.h => include/crypto/rand.h (98%)
rename {crypto/include/internal => include/crypto}/sha.h (89%)
rename {crypto/include/internal => include/crypto}/siphash.h (100%)
rename {crypto/include/internal => include/crypto}/sm2.h (97%)
rename {crypto/include/internal => include/crypto}/sm2err.h (97%)
rename {crypto/include/internal => include/crypto}/sm3.h (94%)
rename {crypto/include/internal => include/crypto}/sm4.h (94%)
rename crypto/include/internal/store_int.h => include/crypto/store.h (82%)
rename crypto/include/internal/x509_int.h => include/crypto/x509.h (100%)
rename include/internal/{constant_time_locl.h => constant_time.h} (98%)
rename ssl/{packet_locl.h => packet_local.h} (99%)
rename ssl/record/{record_locl.h => record_local.h} (100%)
rename ssl/{ssl_locl.h => ssl_local.h} (99%)
rename ssl/statem/{statem_locl.h => statem_local.h} (100%)
create mode 100755 util/fix-includes
create mode 100644 util/fix-includes.sed
diff --git a/.gitignore b/.gitignore
index 1b0f25cc81..c7e660b6a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,7 +27,7 @@ Makefile
# Auto generated headers
/crypto/buildinf.h
/apps/progs.h
-/crypto/include/internal/*_conf.h
+/include/crypto/*_conf.h
/openssl/include/opensslconf.h
/util/domd
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 3c4299d264..97be7b95a9 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -434,7 +434,7 @@ my %targets = (
# 32-bit message digests. (For the moment of this writing) HP C
# doesn't seem to "digest" too many local variables (they make "him"
# chew forever:-). For more details look-up MD32_XARRAY comment in
-# crypto/sha/sha_lcl.h.
+# crypto/sha/sha_local.h.
# - originally there were 32-bit hpux-parisc2-* targets. They were
# scrapped, because a) they were not interchangeable with other 32-bit
# targets; b) performance-critical 32-bit assembly modules implement
diff --git a/apps/apps.h b/apps/apps.h
index 4a3e1a8857..34c3fd8633 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_APPS_H
-# define HEADER_APPS_H
+#ifndef OSSL_APPS_H
+# define OSSL_APPS_H
# include "e_os.h" /* struct timeval for DTLS */
# include "internal/nelem.h"
diff --git a/apps/timeouts.h b/apps/timeouts.h
index e023b0aa49..7e606cba0b 100644
--- a/apps/timeouts.h
+++ b/apps/timeouts.h
@@ -7,11 +7,11 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef INCLUDED_TIMEOUTS_H
-# define INCLUDED_TIMEOUTS_H
+#ifndef OSSL_APPS_TIMEOUTS_H
+# define OSSL_APPS_TIMEOUTS_H
/* numbers in us */
# define DGRAM_RCV_TIMEOUT 250000
# define DGRAM_SND_TIMEOUT 250000
-#endif /* ! INCLUDED_TIMEOUTS_H */
+#endif /* ! OSSL_APPS_TIMEOUTS_H */
diff --git a/apps/vms_term_sock.h b/apps/vms_term_sock.h
index c4d1702d79..e092b18eaa 100644
--- a/apps/vms_term_sock.h
+++ b/apps/vms_term_sock.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef TERM_SOCK_H
-# define TERM_SOCK_H
+#ifndef OSSL_APPS_VMS_TERM_SOCK_H
+# define OSSL_APPS_VMS_TERM_SOCK_H
/*
** Terminal Socket Function Codes
diff --git a/build.info b/build.info
index 3dda4e89bf..05c9bdd19c 100644
--- a/build.info
+++ b/build.info
@@ -9,20 +9,20 @@
"";
-}
LIBS=libcrypto libssl
-INCLUDE[libcrypto]=. crypto/include include
+INCLUDE[libcrypto]=. include
INCLUDE[libssl]=. include
DEPEND[libssl]=libcrypto
# Empty DEPEND "indices" means the dependencies are expected to be built
# unconditionally before anything else.
-DEPEND[]=include/openssl/opensslconf.h crypto/include/internal/bn_conf.h \
- crypto/include/internal/dso_conf.h
+DEPEND[]=include/openssl/opensslconf.h include/crypto/bn_conf.h \
+ include/crypto/dso_conf.h
DEPEND[include/openssl/opensslconf.h]=configdata.pm
GENERATE[include/openssl/opensslconf.h]=include/openssl/opensslconf.h.in
-DEPEND[crypto/include/internal/bn_conf.h]=configdata.pm
-GENERATE[crypto/include/internal/bn_conf.h]=crypto/include/internal/bn_conf.h.in
-DEPEND[crypto/include/internal/dso_conf.h]=configdata.pm
-GENERATE[crypto/include/internal/dso_conf.h]=crypto/include/internal/dso_conf.h.in
+DEPEND[include/crypto/bn_conf.h]=configdata.pm
+GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in
+DEPEND[include/crypto/dso_conf.h]=configdata.pm
+GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in
IF[{- defined $target{shared_defflag} -}]
IF[{- $config{target} =~ /^mingw/ -}]
diff --git a/crypto/aes/aes_core.c b/crypto/aes/aes_core.c
index f1f11fd8de..e3e688f528 100644
--- a/crypto/aes/aes_core.c
+++ b/crypto/aes/aes_core.c
@@ -41,7 +41,7 @@
#include <stdlib.h>
#include <openssl/crypto.h>
#include <openssl/aes.h>
-#include "aes_locl.h"
+#include "aes_local.h"
#ifndef AES_ASM
/*-
diff --git a/crypto/aes/aes_ecb.c b/crypto/aes/aes_ecb.c
index 29bfc1ad66..4fa360ca8b 100644
--- a/crypto/aes/aes_ecb.c
+++ b/crypto/aes/aes_ecb.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include <openssl/aes.h>
-#include "aes_locl.h"
+#include "aes_local.h"
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc)
diff --git a/crypto/aes/aes_ige.c b/crypto/aes/aes_ige.c
index 75f796cf3b..dce4ef11be 100644
--- a/crypto/aes/aes_ige.c
+++ b/crypto/aes/aes_ige.c
@@ -10,7 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/aes.h>
-#include "aes_locl.h"
+#include "aes_local.h"
#define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long))
typedef struct {
diff --git a/crypto/aes/aes_locl.h b/crypto/aes/aes_local.h
similarity index 90%
rename from crypto/aes/aes_locl.h
rename to crypto/aes/aes_local.h
index adee29df8d..cc8456861d 100644
--- a/crypto/aes/aes_locl.h
+++ b/crypto/aes/aes_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_AES_LOCL_H
-# define HEADER_AES_LOCL_H
+#ifndef OSSL_CRYPTO_AES_LOCAL_H
+# define OSSL_CRYPTO_AES_LOCAL_H
# include <openssl/e_os2.h>
# include <stdio.h>
@@ -39,4 +39,4 @@ typedef unsigned char u8;
/* This controls loop-unrolling in aes_core.c */
# undef FULL_UNROLL
-#endif /* !HEADER_AES_LOCL_H */
+#endif /* !OSSL_CRYPTO_AES_LOCAL_H */
diff --git a/crypto/aes/aes_misc.c b/crypto/aes/aes_misc.c
index 7403c84f82..e0edc72ba7 100644
--- a/crypto/aes/aes_misc.c
+++ b/crypto/aes/aes_misc.c
@@ -9,7 +9,7 @@
#include <openssl/opensslv.h>
#include <openssl/aes.h>
-#include "aes_locl.h"
+#include "aes_local.h"
const char *AES_options(void)
{
diff --git a/crypto/aes/aes_x86core.c b/crypto/aes/aes_x86core.c
index 1b660d716d..50b53abc12 100644
--- a/crypto/aes/aes_x86core.c
+++ b/crypto/aes/aes_x86core.c
@@ -46,7 +46,7 @@
#include <stdlib.h>
#include <openssl/aes.h>
-#include "aes_locl.h"
+#include "aes_local.h"
/*
* These two parameters control which table, 256-byte or 2KB, is
diff --git a/crypto/aria/aria.c b/crypto/aria/aria.c
index 293bcc72bd..ce55d52664 100644
--- a/crypto/aria/aria.c
+++ b/crypto/aria/aria.c
@@ -19,7 +19,7 @@
*/
#include <openssl/e_os2.h>
-#include "internal/aria.h"
+#include "crypto/aria.h"
#include <assert.h>
#include <string.h>
diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h
index f11b543df6..8b7105571d 100644
--- a/crypto/arm_arch.h
+++ b/crypto/arm_arch.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef __ARM_ARCH_H__
-# define __ARM_ARCH_H__
+#ifndef OSSL_CRYPTO_ARM_ARCH_H
+# define OSSL_CRYPTO_ARM_ARCH_H
# if !defined(__ARM_ARCH__)
# if defined(__CC_ARM)
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c
index bffbd160a2..f462dd1073 100644
--- a/crypto/asn1/a_bitstr.c
+++ b/crypto/asn1/a_bitstr.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len)
{
diff --git a/crypto/asn1/a_d2i_fp.c b/crypto/asn1/a_d2i_fp.c
index a1a17901b8..a452b3deba 100644
--- a/crypto/asn1/a_d2i_fp.c
+++ b/crypto/asn1/a_d2i_fp.c
@@ -13,7 +13,7 @@
#include "internal/numbers.h"
#include <openssl/buffer.h>
#include <openssl/asn1.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#ifndef NO_OLD_ASN1
# ifndef OPENSSL_NO_STDIO
diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c
index d3878d6e57..133bbb1581 100644
--- a/crypto/asn1/a_gentm.c
+++ b/crypto/asn1/a_gentm.c
@@ -15,7 +15,7 @@
#include <time.h>
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/* This is the primary function used to parse ASN1_GENERALIZEDTIME */
int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME *d)
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c
index 70a45cb3cc..9c1a9f52b5 100644
--- a/crypto/asn1/a_int.c
+++ b/crypto/asn1/a_int.c
@@ -13,7 +13,7 @@
#include <limits.h>
#include <openssl/asn1.h>
#include <openssl/bn.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x)
{
diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c
index 949fe6c161..bdb697ab30 100644
--- a/crypto/asn1/a_mbstr.c
+++ b/crypto/asn1/a_mbstr.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index 5e1424a806..d67a723c96 100644
--- a/crypto/asn1/a_object.c
+++ b/crypto/asn1/a_object.c
@@ -9,14 +9,14 @@
#include <stdio.h>
#include <limits.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/bn.h>
-#include "internal/asn1_int.h"
-#include "asn1_locl.h"
+#include "crypto/asn1.h"
+#include "asn1_local.h"
int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp)
{
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c
index 8a373d9da9..85a631a27a 100644
--- a/crypto/asn1/a_print.c
+++ b/crypto/asn1/a_print.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c
index 146fdb9626..72381b6655 100644
--- a/crypto/asn1/a_sign.c
+++ b/crypto/asn1/a_sign.c
@@ -18,8 +18,8 @@
#include <openssl/x509.h>
#include <openssl/objects.h>
#include <openssl/buffer.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
#ifndef NO_ASN1_OLD
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c
index ea4dd1c5b1..4879b33785 100644
--- a/crypto/asn1/a_strex.c
+++ b/crypto/asn1/a_strex.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include "internal/cryptlib.h"
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/asn1.h>
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index c36dd95001..54e0de1931 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -16,10 +16,10 @@
#include <stdio.h>
#include <time.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
IMPLEMENT_ASN1_MSTRING(ASN1_TIME, B_ASN1_TIME)
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c
index 732328e050..4a96315df0 100644
--- a/crypto/asn1/a_type.c
+++ b/crypto/asn1/a_type.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/objects.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
int ASN1_TYPE_get(const ASN1_TYPE *a)
{
diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c
index b224991aa3..0ff37b16c5 100644
--- a/crypto/asn1/a_utctm.c
+++ b/crypto/asn1/a_utctm.c
@@ -11,7 +11,7 @@
#include <time.h>
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/* This is the primary function used to parse ASN1_UTCTIME */
int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d)
diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c
index cdaf17c3cb..4b5f54234f 100644
--- a/crypto/asn1/a_verify.c
+++ b/crypto/asn1/a_verify.c
@@ -18,8 +18,8 @@
#include <openssl/objects.h>
#include <openssl/buffer.h>
#include <openssl/evp.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
#ifndef NO_ASN1_OLD
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c
index d7d270dbb5..5e8c3ed1d5 100644
--- a/crypto/asn1/ameth_lib.c
+++ b/crypto/asn1/ameth_lib.c
@@ -13,8 +13,8 @@
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/engine.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
#include "standard_methods.h"
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index 88c4b53918..a7d32ae5e2 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -11,7 +11,7 @@
#include <limits.h>
#include "internal/cryptlib.h"
#include <openssl/asn1.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
long max);
diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_local.h
similarity index 100%
rename from crypto/asn1/asn1_locl.h
rename to crypto/asn1/asn1_local.h
diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c
index dfd5be6347..b8ea51136a 100644
--- a/crypto/asn1/asn_mime.c
+++ b/crypto/asn1/asn_mime.c
@@ -8,15 +8,15 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/rand.h>
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#include "internal/bio.h"
-#include "asn1_locl.h"
+#include "asn1_local.h"
/*
* Generalised MIME like utilities for streaming ASN1. Although many have a
diff --git a/crypto/asn1/asn_moid.c b/crypto/asn1/asn_moid.c
index 68a01f3117..732ce972aa 100644
--- a/crypto/asn1/asn_moid.c
+++ b/crypto/asn1/asn_moid.c
@@ -8,13 +8,13 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include <openssl/conf.h>
#include <openssl/x509.h>
-#include "internal/asn1_int.h"
-#include "internal/objects.h"
+#include "crypto/asn1.h"
+#include "crypto/objects.h"
/* Simple ASN1 OID module: add all objects in a given section */
diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c
index aa0d6ad6ae..6ec0107380 100644
--- a/crypto/asn1/d2i_pr.c
+++ b/crypto/asn1/d2i_pr.c
@@ -15,8 +15,8 @@
#include <openssl/engine.h>
#include <openssl/x509.h>
#include <openssl/asn1.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
long length)
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c
index 7bc16c7bce..8327ac16ca 100644
--- a/crypto/asn1/d2i_pu.c
+++ b/crypto/asn1/d2i_pu.c
@@ -17,7 +17,7 @@
#include <openssl/dsa.h>
#include <openssl/ec.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
long length)
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index 6d6bddc651..3a18381173 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/asn1.h>
diff --git a/crypto/asn1/f_string.c b/crypto/asn1/f_string.c
index f893489a67..53dfec71b5 100644
--- a/crypto/asn1/f_string.c
+++ b/crypto/asn1/f_string.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/asn1.h>
diff --git a/crypto/asn1/i2d_pr.c b/crypto/asn1/i2d_pr.c
index 445b0c8425..0374c0bfbd 100644
--- a/crypto/asn1/i2d_pr.c
+++ b/crypto/asn1/i2d_pr.c
@@ -11,8 +11,8 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
{
diff --git a/crypto/asn1/p8_pkey.c b/crypto/asn1/p8_pkey.c
index dbee827e0d..ab509b1ac9 100644
--- a/crypto/asn1/p8_pkey.c
+++ b/crypto/asn1/p8_pkey.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
/* Minor tweak to operation: zero private key data */
static int pkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c
index 3b2c9df891..651622aedc 100644
--- a/crypto/asn1/t_pkey.c
+++ b/crypto/asn1/t_pkey.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
-#include "internal/bn_int.h"
+#include "crypto/bn.h"
/* Number of octets per line */
#define ASN1_BUF_PRINT_WIDTH 15
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index c2a521ed51..2332b204ed 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -15,7 +15,7 @@
#include <openssl/buffer.h>
#include <openssl/err.h>
#include "internal/numbers.h"
-#include "asn1_locl.h"
+#include "asn1_local.h"
/*
diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c
index 30be314ff9..d600c7a538 100644
--- a/crypto/asn1/tasn_enc.c
+++ b/crypto/asn1/tasn_enc.c
@@ -13,8 +13,8 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
-#include "internal/asn1_int.h"
-#include "asn1_locl.h"
+#include "crypto/asn1.h"
+#include "asn1_local.h"
static int asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out,
const ASN1_ITEM *it, int tag, int aclass);
diff --git a/crypto/asn1/tasn_fre.c b/crypto/asn1/tasn_fre.c
index bbce489fe0..2916bef786 100644
--- a/crypto/asn1/tasn_fre.c
+++ b/crypto/asn1/tasn_fre.c
@@ -11,7 +11,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/* Free up an ASN1 structure */
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 6b8ea8ddd7..287f2af33b 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -13,7 +13,7 @@
#include <openssl/err.h>
#include <openssl/asn1t.h>
#include <string.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
static int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
int embed);
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index 1fb66f1062..56d5ea0f39 100644
--- a/crypto/asn1/tasn_prn.c
+++ b/crypto/asn1/tasn_prn.c
@@ -15,8 +15,8 @@
#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
-#include "internal/asn1_int.h"
-#include "asn1_locl.h"
+#include "crypto/asn1.h"
+#include "asn1_local.h"
/*
* Print routines.
diff --git a/crypto/asn1/tasn_scn.c b/crypto/asn1/tasn_scn.c
index e1df2cfcae..f0f218ae8b 100644
--- a/crypto/asn1/tasn_scn.c
+++ b/crypto/asn1/tasn_scn.c
@@ -15,7 +15,7 @@
#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/*
* General ASN1 structure recursive scanner: iterate through all fields
diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c
index 7ceecffce7..a448685e19 100644
--- a/crypto/asn1/tasn_utl.c
+++ b/crypto/asn1/tasn_utl.c
@@ -15,7 +15,7 @@
#include <openssl/asn1t.h>
#include <openssl/objects.h>
#include <openssl/err.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/* Utility functions for manipulating fields and offsets */
diff --git a/crypto/asn1/x_algor.c b/crypto/asn1/x_algor.c
index 853d45b8bc..4c4a718850 100644
--- a/crypto/asn1/x_algor.c
+++ b/crypto/asn1/x_algor.c
@@ -11,7 +11,7 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
ASN1_SEQUENCE(X509_ALGOR) = {
ASN1_SIMPLE(X509_ALGOR, algorithm, ASN1_OBJECT),
diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c
index 0ee552cf0a..96c1a259e1 100644
--- a/crypto/asn1/x_int64.c
+++ b/crypto/asn1/x_int64.c
@@ -12,7 +12,7 @@
#include "internal/numbers.h"
#include <openssl/asn1t.h>
#include <openssl/bn.h>
-#include "asn1_locl.h"
+#include "asn1_local.h"
/*
* Custom primitive types for handling int32_t, int64_t, uint32_t, uint64_t.
diff --git a/crypto/asn1/x_sig.c b/crypto/asn1/x_sig.c
index e465cf2d4d..fb24e240cb 100644
--- a/crypto/asn1/x_sig.c
+++ b/crypto/asn1/x_sig.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
ASN1_SEQUENCE(X509_SIG) = {
ASN1_SIMPLE(X509_SIG, algor, X509_ALGOR),
diff --git a/crypto/async/arch/async_null.c b/crypto/async/arch/async_null.c
index 3eaf170f2e..26801f8731 100644
--- a/crypto/async/arch/async_null.c
+++ b/crypto/async/arch/async_null.c
@@ -8,7 +8,7 @@
*/
/* This must be the first #include file */
-#include "../async_locl.h"
+#include "../async_local.h"
#ifdef ASYNC_NULL
int ASYNC_is_capable(void)
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c
index 02c342d3df..95678d4fa6 100644
--- a/crypto/async/arch/async_posix.c
+++ b/crypto/async/arch/async_posix.c
@@ -8,7 +8,7 @@
*/
/* This must be the first #include file */
-#include "../async_locl.h"
+#include "../async_local.h"
#ifdef ASYNC_POSIX
diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h
index 62449fe60e..873c0316dd 100644
--- a/crypto/async/arch/async_posix.h
+++ b/crypto/async/arch/async_posix.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
-#define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
+#ifndef OSSL_CRYPTO_ASYNC_POSIX_H
+#define OSSL_CRYPTO_ASYNC_POSIX_H
#include <openssl/e_os2.h>
#if defined(OPENSSL_SYS_UNIX) \
@@ -55,4 +55,4 @@ void async_fibre_free(async_fibre *fibre);
# endif
#endif
-#endif /* OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H */
+#endif /* OSSL_CRYPTO_ASYNC_POSIX_H */
diff --git a/crypto/async/arch/async_win.c b/crypto/async/arch/async_win.c
index 077d56ced0..1f360d895b 100644
--- a/crypto/async/arch/async_win.c
+++ b/crypto/async/arch/async_win.c
@@ -8,7 +8,7 @@
*/
/* This must be the first #include file */
-#include "../async_locl.h"
+#include "../async_local.h"
#ifdef ASYNC_WIN
diff --git a/crypto/async/async.c b/crypto/async/async.c
index 1d83e4576f..326015c605 100644
--- a/crypto/async/async.c
+++ b/crypto/async/async.c
@@ -16,10 +16,10 @@
#undef _FORTIFY_SOURCE
/* This must be the first #include file */
-#include "async_locl.h"
+#include "async_local.h"
#include <openssl/err.h>
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include <string.h>
#define ASYNC_JOB_RUNNING 0
diff --git a/crypto/async/async_locl.h b/crypto/async/async_local.h
similarity index 98%
rename from crypto/async/async_locl.h
rename to crypto/async/async_local.h
index d7790293f7..dd1a85e026 100644
--- a/crypto/async/async_locl.h
+++ b/crypto/async/async_local.h
@@ -20,7 +20,7 @@
# include <windows.h>
#endif
-#include "internal/async.h"
+#include "crypto/async.h"
#include <openssl/crypto.h>
typedef struct async_ctx_st async_ctx;
diff --git a/crypto/async/async_wait.c b/crypto/async/async_wait.c
index b23e43e8c8..7723f949a6 100644
--- a/crypto/async/async_wait.c
+++ b/crypto/async/async_wait.c
@@ -8,7 +8,7 @@
*/
/* This must be the first #include file */
-#include "async_locl.h"
+#include "async_local.h"
#include <openssl/err.h>
diff --git a/crypto/bf/bf_cfb64.c b/crypto/bf/bf_cfb64.c
index ce6e13b5a4..12332c540d 100644
--- a/crypto/bf/bf_cfb64.c
+++ b/crypto/bf/bf_cfb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/blowfish.h>
-#include "bf_locl.h"
+#include "bf_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/bf/bf_ecb.c b/crypto/bf/bf_ecb.c
index dc1becdbe4..38e784cc2d 100644
--- a/crypto/bf/bf_ecb.c
+++ b/crypto/bf/bf_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/blowfish.h>
-#include "bf_locl.h"
+#include "bf_local.h"
#include <openssl/opensslv.h>
/*
diff --git a/crypto/bf/bf_enc.c b/crypto/bf/bf_enc.c
index 67c0d78aec..423a4697a5 100644
--- a/crypto/bf/bf_enc.c
+++ b/crypto/bf/bf_enc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/blowfish.h>
-#include "bf_locl.h"
+#include "bf_local.h"
/*
* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' (From
diff --git a/crypto/bf/bf_locl.h b/crypto/bf/bf_local.h
similarity index 98%
rename from crypto/bf/bf_locl.h
rename to crypto/bf/bf_local.h
index b1a415e513..8c76976fa4 100644
--- a/crypto/bf/bf_locl.h
+++ b/crypto/bf/bf_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_BF_LOCL_H
-# define HEADER_BF_LOCL_H
+#ifndef OSSL_CRYPTO_BF_LOCAL_H
+# define OSSL_CRYPTO_BF_LOCAL_H
# include <openssl/opensslconf.h>
/* NOTE - c is not incremented as per n2l */
diff --git a/crypto/bf/bf_ofb64.c b/crypto/bf/bf_ofb64.c
index 6418217b30..5d75401fcc 100644
--- a/crypto/bf/bf_ofb64.c
+++ b/crypto/bf/bf_ofb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/blowfish.h>
-#include "bf_locl.h"
+#include "bf_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/bf/bf_skey.c b/crypto/bf/bf_skey.c
index a4903a2a71..ed29cf9153 100644
--- a/crypto/bf/bf_skey.c
+++ b/crypto/bf/bf_skey.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <openssl/blowfish.h>
-#include "bf_locl.h"
+#include "bf_local.h"
#include "bf_pi.h"
void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index dd5008e636..5b9a485a80 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include <string.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include <openssl/crypto.h>
#ifndef OPENSSL_NO_SOCK
@@ -22,7 +22,7 @@ CRYPTO_RWLOCK *bio_lookup_lock;
static CRYPTO_ONCE bio_lookup_init = CRYPTO_ONCE_STATIC_INIT;
/*
- * Throughout this file and bio_lcl.h, the existence of the macro
+ * Throughout this file and bio_local.h, the existence of the macro
* AI_PASSIVE is used to detect the availability of struct addrinfo,
* getnameinfo() and getaddrinfo(). If that macro doesn't exist,
* we use our own implementation instead, using gethostbyname,
@@ -694,7 +694,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type,
hints.ai_flags |= AI_PASSIVE;
/* Note that |res| SHOULD be a 'struct addrinfo **' thanks to
- * macro magic in bio_lcl.h
+ * macro magic in bio_local.h
*/
retry:
switch ((gai_ret = getaddrinfo(host, service, &hints, res))) {
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c
index 45f1c523ce..f175e244b2 100644
--- a/crypto/bio/b_dump.c
+++ b/crypto/bio/b_dump.c
@@ -12,7 +12,7 @@
*/
#include <stdio.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#define DUMP_WIDTH 16
#define DUMP_WIDTH_LESS_INDENT(i) (DUMP_WIDTH - ((i - (i > 6 ? 6 : i) + 3) / 4))
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index 9e907fcaa7..8ef90ac1d4 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include "internal/cryptlib.h"
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/numbers.h"
#include <openssl/bio.h>
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index e7a24d02cb..df431e6d52 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#ifndef OPENSSL_NO_SOCK
# define SOCKET_PROTOCOL IPPROTO_TCP
# ifdef SO_MAXCONN
diff --git a/crypto/bio/b_sock2.c b/crypto/bio/b_sock2.c
index 5d82ab22dc..335dfabc61 100644
--- a/crypto/bio/b_sock2.c
+++ b/crypto/bio/b_sock2.c
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include <openssl/err.h>
diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c
index 8e87a629b8..51ae1f918d 100644
--- a/crypto/bio/bf_buff.c
+++ b/crypto/bio/bf_buff.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
static int buffer_write(BIO *h, const char *buf, int num);
diff --git a/crypto/bio/bf_lbuf.c b/crypto/bio/bf_lbuf.c
index 194c7b8af7..72f9901813 100644
--- a/crypto/bio/bf_lbuf.c
+++ b/crypto/bio/bf_lbuf.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
#include <openssl/evp.h>
diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c
index 4bc84eeba6..dd7011ab66 100644
--- a/crypto/bio/bf_nbio.c
+++ b/crypto/bio/bf_nbio.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
#include <openssl/rand.h>
diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c
index 613fb2e058..48c6be692a 100644
--- a/crypto/bio/bf_null.c
+++ b/crypto/bio/bf_null.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
/*
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index 1154c233af..a153100a88 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
#include <openssl/err.h>
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index ca375b911a..d2202e537b 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <errno.h>
#include <openssl/crypto.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
diff --git a/crypto/bio/bio_lcl.h b/crypto/bio/bio_local.h
similarity index 97%
rename from crypto/bio/bio_lcl.h
rename to crypto/bio/bio_local.h
index e2c05a20de..8b21221293 100644
--- a/crypto/bio/bio_lcl.h
+++ b/crypto/bio/bio_local.h
@@ -27,11 +27,11 @@
* For clarity, we check for internal/cryptlib.h since it's a common header
* that also includes bio.h.
*/
-# ifdef HEADER_CRYPTLIB_H
-# error internal/cryptlib.h included before bio_lcl.h
+# ifdef OSSL_INTERNAL_CRYPTLIB_H
+# error internal/cryptlib.h included before bio_local.h
# endif
# ifdef HEADER_BIO_H
-# error openssl/bio.h included before bio_lcl.h
+# error openssl/bio.h included before bio_local.h
# endif
/*
diff --git a/crypto/bio/bio_meth.c b/crypto/bio/bio_meth.c
index 493ff63a90..da11646192 100644
--- a/crypto/bio/bio_meth.c
+++ b/crypto/bio/bio_meth.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/thread_once.h"
CRYPTO_RWLOCK *bio_type_lock = NULL;
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index 993e5903a0..c6a2c38891 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#ifndef OPENSSL_NO_SOCK
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c
index e34382c557..c97349e432 100644
--- a/crypto/bio/bss_bio.c
+++ b/crypto/bio/bss_bio.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include <openssl/err.h>
#include <openssl/crypto.h>
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c
index e9673fe783..264e25a1c2 100644
--- a/crypto/bio/bss_conn.c
+++ b/crypto/bio/bss_conn.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#ifndef OPENSSL_NO_SOCK
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 551821609f..942fd8b514 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#ifndef OPENSSL_NO_DGRAM
# ifndef OPENSSL_NO_SCTP
diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c
index 5bc539c90b..894b3ff9e7 100644
--- a/crypto/bio/bss_fd.c
+++ b/crypto/bio/bss_fd.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#if defined(OPENSSL_NO_POSIX_IO)
/*
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index a210205597..1a70ce7994 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include <openssl/err.h>
#if !defined(OPENSSL_NO_STDIO)
diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c
index e9ab932ec2..b9579faaa2 100644
--- a/crypto/bio/bss_log.c
+++ b/crypto/bio/bss_log.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
#if defined(OPENSSL_SYS_WINCE)
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index 2d536e9db0..7cb4a57813 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
static int mem_write(BIO *h, const char *buf, int num);
diff --git a/crypto/bio/bss_null.c b/crypto/bio/bss_null.c
index 08f1d2bc98..e73ce7841d 100644
--- a/crypto/bio/bss_null.c
+++ b/crypto/bio/bss_null.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
static int null_write(BIO *h, const char *buf, int num);
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index ad38453201..da818ca90e 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <errno.h>
-#include "bio_lcl.h"
+#include "bio_local.h"
#include "internal/cryptlib.h"
#ifndef OPENSSL_NO_SOCK
diff --git a/crypto/blake2/blake2_locl.h b/crypto/blake2/blake2_local.h
similarity index 100%
rename from crypto/blake2/blake2_locl.h
rename to crypto/blake2/blake2_local.h
diff --git a/crypto/blake2/blake2b.c b/crypto/blake2/blake2b.c
index 4b353dd498..fc6e5f1a3f 100644
--- a/crypto/blake2/blake2b.c
+++ b/crypto/blake2/blake2b.c
@@ -18,7 +18,7 @@
#include <string.h>
#include <openssl/crypto.h>
-#include "blake2_locl.h"
+#include "blake2_local.h"
#include "blake2_impl.h"
static const uint64_t blake2b_IV[8] =
diff --git a/crypto/blake2/blake2s.c b/crypto/blake2/blake2s.c
index 8211374d12..d072e05ca3 100644
--- a/crypto/blake2/blake2s.c
+++ b/crypto/blake2/blake2s.c
@@ -18,7 +18,7 @@
#include <string.h>
#include <openssl/crypto.h>
-#include "blake2_locl.h"
+#include "blake2_local.h"
#include "blake2_impl.h"
static const uint32_t blake2s_IV[8] =
diff --git a/crypto/blake2/m_blake2b.c b/crypto/blake2/m_blake2b.c
index c493648c3c..ce4d8f9565 100644
--- a/crypto/blake2/m_blake2b.c
+++ b/crypto/blake2/m_blake2b.c
@@ -20,8 +20,8 @@
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "blake2_locl.h"
-# include "internal/evp_int.h"
+# include "blake2_local.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/blake2/m_blake2s.c b/crypto/blake2/m_blake2s.c
index 83b2811e44..b8fb048b30 100644
--- a/crypto/blake2/m_blake2s.c
+++ b/crypto/blake2/m_blake2s.c
@@ -20,8 +20,8 @@
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "blake2_locl.h"
-# include "internal/evp_int.h"
+# include "blake2_local.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/bn/README.pod b/crypto/bn/README.pod
index 706a140342..5d5c4fa99f 100644
--- a/crypto/bn/README.pod
+++ b/crypto/bn/README.pod
@@ -188,7 +188,7 @@ B<a> and the 2*B<n> word arrays B<tmp> and B<r>.
The implementations use the following macros which, depending on the
architecture, may use "long long" C operations or inline assembler.
-They are defined in C<bn_lcl.h>.
+They are defined in C<bn_local.h>.
mul(B<r>, B<a>, B<w>, B<c>) computes B<w>*B<a>+B<c> and places the
low word of the result in B<r> and the high word in B<c>.
diff --git a/crypto/bn/asm/x86_64-gcc.c b/crypto/bn/asm/x86_64-gcc.c
index 31839ba060..e6fdaadf0e 100644
--- a/crypto/bn/asm/x86_64-gcc.c
+++ b/crypto/bn/asm/x86_64-gcc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "../bn_lcl.h"
+#include "../bn_local.h"
#if !(defined(__GNUC__) && __GNUC__>=2)
# include "../bn_asm.c" /* kind of dirty hack for Sun Studio */
#else
diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c
index f2736b8f6d..8ffe49618a 100644
--- a/crypto/bn/bn_add.c
+++ b/crypto/bn/bn_add.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/* signed add of b to a. */
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
diff --git a/crypto/bn/bn_asm.c b/crypto/bn/bn_asm.c
index 729b2480ac..4d83a8cf11 100644
--- a/crypto/bn/bn_asm.c
+++ b/crypto/bn/bn_asm.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#if defined(BN_LLONG) || defined(BN_UMULT_HIGH)
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c
index 450cdfb348..76fc7ebcff 100644
--- a/crypto/bn/bn_blind.c
+++ b/crypto/bn/bn_blind.c
@@ -9,7 +9,7 @@
#include <openssl/opensslconf.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#define BN_BLINDING_COUNTER 32
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index 90cecea2aa..042cb247d3 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/*-
* TODO list
diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c
index 58bcf197a4..b60269cd57 100644
--- a/crypto/bn/bn_depr.c
+++ b/crypto/bn/bn_depr.c
@@ -20,7 +20,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdio.h>
# include <time.h>
# include "internal/cryptlib.h"
-# include "bn_lcl.h"
+# include "bn_local.h"
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
const BIGNUM *add, const BIGNUM *rem,
diff --git a/crypto/bn/bn_dh.c b/crypto/bn/bn_dh.c
index 38acdee234..58c44f0b17 100644
--- a/crypto/bn/bn_dh.c
+++ b/crypto/bn/bn_dh.c
@@ -7,12 +7,12 @@
* https://www.openssl.org/source/license.html
*/
-#include "bn_lcl.h"
+#include "bn_local.h"
#include "internal/nelem.h"
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
-#include "internal/bn_dh.h"
+#include "crypto/bn_dh.h"
/* DH parameters from RFC5114 */
# if BN_BITS2 == 64
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c
index 7fc0132830..286d69c895 100644
--- a/crypto/bn/bn_div.c
+++ b/crypto/bn/bn_div.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include <openssl/bn.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/* The old slow way */
#if 0
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 88f2baf0e5..9531acfc3c 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -8,8 +8,8 @@
*/
#include "internal/cryptlib.h"
-#include "internal/constant_time_locl.h"
-#include "bn_lcl.h"
+#include "internal/constant_time.h"
+#include "bn_local.h"
#include <stdlib.h>
#ifdef _WIN32
diff --git a/crypto/bn/bn_exp2.c b/crypto/bn/bn_exp2.c
index 082c9286a0..e542abe46f 100644
--- a/crypto/bn/bn_exp2.c
+++ b/crypto/bn/bn_exp2.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#define TABLE_SIZE 32
diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c
index 0091ea4e08..f0a91f5617 100644
--- a/crypto/bn/bn_gcd.c
+++ b/crypto/bn/bn_gcd.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
static BIGNUM *euclid(BIGNUM *a, BIGNUM *b);
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c
index 34d8b69c1e..a2ea867551 100644
--- a/crypto/bn/bn_gf2m.c
+++ b/crypto/bn/bn_gf2m.c
@@ -12,7 +12,7 @@
#include <limits.h>
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#ifndef OPENSSL_NO_EC2M
diff --git a/crypto/bn/bn_intern.c b/crypto/bn/bn_intern.c
index 46bc97575d..147b4fa022 100644
--- a/crypto/bn/bn_intern.c
+++ b/crypto/bn/bn_intern.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/*
* Determine the modified width-(w+1) Non-Adjacent Form (wNAF) of 'scalar'.
diff --git a/crypto/bn/bn_kron.c b/crypto/bn/bn_kron.c
index b9bc6cca27..c1e09d2721 100644
--- a/crypto/bn/bn_kron.c
+++ b/crypto/bn/bn_kron.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/* least significant word */
#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0])
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 254069ff38..86d4956c8a 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -10,9 +10,9 @@
#include <assert.h>
#include <limits.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#include <openssl/opensslconf.h>
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
/* This stuff appears to be completely unused, so is deprecated */
#if OPENSSL_API_COMPAT < 0x00908000L
diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_local.h
similarity index 99%
rename from crypto/bn/bn_lcl.h
rename to crypto/bn/bn_local.h
index 7f823a6178..37228104c6 100644
--- a/crypto/bn/bn_lcl.h
+++ b/crypto/bn/bn_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_BN_LCL_H
-# define HEADER_BN_LCL_H
+#ifndef OSSL_CRYPTO_BN_LOCAL_H
+# define OSSL_CRYPTO_BN_LOCAL_H
/*
* The EDK2 build doesn't use bn_conf.h; it sets THIRTY_TWO_BIT or
@@ -18,10 +18,10 @@
# include <openssl/opensslconf.h>
# if !defined(OPENSSL_SYS_UEFI)
-# include "internal/bn_conf.h"
+# include "crypto/bn_conf.h"
# endif
-# include "internal/bn_int.h"
+# include "crypto/bn.h"
/*
* These preprocessor symbols control various aspects of the bignum headers
diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c
index 712fc8ac14..f7d2e2650e 100644
--- a/crypto/bn/bn_mod.c
+++ b/crypto/bn/bn_mod.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
{
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c
index 393d27c392..1e5045a010 100644
--- a/crypto/bn/bn_mont.c
+++ b/crypto/bn/bn_mont.c
@@ -15,7 +15,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#define MONT_WORD /* use the faster word-based algorithm */
diff --git a/crypto/bn/bn_mpi.c b/crypto/bn/bn_mpi.c
index 043e21d26a..bdbe822415 100644
--- a/crypto/bn/bn_mpi.c
+++ b/crypto/bn/bn_mpi.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
int BN_bn2mpi(const BIGNUM *a, unsigned char *d)
{
diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c
index 5eda65cfbb..6743e7be81 100644
--- a/crypto/bn/bn_mul.c
+++ b/crypto/bn/bn_mul.c
@@ -9,7 +9,7 @@
#include <assert.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#if defined(OPENSSL_NO_ASM) || !defined(OPENSSL_BN_ASM_PART_WORDS)
/*
diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c
index dcdd321c66..325dc22849 100644
--- a/crypto/bn/bn_nist.c
+++ b/crypto/bn/bn_nist.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "bn_lcl.h"
+#include "bn_local.h"
#include "internal/cryptlib.h"
#define BN_NIST_192_TOP (192+BN_BITS2-1)/BN_BITS2
diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c
index 19b081f38e..6d74da26d3 100644
--- a/crypto/bn/bn_prime.c
+++ b/crypto/bn/bn_prime.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <time.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/*
* The quick sieve algorithm approach to weeding out primes is Philip
diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c
index 1853269d90..69749a9fa7 100644
--- a/crypto/bn/bn_print.c
+++ b/crypto/bn/bn_print.c
@@ -8,11 +8,11 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <limits.h>
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
-#include "bn_lcl.h"
+#include "bn_local.h"
static const char Hex[] = "0123456789ABCDEF";
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index 051f29e343..6b4b50a068 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <time.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
#include <openssl/rand.h>
#include <openssl/sha.h>
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c
index 9ab767f42f..e822313341 100644
--- a/crypto/bn/bn_recp.c
+++ b/crypto/bn/bn_recp.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
void BN_RECP_CTX_init(BN_RECP_CTX *recp)
{
diff --git a/crypto/bn/bn_shift.c b/crypto/bn/bn_shift.c
index b7a1e0ff9a..60c6ee418e 100644
--- a/crypto/bn/bn_shift.c
+++ b/crypto/bn/bn_shift.c
@@ -9,7 +9,7 @@
#include <assert.h>
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
int BN_lshift1(BIGNUM *r, const BIGNUM *a)
{
diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c
index 0c0a590f0c..7f3a179177 100644
--- a/crypto/bn/bn_sqr.c
+++ b/crypto/bn/bn_sqr.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
/* r must not be a */
/*
diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c
index c3e66b033b..1723d5ded5 100644
--- a/crypto/bn/bn_sqrt.c
+++ b/crypto/bn/bn_sqrt.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
/*
diff --git a/crypto/bn/bn_srp.c b/crypto/bn/bn_srp.c
index 27b6ebe518..820757be60 100644
--- a/crypto/bn/bn_srp.c
+++ b/crypto/bn/bn_srp.c
@@ -7,13 +7,13 @@
* https://www.openssl.org/source/license.html
*/
-#include "bn_lcl.h"
+#include "bn_local.h"
#include "internal/nelem.h"
#ifndef OPENSSL_NO_SRP
#include <openssl/srp.h>
-#include "internal/bn_srp.h"
+#include "crypto/bn_srp.h"
# if (BN_BYTES == 8)
# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
diff --git a/crypto/bn/bn_word.c b/crypto/bn/bn_word.c
index 262d7668fc..18fb3030a8 100644
--- a/crypto/bn/bn_word.c
+++ b/crypto/bn/bn_word.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "bn_lcl.h"
+#include "bn_local.h"
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w)
{
diff --git a/crypto/bn/bn_x931p.c b/crypto/bn/bn_x931p.c
index 9eb8384fde..009950259d 100644
--- a/crypto/bn/bn_x931p.c
+++ b/crypto/bn/bn_x931p.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <openssl/bn.h>
-#include "bn_lcl.h"
+#include "bn_local.h"
/* X9.31 routines for prime derivation */
diff --git a/crypto/bn/rsaz_exp.h b/crypto/bn/rsaz_exp.h
index c5864f8aaa..88f65a4bae 100644
--- a/crypto/bn/rsaz_exp.h
+++ b/crypto/bn/rsaz_exp.h
@@ -12,8 +12,8 @@
* (2) University of Haifa, Israel
*/
-#ifndef RSAZ_EXP_H
-# define RSAZ_EXP_H
+#ifndef OSSL_CRYPTO_BN_RSAZ_EXP_H
+# define OSSL_CRYPTO_BN_RSAZ_EXP_H
# undef RSAZ_ENABLED
# if defined(OPENSSL_BN_ASM_MONT) && \
diff --git a/crypto/camellia/camellia.c b/crypto/camellia/camellia.c
index c200b82304..f623864bc4 100644
--- a/crypto/camellia/camellia.c
+++ b/crypto/camellia/camellia.c
@@ -40,7 +40,7 @@
*/
#include <openssl/camellia.h>
-#include "cmll_locl.h"
+#include "cmll_local.h"
#include <string.h>
#include <stdlib.h>
diff --git a/crypto/camellia/cmll_ecb.c b/crypto/camellia/cmll_ecb.c
index d932f1b375..5760d1ed35 100644
--- a/crypto/camellia/cmll_ecb.c
+++ b/crypto/camellia/cmll_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/camellia.h>
-#include "cmll_locl.h"
+#include "cmll_local.h"
void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,
const CAMELLIA_KEY *key, const int enc)
diff --git a/crypto/camellia/cmll_locl.h b/crypto/camellia/cmll_local.h
similarity index 91%
rename from crypto/camellia/cmll_locl.h
rename to crypto/camellia/cmll_local.h
index 6403b390d8..d16baa55fa 100644
--- a/crypto/camellia/cmll_locl.h
+++ b/crypto/camellia/cmll_local.h
@@ -22,8 +22,8 @@
* to the OpenSSL project.
*/
-#ifndef HEADER_CAMELLIA_LOCL_H
-# define HEADER_CAMELLIA_LOCL_H
+#ifndef OSSL_CRYPTO_CAMELLIA_CMLL_LOCAL_H
+# define OSSL_CRYPTO_CAMELLIA_CMLL_LOCAL_H
typedef unsigned int u32;
typedef unsigned char u8;
@@ -40,4 +40,4 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[],
const KEY_TABLE_TYPE keyTable, u8 ciphertext[]);
void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[],
const KEY_TABLE_TYPE keyTable, u8 plaintext[]);
-#endif /* #ifndef HEADER_CAMELLIA_LOCL_H */
+#endif /* #ifndef OSSL_CRYPTO_CAMELLIA_CMLL_LOCAL_H */
diff --git a/crypto/camellia/cmll_misc.c b/crypto/camellia/cmll_misc.c
index e5f014b79c..d8fc3738c4 100644
--- a/crypto/camellia/cmll_misc.c
+++ b/crypto/camellia/cmll_misc.c
@@ -9,7 +9,7 @@
#include <openssl/opensslv.h>
#include <openssl/camellia.h>
-#include "cmll_locl.h"
+#include "cmll_local.h"
int Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key)
diff --git a/crypto/cast/c_cfb64.c b/crypto/cast/c_cfb64.c
index bd7cb2f468..7222159538 100644
--- a/crypto/cast/c_cfb64.c
+++ b/crypto/cast/c_cfb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/cast.h>
-#include "cast_lcl.h"
+#include "cast_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/cast/c_ecb.c b/crypto/cast/c_ecb.c
index da4179438f..6fe093f75b 100644
--- a/crypto/cast/c_ecb.c
+++ b/crypto/cast/c_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/cast.h>
-#include "cast_lcl.h"
+#include "cast_local.h"
#include <openssl/opensslv.h>
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
diff --git a/crypto/cast/c_enc.c b/crypto/cast/c_enc.c
index 700b6d162a..d27d1fc0a5 100644
--- a/crypto/cast/c_enc.c
+++ b/crypto/cast/c_enc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/cast.h>
-#include "cast_lcl.h"
+#include "cast_local.h"
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key)
{
diff --git a/crypto/cast/c_ofb64.c b/crypto/cast/c_ofb64.c
index dffb074762..49c0cfade5 100644
--- a/crypto/cast/c_ofb64.c
+++ b/crypto/cast/c_ofb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/cast.h>
-#include "cast_lcl.h"
+#include "cast_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/cast/c_skey.c b/crypto/cast/c_skey.c
index 962d2a60b4..0311482d20 100644
--- a/crypto/cast/c_skey.c
+++ b/crypto/cast/c_skey.c
@@ -8,7 +8,7 @@
*/
#include <openssl/cast.h>
-#include "cast_lcl.h"
+#include "cast_local.h"
#include "cast_s.h"
#define CAST_exp(l,A,a,n) \
diff --git a/crypto/cast/cast_lcl.h b/crypto/cast/cast_local.h
similarity index 100%
rename from crypto/cast/cast_lcl.h
rename to crypto/cast/cast_local.h
diff --git a/crypto/chacha/chacha_enc.c b/crypto/chacha/chacha_enc.c
index 239f68ab82..afe5b5136a 100644
--- a/crypto/chacha/chacha_enc.c
+++ b/crypto/chacha/chacha_enc.c
@@ -11,7 +11,7 @@
#include <string.h>
-#include "internal/chacha.h"
+#include "crypto/chacha.h"
typedef unsigned int u32;
typedef unsigned char u8;
diff --git a/crypto/cmac/cm_ameth.c b/crypto/cmac/cm_ameth.c
index a58454a089..82adf18c80 100644
--- a/crypto/cmac/cm_ameth.c
+++ b/crypto/cmac/cm_ameth.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/cmac.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
/*
* CMAC "ASN1" method. This is just here to indicate the maximum CMAC output
diff --git a/crypto/cmac/cm_pmeth.c b/crypto/cmac/cm_pmeth.c
index 10748f1488..5574f25be8 100644
--- a/crypto/cmac/cm_pmeth.c
+++ b/crypto/cmac/cm_pmeth.c
@@ -13,7 +13,7 @@
#include <openssl/x509v3.h>
#include <openssl/evp.h>
#include <openssl/cmac.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* The context structure and "key" is simply a CMAC_CTX */
diff --git a/crypto/cms/cms_asn1.c b/crypto/cms/cms_asn1.c
index 993ea6b219..08069d72a2 100644
--- a/crypto/cms/cms_asn1.c
+++ b/crypto/cms/cms_asn1.c
@@ -11,7 +11,7 @@
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
ASN1_SEQUENCE(CMS_IssuerAndSerialNumber) = {
diff --git a/crypto/cms/cms_att.c b/crypto/cms/cms_att.c
index 0566019753..4f71661919 100644
--- a/crypto/cms/cms_att.c
+++ b/crypto/cms/cms_att.c
@@ -12,7 +12,7 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
#include "internal/nelem.h"
/*-
diff --git a/crypto/cms/cms_cd.c b/crypto/cms/cms_cd.c
index f05e308418..45365b8ba2 100644
--- a/crypto/cms/cms_cd.c
+++ b/crypto/cms/cms_cd.c
@@ -15,7 +15,7 @@
#include <openssl/cms.h>
#include <openssl/bio.h>
#include <openssl/comp.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
#ifdef ZLIB
diff --git a/crypto/cms/cms_dd.c b/crypto/cms/cms_dd.c
index 5da6802fcd..0df2e698c2 100644
--- a/crypto/cms/cms_dd.c
+++ b/crypto/cms/cms_dd.c
@@ -13,7 +13,7 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
/* CMS DigestedData Utilities */
diff --git a/crypto/cms/cms_enc.c b/crypto/cms/cms_enc.c
index a1719830e8..fc490303d4 100644
--- a/crypto/cms/cms_enc.c
+++ b/crypto/cms/cms_enc.c
@@ -14,7 +14,7 @@
#include <openssl/err.h>
#include <openssl/cms.h>
#include <openssl/rand.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
/* CMS EncryptedData Utilities */
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c
index 26fb81f79a..04940146fd 100644
--- a/crypto/cms/cms_env.c
+++ b/crypto/cms/cms_env.c
@@ -14,9 +14,9 @@
#include <openssl/err.h>
#include <openssl/cms.h>
#include <openssl/aes.h>
-#include "cms_lcl.h"
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "cms_local.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
/* CMS EnvelopedData Utilities */
diff --git a/crypto/cms/cms_ess.c b/crypto/cms/cms_ess.c
index 4780231c22..a21c443ae8 100644
--- a/crypto/cms/cms_ess.c
+++ b/crypto/cms/cms_ess.c
@@ -14,7 +14,7 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
IMPLEMENT_ASN1_FUNCTIONS(CMS_ReceiptRequest)
diff --git a/crypto/cms/cms_io.c b/crypto/cms/cms_io.c
index d18f980a97..b37e485f5a 100644
--- a/crypto/cms/cms_io.c
+++ b/crypto/cms/cms_io.c
@@ -12,7 +12,7 @@
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms)
{
diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c
index 5e83814d0f..3980bf8f3f 100644
--- a/crypto/cms/cms_kari.c
+++ b/crypto/cms/cms_kari.c
@@ -14,8 +14,8 @@
#include <openssl/err.h>
#include <openssl/cms.h>
#include <openssl/aes.h>
-#include "cms_lcl.h"
-#include "internal/asn1_int.h"
+#include "cms_local.h"
+#include "crypto/asn1.h"
/* Key Agreement Recipient Info (KARI) routines */
diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c
index c2cac26010..57afba4361 100644
--- a/crypto/cms/cms_lib.c
+++ b/crypto/cms/cms_lib.c
@@ -14,7 +14,7 @@
#include <openssl/bio.h>
#include <openssl/asn1.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
+#include "cms_local.h"
IMPLEMENT_ASN1_FUNCTIONS(CMS_ContentInfo)
IMPLEMENT_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
diff --git a/crypto/cms/cms_lcl.h b/crypto/cms/cms_local.h
similarity index 99%
rename from crypto/cms/cms_lcl.h
rename to crypto/cms/cms_local.h
index 68aa01271b..a0ce4448f6 100644
--- a/crypto/cms/cms_lcl.h
+++ b/crypto/cms/cms_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CMS_LCL_H
-# define HEADER_CMS_LCL_H
+#ifndef OSSL_CRYPTO_CMS_LOCAL_H
+# define OSSL_CRYPTO_CMS_LOCAL_H
# include <openssl/x509.h>
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c
index 26e3bdcf9e..d741488339 100644
--- a/crypto/cms/cms_pwri.c
+++ b/crypto/cms/cms_pwri.c
@@ -15,8 +15,8 @@
#include <openssl/cms.h>
#include <openssl/rand.h>
#include <openssl/aes.h>
-#include "cms_lcl.h"
-#include "internal/asn1_int.h"
+#include "cms_local.h"
+#include "crypto/asn1.h"
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
unsigned char *pass, ossl_ssize_t passlen)
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c
index 3841513f8b..29ba4c1b13 100644
--- a/crypto/cms/cms_sd.c
+++ b/crypto/cms/cms_sd.c
@@ -14,9 +14,9 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "cms_local.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
/* CMS SignedData Utilities */
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c
index 10815639f8..652e97b2e8 100644
--- a/crypto/cms/cms_smime.c
+++ b/crypto/cms/cms_smime.c
@@ -13,8 +13,8 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
#include <openssl/cms.h>
-#include "cms_lcl.h"
-#include "internal/asn1_int.h"
+#include "cms_local.h"
+#include "crypto/asn1.h"
static BIO *cms_get_text_bio(BIO *out, unsigned int flags)
{
diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c
index 7c1be358fd..b819337913 100644
--- a/crypto/comp/c_zlib.c
+++ b/crypto/comp/c_zlib.c
@@ -13,9 +13,9 @@
#include <openssl/objects.h>
#include "internal/comp.h"
#include <openssl/err.h>
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include "internal/bio.h"
-#include "comp_lcl.h"
+#include "comp_local.h"
COMP_METHOD *COMP_zlib(void);
diff --git a/crypto/comp/comp_lib.c b/crypto/comp/comp_lib.c
index 6ae2114496..56920e1cca 100644
--- a/crypto/comp/comp_lib.c
+++ b/crypto/comp/comp_lib.c
@@ -13,7 +13,7 @@
#include <openssl/objects.h>
#include <openssl/comp.h>
#include <openssl/err.h>
-#include "comp_lcl.h"
+#include "comp_local.h"
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
{
diff --git a/crypto/comp/comp_lcl.h b/crypto/comp/comp_local.h
similarity index 100%
rename from crypto/comp/comp_lcl.h
rename to crypto/comp/comp_local.h
diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c
index 2d40ac97ec..0b7dd26d63 100644
--- a/crypto/conf/conf_lib.c
+++ b/crypto/conf/conf_lib.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <string.h>
#include "internal/conf.h"
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/conf.h>
diff --git a/crypto/conf/conf_lcl.h b/crypto/conf/conf_local.h
similarity index 100%
rename from crypto/conf/conf_lcl.h
rename to crypto/conf/conf_local.h
diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c
index 7e86948e89..d7eaa8509b 100644
--- a/crypto/conf/conf_mall.c
+++ b/crypto/conf/conf_mall.c
@@ -14,7 +14,7 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/engine.h>
-#include "conf_lcl.h"
+#include "conf_local.h"
/* Load all OpenSSL builtin modules */
diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c
index 387f2cf46c..4bd8117d36 100644
--- a/crypto/conf/conf_ssl.c
+++ b/crypto/conf/conf_ssl.c
@@ -12,7 +12,7 @@
#include <openssl/conf.h>
#include <openssl/err.h>
#include "internal/sslconf.h"
-#include "conf_lcl.h"
+#include "conf_local.h"
/*
* SSL library configuration module placeholder. We load it here but defer
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 7b761a3adc..1f36b20c86 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -9,7 +9,7 @@
*/
#include "e_os.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include <openssl/safestack.h>
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
@@ -49,7 +49,7 @@ typedef char variant_char;
# define ossl_getenv getenv
# endif
-# include "internal/ctype.h"
+# include "crypto/ctype.h"
static int todigit(variant_char c)
{
diff --git a/crypto/ct/ct_b64.c b/crypto/ct/ct_b64.c
index 109ffcdcf2..4abe11ca29 100644
--- a/crypto/ct/ct_b64.c
+++ b/crypto/ct/ct_b64.c
@@ -14,7 +14,7 @@
#include <openssl/err.h>
#include <openssl/evp.h>
-#include "ct_locl.h"
+#include "ct_local.h"
/*
* Decodes the base64 string |in| into |out|.
diff --git a/crypto/ct/ct_locl.h b/crypto/ct/ct_local.h
similarity index 100%
rename from crypto/ct/ct_locl.h
rename to crypto/ct/ct_local.h
diff --git a/crypto/ct/ct_oct.c b/crypto/ct/ct_oct.c
index 0dd691c0f7..d4b6645af4 100644
--- a/crypto/ct/ct_oct.c
+++ b/crypto/ct/ct_oct.c
@@ -19,7 +19,7 @@
#include <openssl/ct.h>
#include <openssl/err.h>
-#include "ct_locl.h"
+#include "ct_local.h"
int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
{
diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c
index 0d7b346387..df66e8a494 100644
--- a/crypto/ct/ct_policy.c
+++ b/crypto/ct/ct_policy.c
@@ -15,7 +15,7 @@
#include <openssl/err.h>
#include <time.h>
-#include "ct_locl.h"
+#include "ct_local.h"
/*
* Number of seconds in the future that an SCT timestamp can be, by default,
diff --git a/crypto/ct/ct_prn.c b/crypto/ct/ct_prn.c
index 376e04523e..e6584b57f3 100644
--- a/crypto/ct/ct_prn.c
+++ b/crypto/ct/ct_prn.c
@@ -14,7 +14,7 @@
#include <openssl/asn1.h>
#include <openssl/bio.h>
-#include "ct_locl.h"
+#include "ct_local.h"
static void SCT_signature_algorithms_print(const SCT *sct, BIO *out)
{
diff --git a/crypto/ct/ct_sct.c b/crypto/ct/ct_sct.c
index 1dc16857ba..4ff36e2fbd 100644
--- a/crypto/ct/ct_sct.c
+++ b/crypto/ct/ct_sct.c
@@ -17,7 +17,7 @@
#include <openssl/tls1.h>
#include <openssl/x509.h>
-#include "ct_locl.h"
+#include "ct_local.h"
SCT *SCT_new(void)
{
diff --git a/crypto/ct/ct_sct_ctx.c b/crypto/ct/ct_sct_ctx.c
index 75a5027df0..841e768033 100644
--- a/crypto/ct/ct_sct_ctx.c
+++ b/crypto/ct/ct_sct_ctx.c
@@ -18,7 +18,7 @@
#include <openssl/obj_mac.h>
#include <openssl/x509.h>
-#include "ct_locl.h"
+#include "ct_local.h"
SCT_CTX *SCT_CTX_new(void)
{
diff --git a/crypto/ct/ct_vfy.c b/crypto/ct/ct_vfy.c
index cabcf5782a..74fd34f415 100644
--- a/crypto/ct/ct_vfy.c
+++ b/crypto/ct/ct_vfy.c
@@ -14,7 +14,7 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "ct_locl.h"
+#include "ct_local.h"
typedef enum sct_signature_type_t {
SIGNATURE_TYPE_NOT_SET = -1,
diff --git a/crypto/ct/ct_x509v3.c b/crypto/ct/ct_x509v3.c
index ec186d1f5b..19c2a852d2 100644
--- a/crypto/ct/ct_x509v3.c
+++ b/crypto/ct/ct_x509v3.c
@@ -11,7 +11,7 @@
# error "CT is disabled"
#endif
-#include "ct_locl.h"
+#include "ct_local.h"
static char *i2s_poison(const X509V3_EXT_METHOD *method, void *val)
{
diff --git a/crypto/ctype.c b/crypto/ctype.c
index e05f84cd40..b7f1183f9c 100644
--- a/crypto/ctype.c
+++ b/crypto/ctype.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "openssl/ebcdic.h"
/*
diff --git a/crypto/des/cbc_cksm.c b/crypto/des/cbc_cksm.c
index 5a1f72f82d..c5e2e017b8 100644
--- a/crypto/des/cbc_cksm.c
+++ b/crypto/des/cbc_cksm.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output,
long length, DES_key_schedule *schedule,
diff --git a/crypto/des/cfb64ede.c b/crypto/des/cfb64ede.c
index 21943f6143..490d925f46 100644
--- a/crypto/des/cfb64ede.c
+++ b/crypto/des/cfb64ede.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/des/cfb64enc.c b/crypto/des/cfb64enc.c
index 96de51b055..ca0e821648 100644
--- a/crypto/des/cfb64enc.c
+++ b/crypto/des/cfb64enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/des/cfb_enc.c b/crypto/des/cfb_enc.c
index 544392e405..17018420e6 100644
--- a/crypto/des/cfb_enc.c
+++ b/crypto/des/cfb_enc.c
@@ -8,7 +8,7 @@
*/
#include "e_os.h"
-#include "des_locl.h"
+#include "des_local.h"
#include <assert.h>
/*
diff --git a/crypto/des/des_enc.c b/crypto/des/des_enc.c
index ed134ace8c..45eec615d8 100644
--- a/crypto/des/des_enc.c
+++ b/crypto/des/des_enc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "des_locl.h"
+#include "des_local.h"
#include "spr.h"
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc)
diff --git a/crypto/des/des_locl.h b/crypto/des/des_local.h
similarity index 99%
rename from crypto/des/des_locl.h
rename to crypto/des/des_local.h
index f401e6f3eb..0f58a1c9ae 100644
--- a/crypto/des/des_locl.h
+++ b/crypto/des/des_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_DES_LOCL_H
-# define HEADER_DES_LOCL_H
+#ifndef OSSL_CRYPTO_DES_LOCAL_H
+# define OSSL_CRYPTO_DES_LOCAL_H
# include <openssl/e_os2.h>
diff --git a/crypto/des/ecb3_enc.c b/crypto/des/ecb3_enc.c
index 6ac89d4e78..7afa8eaadd 100644
--- a/crypto/des/ecb3_enc.c
+++ b/crypto/des/ecb3_enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks1, DES_key_schedule *ks2,
diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c
index 5ed079d15f..513c65e116 100644
--- a/crypto/des/ecb_enc.c
+++ b/crypto/des/ecb_enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
#include <openssl/opensslv.h>
#include <openssl/bio.h>
diff --git a/crypto/des/fcrypt.c b/crypto/des/fcrypt.c
index aaee4bf236..e83cf76b61 100644
--- a/crypto/des/fcrypt.c
+++ b/crypto/des/fcrypt.c
@@ -19,7 +19,7 @@
#endif
#include <openssl/crypto.h>
-#include "des_locl.h"
+#include "des_local.h"
/*
* Added more values to handle illegal salt values the way normal crypt()
diff --git a/crypto/des/fcrypt_b.c b/crypto/des/fcrypt_b.c
index fe2369a935..22f967b8c6 100644
--- a/crypto/des/fcrypt_b.c
+++ b/crypto/des/fcrypt_b.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#define DES_FCRYPT
-#include "des_locl.h"
+#include "des_local.h"
#undef DES_FCRYPT
#undef PERM_OP
diff --git a/crypto/des/ncbc_enc.c b/crypto/des/ncbc_enc.c
index 244f15ca2a..cd4b071a3d 100644
--- a/crypto/des/ncbc_enc.c
+++ b/crypto/des/ncbc_enc.c
@@ -13,7 +13,7 @@
* des_enc.c (DES_ncbc_encrypt)
*/
-#include "des_locl.h"
+#include "des_local.h"
#ifdef CBC_ENC_C__DONT_UPDATE_IV
void DES_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
diff --git a/crypto/des/ofb64ede.c b/crypto/des/ofb64ede.c
index a551a07e0e..68cf2dc557 100644
--- a/crypto/des/ofb64ede.c
+++ b/crypto/des/ofb64ede.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/des/ofb64enc.c b/crypto/des/ofb64enc.c
index 30976c871d..5796980c18 100644
--- a/crypto/des/ofb64enc.c
+++ b/crypto/des/ofb64enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/des/ofb_enc.c b/crypto/des/ofb_enc.c
index 65a9b8604d..2b0498994b 100644
--- a/crypto/des/ofb_enc.c
+++ b/crypto/des/ofb_enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/*
* The input and output are loaded in multiples of 8 bits. What this means is
diff --git a/crypto/des/pcbc_enc.c b/crypto/des/pcbc_enc.c
index 0fa058f03f..3490592741 100644
--- a/crypto/des/pcbc_enc.c
+++ b/crypto/des/pcbc_enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
long length, DES_key_schedule *schedule,
diff --git a/crypto/des/qud_cksm.c b/crypto/des/qud_cksm.c
index 81e6be8226..10b6abf69e 100644
--- a/crypto/des/qud_cksm.c
+++ b/crypto/des/qud_cksm.c
@@ -13,7 +13,7 @@
* only based on the code in this paper and is almost definitely not the same
* as the MIT implementation.
*/
-#include "des_locl.h"
+#include "des_local.h"
#define Q_B0(a) (((DES_LONG)(a)))
#define Q_B1(a) (((DES_LONG)(a))<<8)
diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c
index adbad72362..cbcb616cb2 100644
--- a/crypto/des/set_key.c
+++ b/crypto/des/set_key.c
@@ -16,7 +16,7 @@
* 1.0 First working version
*/
#include <openssl/crypto.h>
-#include "des_locl.h"
+#include "des_local.h"
/* defaults to false */
OPENSSL_IMPLEMENT_GLOBAL(int, DES_check_key, 0)
diff --git a/crypto/des/str2key.c b/crypto/des/str2key.c
index e18d726522..61db605125 100644
--- a/crypto/des/str2key.c
+++ b/crypto/des/str2key.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "des_locl.h"
+#include "des_local.h"
void DES_string_to_key(const char *str, DES_cblock *key)
{
diff --git a/crypto/des/xcbc_enc.c b/crypto/des/xcbc_enc.c
index c4e455d9b9..fb3fd5292c 100644
--- a/crypto/des/xcbc_enc.c
+++ b/crypto/des/xcbc_enc.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "des_locl.h"
+#include "des_local.h"
/* RSA's DESX */
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index 05a1d4227e..60af9e2159 100644
--- a/crypto/dh/dh_ameth.c
+++ b/crypto/dh/dh_ameth.c
@@ -11,10 +11,10 @@
#include "internal/cryptlib.h"
#include <openssl/x509.h>
#include <openssl/asn1.h>
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/bn.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
#include <openssl/cms.h>
/*
diff --git a/crypto/dh/dh_asn1.c b/crypto/dh/dh_asn1.c
index 1a40633b48..e37f0904e5 100644
--- a/crypto/dh/dh_asn1.c
+++ b/crypto/dh/dh_asn1.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/bn.h>
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/objects.h>
#include <openssl/asn1t.h>
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
index d13d8206ce..4ac169e75c 100644
--- a/crypto/dh/dh_check.c
+++ b/crypto/dh/dh_check.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/bn.h>
-#include "dh_locl.h"
+#include "dh_local.h"
# define DH_NUMBER_ITERATIONS_FOR_PRIME 64
diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c
index d293835eb2..1350f78e4e 100644
--- a/crypto/dh/dh_gen.c
+++ b/crypto/dh/dh_gen.c
@@ -15,7 +15,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/bn.h>
-#include "dh_locl.h"
+#include "dh_local.h"
static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
BN_GENCB *cb);
diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
index 718aa422d9..daffdf74dd 100644
--- a/crypto/dh/dh_key.c
+++ b/crypto/dh/dh_key.c
@@ -9,8 +9,8 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "dh_locl.h"
-#include "internal/bn_int.h"
+#include "dh_local.h"
+#include "crypto/bn.h"
static int generate_key(DH *dh);
static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c
index e7e7ef08e9..04b79d355c 100644
--- a/crypto/dh/dh_lib.c
+++ b/crypto/dh/dh_lib.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include "internal/refcount.h"
#include <openssl/bn.h>
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/engine.h>
int DH_set_method(DH *dh, const DH_METHOD *meth)
diff --git a/crypto/dh/dh_locl.h b/crypto/dh/dh_local.h
similarity index 100%
rename from crypto/dh/dh_locl.h
rename to crypto/dh/dh_local.h
diff --git a/crypto/dh/dh_meth.c b/crypto/dh/dh_meth.c
index 59c4d7e967..8a54a8108f 100644
--- a/crypto/dh/dh_meth.c
+++ b/crypto/dh/dh_meth.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "dh_locl.h"
+#include "dh_local.h"
#include <string.h>
#include <openssl/err.h>
diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c
index 568831f1c2..1fd94deb47 100644
--- a/crypto/dh/dh_pmeth.c
+++ b/crypto/dh/dh_pmeth.c
@@ -12,11 +12,11 @@
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/evp.h>
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/bn.h>
#include <openssl/dsa.h>
#include <openssl/objects.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* DH pkey context structure */
diff --git a/crypto/dh/dh_rfc5114.c b/crypto/dh/dh_rfc5114.c
index c4a219590e..e3603a05a3 100644
--- a/crypto/dh/dh_rfc5114.c
+++ b/crypto/dh/dh_rfc5114.c
@@ -9,9 +9,9 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/bn.h>
-#include "internal/bn_dh.h"
+#include "crypto/bn_dh.h"
/*
* Macro to make a DH structure from BIGNUM data. NB: although just copying
diff --git a/crypto/dh/dh_rfc7919.c b/crypto/dh/dh_rfc7919.c
index a54b468e55..03d30a1f5d 100644
--- a/crypto/dh/dh_rfc7919.c
+++ b/crypto/dh/dh_rfc7919.c
@@ -9,10 +9,10 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "dh_locl.h"
+#include "dh_local.h"
#include <openssl/bn.h>
#include <openssl/objects.h>
-#include "internal/bn_dh.h"
+#include "crypto/bn_dh.h"
static DH *dh_param_init(const BIGNUM *p, int32_t nbits)
{
diff --git a/crypto/dllmain.c b/crypto/dllmain.c
index 0838c55e48..e8217893b9 100644
--- a/crypto/dllmain.c
+++ b/crypto/dllmain.c
@@ -8,7 +8,7 @@
*/
#include "e_os.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#if defined(_WIN32) || defined(__CYGWIN__)
# ifdef __CYGWIN__
diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c
index 49aa1ae23b..2dcaa0815f 100644
--- a/crypto/dsa/dsa_ameth.c
+++ b/crypto/dsa/dsa_ameth.c
@@ -11,11 +11,11 @@
#include "internal/cryptlib.h"
#include <openssl/x509.h>
#include <openssl/asn1.h>
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <openssl/bn.h>
#include <openssl/cms.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
{
diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c
index 6499e87ef3..9cafd5ca8a 100644
--- a/crypto/dsa/dsa_asn1.c
+++ b/crypto/dsa/dsa_asn1.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/rand.h>
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index af59a582b5..5d066a06c5 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -21,7 +21,7 @@
#include <openssl/bn.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
-#include "dsa_locl.h"
+#include "dsa_local.h"
int DSA_generate_parameters_ex(DSA *ret, int bits,
const unsigned char *seed_in, int seed_len,
diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c
index a48af58492..bdeddd4f61 100644
--- a/crypto/dsa/dsa_key.c
+++ b/crypto/dsa/dsa_key.c
@@ -11,7 +11,7 @@
#include <time.h>
#include "internal/cryptlib.h"
#include <openssl/bn.h>
-#include "dsa_locl.h"
+#include "dsa_local.h"
static int dsa_builtin_keygen(DSA *dsa);
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c
index 1048601beb..f98af5853d 100644
--- a/crypto/dsa/dsa_lib.c
+++ b/crypto/dsa/dsa_lib.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include "internal/refcount.h"
#include <openssl/bn.h>
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <openssl/asn1.h>
#include <openssl/engine.h>
#include <openssl/dh.h>
diff --git a/crypto/dsa/dsa_locl.h b/crypto/dsa/dsa_local.h
similarity index 100%
rename from crypto/dsa/dsa_locl.h
rename to crypto/dsa/dsa_local.h
diff --git a/crypto/dsa/dsa_meth.c b/crypto/dsa/dsa_meth.c
index ff4fae44a7..1e6ee2f4ed 100644
--- a/crypto/dsa/dsa_meth.c
+++ b/crypto/dsa/dsa_meth.c
@@ -15,7 +15,7 @@
* or in the file LICENSE in the source distribution.
*/
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <string.h>
#include <openssl/err.h>
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index 16161dcadf..a983def64e 100644
--- a/crypto/dsa/dsa_ossl.c
+++ b/crypto/dsa/dsa_ossl.c
@@ -9,10 +9,10 @@
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "internal/bn_int.h"
+#include "crypto/bn.h"
#include <openssl/bn.h>
#include <openssl/sha.h>
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <openssl/asn1.h>
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c
index 1dd2fef9be..80e5735d83 100644
--- a/crypto/dsa/dsa_pmeth.c
+++ b/crypto/dsa/dsa_pmeth.c
@@ -13,8 +13,8 @@
#include <openssl/x509.h>
#include <openssl/evp.h>
#include <openssl/bn.h>
-#include "internal/evp_int.h"
-#include "dsa_locl.h"
+#include "crypto/evp.h"
+#include "dsa_local.h"
/* DSA pkey context structure */
diff --git a/crypto/dsa/dsa_sign.c b/crypto/dsa/dsa_sign.c
index e9466b29f1..51c7754b93 100644
--- a/crypto/dsa/dsa_sign.c
+++ b/crypto/dsa/dsa_sign.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "dsa_locl.h"
+#include "dsa_local.h"
#include <openssl/bn.h>
DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
diff --git a/crypto/dsa/dsa_vrf.c b/crypto/dsa/dsa_vrf.c
index 21f98cd94e..6f80a4aab7 100644
--- a/crypto/dsa/dsa_vrf.c
+++ b/crypto/dsa/dsa_vrf.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "dsa_locl.h"
+#include "dsa_local.h"
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
DSA *dsa)
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c
index 290d73cf35..3bbb10e5ca 100644
--- a/crypto/dso/dso_dl.c
+++ b/crypto/dso/dso_dl.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "dso_locl.h"
+#include "dso_local.h"
#ifdef DSO_DL
diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c
index ba3b55fcbf..4719e8f4f3 100644
--- a/crypto/dso/dso_dlfcn.c
+++ b/crypto/dso/dso_dlfcn.c
@@ -16,7 +16,7 @@
# define _GNU_SOURCE /* make sure dladdr is declared */
#endif
-#include "dso_locl.h"
+#include "dso_local.h"
#include "e_os.h"
#ifdef DSO_DLFCN
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index 2e75021d39..50a39bb7d5 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "dso_locl.h"
+#include "dso_local.h"
#include "internal/refcount.h"
static DSO_METHOD *default_DSO_meth = NULL;
diff --git a/crypto/dso/dso_locl.h b/crypto/dso/dso_local.h
similarity index 99%
rename from crypto/dso/dso_locl.h
rename to crypto/dso/dso_local.h
index 14a0ccb7c0..43b7df9d78 100644
--- a/crypto/dso/dso_locl.h
+++ b/crypto/dso/dso_local.h
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include "internal/dso.h"
-#include "internal/dso_conf.h"
+#include "crypto/dso_conf.h"
#include "internal/refcount.h"
/**********************************************************************/
diff --git a/crypto/dso/dso_openssl.c b/crypto/dso/dso_openssl.c
index f0dd38ace2..c76a04db23 100644
--- a/crypto/dso/dso_openssl.c
+++ b/crypto/dso/dso_openssl.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "dso_locl.h"
+#include "dso_local.h"
#ifdef DSO_NONE
diff --git a/crypto/dso/dso_vms.c b/crypto/dso/dso_vms.c
index 178e725798..9d1066f915 100644
--- a/crypto/dso/dso_vms.c
+++ b/crypto/dso/dso_vms.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "dso_locl.h"
+#include "dso_local.h"
#ifdef OPENSSL_SYS_VMS
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index 6631d517f4..37892170c0 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -8,7 +8,7 @@
*/
#include "e_os.h"
-#include "dso_locl.h"
+#include "dso_local.h"
#if defined(DSO_WIN32)
diff --git a/crypto/ec/curve25519.c b/crypto/ec/curve25519.c
index c5d887ec4c..952da0e653 100644
--- a/crypto/ec/curve25519.c
+++ b/crypto/ec/curve25519.c
@@ -8,7 +8,7 @@
*/
#include <string.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/sha.h>
#if defined(X25519_ASM) && (defined(__x86_64) || defined(__x86_64__) || \
diff --git a/crypto/ec/curve448/arch_32/arch_intrinsics.h b/crypto/ec/curve448/arch_32/arch_intrinsics.h
index 48081c7717..5f6389863d 100644
--- a/crypto/ec/curve448/arch_32/arch_intrinsics.h
+++ b/crypto/ec/curve448/arch_32/arch_intrinsics.h
@@ -10,10 +10,10 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_ARCH_32_ARCH_INTRINSICS_H
-# define HEADER_ARCH_32_ARCH_INTRINSICS_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
+# define OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
# define ARCH_WORD_BITS 32
@@ -24,4 +24,4 @@ static ossl_inline uint64_t widemul(uint32_t a, uint32_t b)
return ((uint64_t)a) * b;
}
-#endif /* HEADER_ARCH_32_ARCH_INTRINSICS_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H */
diff --git a/crypto/ec/curve448/arch_32/f_impl.h b/crypto/ec/curve448/arch_32/f_impl.h
index bbde84a038..e1ddddaee0 100644
--- a/crypto/ec/curve448/arch_32/f_impl.h
+++ b/crypto/ec/curve448/arch_32/f_impl.h
@@ -10,8 +10,8 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_ARCH_32_F_IMPL_H
-# define HEADER_ARCH_32_F_IMPL_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H
+# define OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H
# define GF_HEADROOM 2
# define LIMB(x) ((x) & ((1 << 28) - 1)), ((x) >> 28)
@@ -57,4 +57,4 @@ void gf_weak_reduce(gf a)
a->limb[0] = (a->limb[0] & mask) + tmp;
}
-#endif /* HEADER_ARCH_32_F_IMPL_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H */
diff --git a/crypto/ec/curve448/curve448.c b/crypto/ec/curve448/curve448.c
index 19bd385781..12d97f0679 100644
--- a/crypto/ec/curve448/curve448.c
+++ b/crypto/ec/curve448/curve448.c
@@ -15,7 +15,7 @@
#include "point_448.h"
#include "ed448.h"
-#include "curve448_lcl.h"
+#include "curve448_local.h"
#define COFACTOR 4
diff --git a/crypto/ec/curve448/curve448_lcl.h b/crypto/ec/curve448/curve448_local.h
similarity index 91%
rename from crypto/ec/curve448/curve448_lcl.h
rename to crypto/ec/curve448/curve448_local.h
index 2bc3bd84c8..b27770661f 100644
--- a/crypto/ec/curve448/curve448_lcl.h
+++ b/crypto/ec/curve448/curve448_local.h
@@ -6,8 +6,8 @@
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CURVE448_LCL_H
-# define HEADER_CURVE448_LCL_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_LOCAL_H
+# define OSSL_CRYPTO_EC_CURVE448_LOCAL_H
# include "curve448utils.h"
int X448(uint8_t out_shared_key[56], const uint8_t private_key[56],
@@ -35,4 +35,4 @@ int ED448ph_verify(const uint8_t hash[64], const uint8_t signature[114],
int ED448_public_from_private(uint8_t out_public_key[57],
const uint8_t private_key[57]);
-#endif /* HEADER_CURVE448_LCL_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_LOCAL_H */
diff --git a/crypto/ec/curve448/curve448utils.h b/crypto/ec/curve448/curve448utils.h
index 9032bb4f73..86c258e745 100644
--- a/crypto/ec/curve448/curve448utils.h
+++ b/crypto/ec/curve448/curve448utils.h
@@ -10,8 +10,8 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_CURVE448UTILS_H
-# define HEADER_CURVE448UTILS_H
+#ifndef OSSL_CRYPTO_EC_CURVE448UTILS_H
+# define OSSL_CRYPTO_EC_CURVE448UTILS_H
# include <openssl/e_os2.h>
diff --git a/crypto/ec/curve448/ed448.h b/crypto/ec/curve448/ed448.h
index 5fe939e8e1..c1e5c2832f 100644
--- a/crypto/ec/curve448/ed448.h
+++ b/crypto/ec/curve448/ed448.h
@@ -10,8 +10,8 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_ED448_H
-# define HEADER_ED448_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_ED448_H
+# define OSSL_CRYPTO_EC_CURVE448_ED448_H
# include "point_448.h"
@@ -192,4 +192,4 @@ c448_error_t c448_ed448_convert_private_key_to_x448(
uint8_t x[X448_PRIVATE_BYTES],
const uint8_t ed[EDDSA_448_PRIVATE_BYTES]);
-#endif /* HEADER_ED448_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_ED448_H */
diff --git a/crypto/ec/curve448/eddsa.c b/crypto/ec/curve448/eddsa.c
index b28f7dff91..cd018c3db1 100644
--- a/crypto/ec/curve448/eddsa.c
+++ b/crypto/ec/curve448/eddsa.c
@@ -12,7 +12,7 @@
#include <string.h>
#include <openssl/crypto.h>
#include <openssl/evp.h>
-#include "curve448_lcl.h"
+#include "curve448_local.h"
#include "word.h"
#include "ed448.h"
#include "internal/numbers.h"
diff --git a/crypto/ec/curve448/field.h b/crypto/ec/curve448/field.h
index d96d4c023d..ccd04482d2 100644
--- a/crypto/ec/curve448/field.h
+++ b/crypto/ec/curve448/field.h
@@ -10,10 +10,10 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_FIELD_H
-# define HEADER_FIELD_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_FIELD_H
+# define OSSL_CRYPTO_EC_CURVE448_FIELD_H
-# include "internal/constant_time_locl.h"
+# include "internal/constant_time.h"
# include <string.h>
# include <assert.h>
# include "word.h"
@@ -165,4 +165,4 @@ static ossl_inline void gf_cond_swap(gf x, gf_s * RESTRICT y, mask_t swap)
}
}
-#endif /* HEADER_FIELD_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_FIELD_H */
diff --git a/crypto/ec/curve448/point_448.h b/crypto/ec/curve448/point_448.h
index 399f91b9a1..93e715fd9c 100644
--- a/crypto/ec/curve448/point_448.h
+++ b/crypto/ec/curve448/point_448.h
@@ -10,8 +10,8 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_POINT_448_H
-# define HEADER_POINT_448_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_POINT_448_H
+# define OSSL_CRYPTO_EC_CURVE448_POINT_448_H
# include "curve448utils.h"
# include "field.h"
@@ -298,4 +298,4 @@ void curve448_scalar_destroy(curve448_scalar_t scalar);
/* Overwrite point with zeros. */
void curve448_point_destroy(curve448_point_t point);
-#endif /* HEADER_POINT_448_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_POINT_448_H */
diff --git a/crypto/ec/curve448/word.h b/crypto/ec/curve448/word.h
index a48b9e053a..237cc9b631 100644
--- a/crypto/ec/curve448/word.h
+++ b/crypto/ec/curve448/word.h
@@ -10,8 +10,8 @@
* Originally written by Mike Hamburg
*/
-#ifndef HEADER_WORD_H
-# define HEADER_WORD_H
+#ifndef OSSL_CRYPTO_EC_CURVE448_WORD_H
+# define OSSL_CRYPTO_EC_CURVE448_WORD_H
# include <string.h>
# include <assert.h>
@@ -78,4 +78,4 @@ static ossl_inline mask_t bool_to_mask(c448_bool_t m)
return ret;
}
-#endif /* HEADER_WORD_H */
+#endif /* OSSL_CRYPTO_EC_CURVE448_WORD_H */
diff --git a/crypto/ec/ec2_oct.c b/crypto/ec/ec2_oct.c
index ee300518d6..48543265ee 100644
--- a/crypto/ec/ec2_oct.c
+++ b/crypto/ec/ec2_oct.c
@@ -10,7 +10,7 @@
#include <openssl/err.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#ifndef OPENSSL_NO_EC2M
diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c
index 898e741fcb..84e5537a03 100644
--- a/crypto/ec/ec2_smpl.c
+++ b/crypto/ec/ec2_smpl.c
@@ -10,8 +10,8 @@
#include <openssl/err.h>
-#include "internal/bn_int.h"
-#include "ec_lcl.h"
+#include "crypto/bn.h"
+#include "ec_local.h"
#ifndef OPENSSL_NO_EC2M
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c
index c086f47ab3..2210383739 100644
--- a/crypto/ec/ec_ameth.c
+++ b/crypto/ec/ec_ameth.c
@@ -14,9 +14,9 @@
#include <openssl/bn.h>
#include <openssl/cms.h>
#include <openssl/asn1t.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
-#include "ec_lcl.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
+#include "ec_local.h"
#ifndef OPENSSL_NO_CMS
static int ecdh_cms_decrypt(CMS_RecipientInfo *ri);
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 7cbf8de981..f14d1b5249 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -8,7 +8,7 @@
*/
#include <string.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/err.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
diff --git a/crypto/ec/ec_check.c b/crypto/ec/ec_check.c
index eeb06ec1cb..d0706d2857 100644
--- a/crypto/ec/ec_check.c
+++ b/crypto/ec/ec_check.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/err.h>
int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx)
diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c
index 477349d441..8de486cbd7 100644
--- a/crypto/ec/ec_curve.c
+++ b/crypto/ec/ec_curve.c
@@ -9,7 +9,7 @@
*/
#include <string.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include <openssl/opensslconf.h>
diff --git a/crypto/ec/ec_cvt.c b/crypto/ec/ec_cvt.c
index 0ec346c125..944e317d9d 100644
--- a/crypto/ec/ec_cvt.c
+++ b/crypto/ec/ec_cvt.c
@@ -9,7 +9,7 @@
*/
#include <openssl/err.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
const BIGNUM *b, BN_CTX *ctx)
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 9349abf030..08aaac5d8a 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -10,7 +10,7 @@
#include "internal/cryptlib.h"
#include <string.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include "internal/refcount.h"
#include <openssl/err.h>
#include <openssl/engine.h>
diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c
index 64a5d20872..53a4a92952 100644
--- a/crypto/ec/ec_kmeth.c
+++ b/crypto/ec/ec_kmeth.c
@@ -11,7 +11,7 @@
#include <openssl/ec.h>
#include <openssl/engine.h>
#include <openssl/err.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
static const EC_KEY_METHOD openssl_ec_key_method = {
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 1289c8608e..3554ada827 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -13,7 +13,7 @@
#include <openssl/err.h>
#include <openssl/opensslv.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
/* functions for EC_GROUP objects */
diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_local.h
similarity index 99%
rename from crypto/ec/ec_lcl.h
rename to crypto/ec/ec_local.h
index fbdb04ea3a..e656fbd5e7 100644
--- a/crypto/ec/ec_lcl.h
+++ b/crypto/ec/ec_local.h
@@ -14,7 +14,7 @@
#include <openssl/ec.h>
#include <openssl/bn.h>
#include "internal/refcount.h"
-#include "internal/ec_int.h"
+#include "crypto/ec.h"
#if defined(__SUNPRO_C)
# if __SUNPRO_C >= 0x520
diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
index 57bdf116f1..7980a67282 100644
--- a/crypto/ec/ec_mult.c
+++ b/crypto/ec/ec_mult.c
@@ -12,8 +12,8 @@
#include <openssl/err.h>
#include "internal/cryptlib.h"
-#include "internal/bn_int.h"
-#include "ec_lcl.h"
+#include "crypto/bn.h"
+#include "ec_local.h"
#include "internal/refcount.h"
/*
diff --git a/crypto/ec/ec_oct.c b/crypto/ec/ec_oct.c
index 522f79e673..7ddc86b047 100644
--- a/crypto/ec/ec_oct.c
+++ b/crypto/ec/ec_oct.c
@@ -13,7 +13,7 @@
#include <openssl/err.h>
#include <openssl/opensslv.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point,
const BIGNUM *x, int y_bit, BN_CTX *ctx)
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c
index 454be16c54..64d2cc93a6 100644
--- a/crypto/ec/ec_pmeth.c
+++ b/crypto/ec/ec_pmeth.c
@@ -12,9 +12,9 @@
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/ec.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* EC pkey context structure */
diff --git a/crypto/ec/ec_print.c b/crypto/ec/ec_print.c
index 027a51928a..f2525cbaa6 100644
--- a/crypto/ec/ec_print.c
+++ b/crypto/ec/ec_print.c
@@ -9,7 +9,7 @@
#include <openssl/crypto.h>
#include <openssl/err.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
BIGNUM *EC_POINT_point2bn(const EC_GROUP *group,
const EC_POINT *point,
diff --git a/crypto/ec/ecdh_kdf.c b/crypto/ec/ecdh_kdf.c
index d686f9d897..96efac62f6 100644
--- a/crypto/ec/ecdh_kdf.c
+++ b/crypto/ec/ecdh_kdf.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <openssl/ec.h>
#include <openssl/evp.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
/* Key derivation function from X9.63/SECG */
/* Way more than we will ever need */
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c
index ab51ee7138..0be00d43da 100644
--- a/crypto/ec/ecdh_ossl.c
+++ b/crypto/ec/ecdh_ossl.c
@@ -17,7 +17,7 @@
#include <openssl/bn.h>
#include <openssl/objects.h>
#include <openssl/ec.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
int ossl_ecdh_compute_key(unsigned char **psec, size_t *pseclen,
const EC_POINT *pub_key, const EC_KEY *ecdh)
diff --git a/crypto/ec/ecdsa_ossl.c b/crypto/ec/ecdsa_ossl.c
index c35ed2dcd0..c6158616a2 100644
--- a/crypto/ec/ecdsa_ossl.c
+++ b/crypto/ec/ecdsa_ossl.c
@@ -11,8 +11,8 @@
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include <openssl/rand.h>
-#include "internal/bn_int.h"
-#include "ec_lcl.h"
+#include "crypto/bn.h"
+#include "ec_local.h"
int ossl_ecdsa_sign(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen,
diff --git a/crypto/ec/ecdsa_sign.c b/crypto/ec/ecdsa_sign.c
index aee06e991b..dc79c8c8e3 100644
--- a/crypto/ec/ecdsa_sign.c
+++ b/crypto/ec/ecdsa_sign.c
@@ -8,7 +8,7 @@
*/
#include <openssl/ec.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/err.h>
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey)
diff --git a/crypto/ec/ecdsa_vrf.c b/crypto/ec/ecdsa_vrf.c
index f61a20063e..3b7b4b3e07 100644
--- a/crypto/ec/ecdsa_vrf.c
+++ b/crypto/ec/ecdsa_vrf.c
@@ -8,7 +8,7 @@
*/
#include <openssl/ec.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/err.h>
/*-
diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c
index 252e66ef37..bdc39d5efb 100644
--- a/crypto/ec/ecp_mont.c
+++ b/crypto/ec/ecp_mont.c
@@ -10,7 +10,7 @@
#include <openssl/err.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
const EC_METHOD *EC_GFp_mont_method(void)
{
diff --git a/crypto/ec/ecp_nist.c b/crypto/ec/ecp_nist.c
index 5eaa99d840..9fd01279a8 100644
--- a/crypto/ec/ecp_nist.c
+++ b/crypto/ec/ecp_nist.c
@@ -12,7 +12,7 @@
#include <openssl/err.h>
#include <openssl/obj_mac.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
const EC_METHOD *EC_GFp_nist_method(void)
{
diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c
index fbbdb9d938..36edcd5130 100644
--- a/crypto/ec/ecp_nistp224.c
+++ b/crypto/ec/ecp_nistp224.c
@@ -38,7 +38,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdint.h>
# include <string.h>
# include <openssl/err.h>
-# include "ec_lcl.h"
+# include "ec_local.h"
# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16
/* even with gcc, the typedef won't work for 32-bit platforms */
diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c
index 22ba69aa44..8265d574de 100644
--- a/crypto/ec/ecp_nistp256.c
+++ b/crypto/ec/ecp_nistp256.c
@@ -39,7 +39,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <stdint.h>
# include <string.h>
# include <openssl/err.h>
-# include "ec_lcl.h"
+# include "ec_local.h"
# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16
/* even with gcc, the typedef won't work for 32-bit platforms */
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 6340f48279..14cd409162 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -38,7 +38,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <string.h>
# include <openssl/err.h>
-# include "ec_lcl.h"
+# include "ec_local.h"
# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16
/* even with gcc, the typedef won't work for 32-bit platforms */
diff --git a/crypto/ec/ecp_nistputil.c b/crypto/ec/ecp_nistputil.c
index f89a2f0aac..60e1325c34 100644
--- a/crypto/ec/ecp_nistputil.c
+++ b/crypto/ec/ecp_nistputil.c
@@ -33,7 +33,7 @@ NON_EMPTY_TRANSLATION_UNIT
*/
# include <stddef.h>
-# include "ec_lcl.h"
+# include "ec_local.h"
/*
* Convert an array of points into affine coordinates. (If the point at
diff --git a/crypto/ec/ecp_nistz256.c b/crypto/ec/ecp_nistz256.c
index 7ad5eb627d..6da62c3b91 100644
--- a/crypto/ec/ecp_nistz256.c
+++ b/crypto/ec/ecp_nistz256.c
@@ -21,8 +21,8 @@
#include <string.h>
#include "internal/cryptlib.h"
-#include "internal/bn_int.h"
-#include "ec_lcl.h"
+#include "crypto/bn.h"
+#include "ec_local.h"
#include "internal/refcount.h"
#if BN_BITS2 != 64
diff --git a/crypto/ec/ecp_oct.c b/crypto/ec/ecp_oct.c
index 7ade1b3d21..9460763256 100644
--- a/crypto/ec/ecp_oct.c
+++ b/crypto/ec/ecp_oct.c
@@ -11,7 +11,7 @@
#include <openssl/err.h>
#include <openssl/symhacks.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
EC_POINT *point,
diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c
index e6e4c9d2cb..b354bfe9ce 100644
--- a/crypto/ec/ecp_smpl.c
+++ b/crypto/ec/ecp_smpl.c
@@ -11,7 +11,7 @@
#include <openssl/err.h>
#include <openssl/symhacks.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
const EC_METHOD *EC_GFp_simple_method(void)
{
diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c
index 55429642fd..9dc5259e4a 100644
--- a/crypto/ec/ecx_meth.c
+++ b/crypto/ec/ecx_meth.c
@@ -12,10 +12,10 @@
#include <openssl/x509.h>
#include <openssl/ec.h>
#include <openssl/rand.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
-#include "ec_lcl.h"
-#include "curve448/curve448_lcl.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
+#include "ec_local.h"
+#include "curve448/curve448_local.h"
#define X25519_BITS 253
#define X25519_SECURITY_BITS 128
diff --git a/crypto/engine/README b/crypto/engine/README
index c7a5696ca1..0f8a8fbde4 100644
--- a/crypto/engine/README
+++ b/crypto/engine/README
@@ -9,7 +9,7 @@ for masochists" document *and* a rather extensive commit log message. (I'd get
lynched for sticking all this in CHANGES or the commit mails :-).
ENGINE_TABLE underlies this restructuring, as described in the internal header
-"eng_int.h", implemented in eng_table.c, and used in each of the "class" files;
+"eng_local.h", implemented in eng_table.c, and used in each of the "class" files;
tb_rsa.c, tb_dsa.c, etc.
However, "EVP_CIPHER" underlies the motivation and design of ENGINE_TABLE so
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index af306ccffc..b675ed7892 100644
--- a/crypto/engine/eng_all.c
+++ b/crypto/engine/eng_all.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "eng_int.h"
+#include "eng_local.h"
void ENGINE_load_builtin_engines(void)
{
diff --git a/crypto/engine/eng_cnf.c b/crypto/engine/eng_cnf.c
index 6f0a066d06..df00df6acd 100644
--- a/crypto/engine/eng_cnf.c
+++ b/crypto/engine/eng_cnf.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
#include <openssl/conf.h>
/* #define ENGINE_CONF_DEBUG */
diff --git a/crypto/engine/eng_ctrl.c b/crypto/engine/eng_ctrl.c
index 3bc4aab16f..e65e78447b 100644
--- a/crypto/engine/eng_ctrl.c
+++ b/crypto/engine/eng_ctrl.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
/*
* When querying a ENGINE-specific control command's 'description', this
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
index a727c6f646..49e9ce1af3 100644
--- a/crypto/engine/eng_devcrypto.c
+++ b/crypto/engine/eng_devcrypto.c
@@ -22,7 +22,7 @@
#include <openssl/objects.h>
#include <crypto/cryptodev.h>
-#include "internal/engine.h"
+#include "crypto/engine.h"
/* #define ENGINE_DEVCRYPTO_DEBUG */
diff --git a/crypto/engine/eng_dyn.c b/crypto/engine/eng_dyn.c
index 843226c077..06e677290a 100644
--- a/crypto/engine/eng_dyn.c
+++ b/crypto/engine/eng_dyn.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
#include "internal/dso.h"
#include <openssl/crypto.h>
diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c
index 591fddc8e4..fe231a65f6 100644
--- a/crypto/engine/eng_fat.c
+++ b/crypto/engine/eng_fat.c
@@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
#include <openssl/conf.h>
int ENGINE_set_default(ENGINE *e, unsigned int flags)
diff --git a/crypto/engine/eng_init.c b/crypto/engine/eng_init.c
index 7c235fc472..6c9063f8f6 100644
--- a/crypto/engine/eng_init.c
+++ b/crypto/engine/eng_init.c
@@ -8,7 +8,7 @@
*/
#include "e_os.h"
-#include "eng_int.h"
+#include "eng_local.h"
/*
* Initialise a engine type for use (or up its functional reference count if
diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c
index d7f2026fac..b851ff6957 100644
--- a/crypto/engine/eng_lib.c
+++ b/crypto/engine/eng_lib.c
@@ -8,7 +8,7 @@
*/
#include "e_os.h"
-#include "eng_int.h"
+#include "eng_local.h"
#include <openssl/rand.h>
#include "internal/refcount.h"
diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c
index 45c339c541..1352fb7c96 100644
--- a/crypto/engine/eng_list.c
+++ b/crypto/engine/eng_list.c
@@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
/*
* The linked-list of pointers to engine types. engine_list_head incorporates
diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_local.h
similarity index 97%
rename from crypto/engine/eng_int.h
rename to crypto/engine/eng_local.h
index b95483341e..8ef7172b9f 100644
--- a/crypto/engine/eng_int.h
+++ b/crypto/engine/eng_local.h
@@ -8,11 +8,11 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_ENGINE_INT_H
-# define HEADER_ENGINE_INT_H
+#ifndef OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
+# define OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
# include "internal/cryptlib.h"
-# include "internal/engine.h"
+# include "crypto/engine.h"
# include "internal/thread_once.h"
# include "internal/refcount.h"
@@ -168,4 +168,4 @@ typedef struct st_engine_pile ENGINE_PILE;
DEFINE_LHASH_OF(ENGINE_PILE);
-#endif /* HEADER_ENGINE_INT_H */
+#endif /* OSSL_CRYPTO_ENGINE_ENG_LOCAL_H */
diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c
index d9b3067a13..baedc73284 100644
--- a/crypto/engine/eng_openssl.c
+++ b/crypto/engine/eng_openssl.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
-#include "internal/engine.h"
+#include "crypto/engine.h"
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
diff --git a/crypto/engine/eng_pkey.c b/crypto/engine/eng_pkey.c
index 305a648feb..e813bc6db0 100644
--- a/crypto/engine/eng_pkey.c
+++ b/crypto/engine/eng_pkey.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
/* Basic get/set stuff */
diff --git a/crypto/engine/eng_rdrand.c b/crypto/engine/eng_rdrand.c
index 261e5debbf..9dceb16710 100644
--- a/crypto/engine/eng_rdrand.c
+++ b/crypto/engine/eng_rdrand.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <string.h>
-#include "internal/engine.h"
+#include "crypto/engine.h"
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/crypto.h>
diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c
index ac4b02fc12..72f393dbe1 100644
--- a/crypto/engine/eng_table.c
+++ b/crypto/engine/eng_table.c
@@ -10,7 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/lhash.h>
-#include "eng_int.h"
+#include "eng_local.h"
/* The type of the items in the table */
struct st_engine_pile {
@@ -26,7 +26,7 @@ struct st_engine_pile {
int uptodate;
};
-/* The type exposed in eng_int.h */
+/* The type exposed in eng_local.h */
struct st_engine_table {
LHASH_OF(ENGINE_PILE) piles;
}; /* ENGINE_TABLE */
@@ -76,7 +76,7 @@ static int int_table_check(ENGINE_TABLE **t, int create)
}
/*
- * Privately exposed (via eng_int.h) functions for adding and/or removing
+ * Privately exposed (via eng_local.h) functions for adding and/or removing
* ENGINEs from the implementation table
*/
int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
diff --git a/crypto/engine/tb_asnmth.c b/crypto/engine/tb_asnmth.c
index 4bcc76136a..130b289fec 100644
--- a/crypto/engine/tb_asnmth.c
+++ b/crypto/engine/tb_asnmth.c
@@ -8,9 +8,9 @@
*/
#include "e_os.h"
-#include "eng_int.h"
+#include "eng_local.h"
#include <openssl/evp.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
/*
* If this symbol is defined then ENGINE_get_pkey_asn1_meth_engine(), the
diff --git a/crypto/engine/tb_cipher.c b/crypto/engine/tb_cipher.c
index faa967c475..236da346cd 100644
--- a/crypto/engine/tb_cipher.c
+++ b/crypto/engine/tb_cipher.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *cipher_table = NULL;
diff --git a/crypto/engine/tb_dh.c b/crypto/engine/tb_dh.c
index 785119f65a..a13a139500 100644
--- a/crypto/engine/tb_dh.c
+++ b/crypto/engine/tb_dh.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *dh_table = NULL;
static const int dummy_nid = 1;
diff --git a/crypto/engine/tb_digest.c b/crypto/engine/tb_digest.c
index d644b1b0a8..a6e6337a01 100644
--- a/crypto/engine/tb_digest.c
+++ b/crypto/engine/tb_digest.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *digest_table = NULL;
diff --git a/crypto/engine/tb_dsa.c b/crypto/engine/tb_dsa.c
index 65b6ea8d3a..2c77f0f3e1 100644
--- a/crypto/engine/tb_dsa.c
+++ b/crypto/engine/tb_dsa.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *dsa_table = NULL;
static const int dummy_nid = 1;
diff --git a/crypto/engine/tb_eckey.c b/crypto/engine/tb_eckey.c
index 1e50736854..907d55ae8c 100644
--- a/crypto/engine/tb_eckey.c
+++ b/crypto/engine/tb_eckey.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *dh_table = NULL;
static const int dummy_nid = 1;
diff --git a/crypto/engine/tb_pkmeth.c b/crypto/engine/tb_pkmeth.c
index 03cd1e69dd..c5c001c5cb 100644
--- a/crypto/engine/tb_pkmeth.c
+++ b/crypto/engine/tb_pkmeth.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
#include <openssl/evp.h>
static ENGINE_TABLE *pkey_meth_table = NULL;
diff --git a/crypto/engine/tb_rand.c b/crypto/engine/tb_rand.c
index 98a98073cd..92f61c5a88 100644
--- a/crypto/engine/tb_rand.c
+++ b/crypto/engine/tb_rand.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *rand_table = NULL;
static const int dummy_nid = 1;
diff --git a/crypto/engine/tb_rsa.c b/crypto/engine/tb_rsa.c
index d8d2e34f84..43e865e6d6 100644
--- a/crypto/engine/tb_rsa.c
+++ b/crypto/engine/tb_rsa.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "eng_int.h"
+#include "eng_local.h"
static ENGINE_TABLE *rsa_table = NULL;
static const int dummy_nid = 1;
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 3a58ccb958..1372d52f80 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -10,17 +10,17 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include "internal/err.h"
-#include "internal/err_int.h"
+#include "crypto/err.h"
#include <openssl/err.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/opensslconf.h>
#include "internal/thread_once.h"
-#include "internal/ctype.h"
-#include "internal/constant_time_locl.h"
+#include "crypto/ctype.h"
+#include "internal/constant_time.h"
#include "e_os.h"
static int err_load_strings(const ERR_STRING_DATA *str);
diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c
index d9ec04b606..7c0a5f0b9c 100644
--- a/crypto/err/err_all.c
+++ b/crypto/err/err_all.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/err_int.h"
+#include "crypto/err.h"
#include <openssl/asn1err.h>
#include <openssl/bnerr.h>
#include <openssl/ecerr.h>
diff --git a/crypto/err/openssl.ec b/crypto/err/openssl.ec
index 3e092eae0a..5976d1501f 100644
--- a/crypto/err/openssl.ec
+++ b/crypto/err/openssl.ec
@@ -32,15 +32,15 @@ L CMS include/openssl/cms.h crypto/cms/cms_err.c
L CT include/openssl/ct.h crypto/ct/ct_err.c
L ASYNC include/openssl/async.h crypto/async/async_err.c
L KDF include/openssl/kdf.h crypto/kdf/kdf_err.c
-L SM2 crypto/include/internal/sm2.h crypto/sm2/sm2_err.c
+L SM2 include/crypto/sm2.h crypto/sm2/sm2_err.c
L OSSL_STORE include/openssl/store.h crypto/store/store_err.c
# additional header files to be scanned for function names
L NONE include/openssl/x509_vfy.h NONE
-L NONE crypto/ec/ec_lcl.h NONE
-L NONE crypto/cms/cms_lcl.h NONE
-L NONE crypto/ct/ct_locl.h NONE
-L NONE ssl/ssl_locl.h NONE
+L NONE crypto/ec/ec_local.h NONE
+L NONE crypto/cms/cms_local.h NONE
+L NONE crypto/ct/ct_local.h NONE
+L NONE ssl/ssl_local.h NONE
# SSL/TLS alerts
R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c
index 288dee01b2..fed4cf1eb1 100644
--- a/crypto/evp/bio_md.c
+++ b/crypto/evp/bio_md.c
@@ -12,8 +12,8 @@
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
#include "internal/bio.h"
/*
diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c
index 300db6cd32..a77cfb1552 100644
--- a/crypto/evp/bio_ok.c
+++ b/crypto/evp/bio_ok.c
@@ -76,7 +76,7 @@
#include "internal/bio.h"
#include <openssl/evp.h>
#include <openssl/rand.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
static int ok_write(BIO *h, const char *buf, int num);
static int ok_read(BIO *h, char *buf, int size);
diff --git a/crypto/evp/c_allc.c b/crypto/evp/c_allc.c
index 086b3c4d51..22fdcc409c 100644
--- a/crypto/evp/c_allc.c
+++ b/crypto/evp/c_allc.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#include <openssl/pkcs12.h>
#include <openssl/objects.h>
diff --git a/crypto/evp/c_alld.c b/crypto/evp/c_alld.c
index 1267531a7d..16ac1b67f4 100644
--- a/crypto/evp/c_alld.c
+++ b/crypto/evp/c_alld.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#include <openssl/pkcs12.h>
#include <openssl/objects.h>
diff --git a/crypto/evp/cmeth_lib.c b/crypto/evp/cmeth_lib.c
index e2295c4dc5..272e48249e 100644
--- a/crypto/evp/cmeth_lib.c
+++ b/crypto/evp/cmeth_lib.c
@@ -10,8 +10,8 @@
#include <string.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len)
{
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 6693f270b6..d1bfa274ca 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -12,8 +12,8 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
/* This call frees resources associated with the context */
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index 1db346fc86..1ca2c312a3 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -14,10 +14,10 @@
#include <string.h>
#include <assert.h>
#include <openssl/aes.h>
-#include "internal/evp_int.h"
-#include "modes_lcl.h"
+#include "crypto/evp.h"
+#include "modes_local.h"
#include <openssl/rand.h>
-#include "evp_locl.h"
+#include "evp_local.h"
typedef struct {
union {
diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c
index 09d24dc3d0..c9f5969162 100644
--- a/crypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/crypto/evp/e_aes_cbc_hmac_sha1.c
@@ -17,9 +17,9 @@
#include <openssl/aes.h>
#include <openssl/sha.h>
#include <openssl/rand.h>
-#include "modes_lcl.h"
-#include "internal/evp_int.h"
-#include "internal/constant_time_locl.h"
+#include "modes_local.h"
+#include "crypto/evp.h"
+#include "internal/constant_time.h"
typedef struct {
AES_KEY ks;
diff --git a/crypto/evp/e_aes_cbc_hmac_sha256.c b/crypto/evp/e_aes_cbc_hmac_sha256.c
index caac0c9d3d..d5178313ae 100644
--- a/crypto/evp/e_aes_cbc_hmac_sha256.c
+++ b/crypto/evp/e_aes_cbc_hmac_sha256.c
@@ -18,9 +18,9 @@
#include <openssl/aes.h>
#include <openssl/sha.h>
#include <openssl/rand.h>
-#include "modes_lcl.h"
-#include "internal/constant_time_locl.h"
-#include "internal/evp_int.h"
+#include "modes_local.h"
+#include "internal/constant_time.h"
+#include "crypto/evp.h"
typedef struct {
AES_KEY ks;
diff --git a/crypto/evp/e_aria.c b/crypto/evp/e_aria.c
index fcaceb3bca..0bebbb6fc2 100644
--- a/crypto/evp/e_aria.c
+++ b/crypto/evp/e_aria.c
@@ -14,10 +14,10 @@
# include <openssl/modes.h>
# include <openssl/rand.h>
# include <openssl/rand_drbg.h>
-# include "internal/aria.h"
-# include "internal/evp_int.h"
-# include "modes_lcl.h"
-# include "evp_locl.h"
+# include "crypto/aria.h"
+# include "crypto/evp.h"
+# include "modes_local.h"
+# include "evp_local.h"
/* ARIA subkey Structure */
typedef struct {
diff --git a/crypto/evp/e_bf.c b/crypto/evp/e_bf.c
index dc386905c5..9a065582c6 100644
--- a/crypto/evp/e_bf.c
+++ b/crypto/evp/e_bf.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#ifndef OPENSSL_NO_BF
# include <openssl/evp.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/objects.h>
# include <openssl/blowfish.h>
diff --git a/crypto/evp/e_camellia.c b/crypto/evp/e_camellia.c
index 2df4a6e3e0..502d6936cc 100644
--- a/crypto/evp/e_camellia.c
+++ b/crypto/evp/e_camellia.c
@@ -17,8 +17,8 @@ NON_EMPTY_TRANSLATION_UNIT
# include <string.h>
# include <assert.h>
# include <openssl/camellia.h>
-# include "internal/evp_int.h"
-# include "modes_lcl.h"
+# include "crypto/evp.h"
+# include "modes_local.h"
static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_cast.c b/crypto/evp/e_cast.c
index 259d44059b..df9f445bd0 100644
--- a/crypto/evp/e_cast.c
+++ b/crypto/evp/e_cast.c
@@ -13,7 +13,7 @@
#ifndef OPENSSL_NO_CAST
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/cast.h>
static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index 435a38d365..bdc406bb69 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -14,9 +14,9 @@
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "evp_locl.h"
-# include "internal/evp_int.h"
-# include "internal/chacha.h"
+# include "evp_local.h"
+# include "crypto/evp.h"
+# include "crypto/chacha.h"
typedef struct {
union {
@@ -146,7 +146,7 @@ const EVP_CIPHER *EVP_chacha20(void)
}
# ifndef OPENSSL_NO_POLY1305
-# include "internal/poly1305.h"
+# include "crypto/poly1305.h"
typedef struct {
EVP_CHACHA_KEY key;
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c
index c13fb3e25a..6d6e919af6 100644
--- a/crypto/evp/e_des.c
+++ b/crypto/evp/e_des.c
@@ -12,7 +12,7 @@
#ifndef OPENSSL_NO_DES
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/des.h>
# include <openssl/rand.h>
diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c
index 6b492ce470..2a5597fee5 100644
--- a/crypto/evp/e_des3.c
+++ b/crypto/evp/e_des3.c
@@ -12,10 +12,10 @@
#ifndef OPENSSL_NO_DES
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/des.h>
# include <openssl/rand.h>
-# include "evp_locl.h"
+# include "evp_local.h"
typedef struct {
union {
diff --git a/crypto/evp/e_idea.c b/crypto/evp/e_idea.c
index 93f6a4131f..1068378ddc 100644
--- a/crypto/evp/e_idea.c
+++ b/crypto/evp/e_idea.c
@@ -13,7 +13,7 @@
#ifndef OPENSSL_NO_IDEA
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/idea.h>
/* Can't use IMPLEMENT_BLOCK_CIPHER because IDEA_ecb_encrypt is different */
diff --git a/crypto/evp/e_null.c b/crypto/evp/e_null.c
index 18a8468216..0725454a3a 100644
--- a/crypto/evp/e_null.c
+++ b/crypto/evp/e_null.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/objects.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_rc2.c b/crypto/evp/e_rc2.c
index aa0d140186..4d8a0ee4b0 100644
--- a/crypto/evp/e_rc2.c
+++ b/crypto/evp/e_rc2.c
@@ -14,7 +14,7 @@
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/rc2.h>
static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
diff --git a/crypto/evp/e_rc4.c b/crypto/evp/e_rc4.c
index d16abdd0d2..c24bc8fe59 100644
--- a/crypto/evp/e_rc4.c
+++ b/crypto/evp/e_rc4.c
@@ -16,7 +16,7 @@
# include <openssl/objects.h>
# include <openssl/rc4.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
typedef struct {
RC4_KEY ks; /* working key */
diff --git a/crypto/evp/e_rc4_hmac_md5.c b/crypto/evp/e_rc4_hmac_md5.c
index b1e8ccd6dd..201ce44343 100644
--- a/crypto/evp/e_rc4_hmac_md5.c
+++ b/crypto/evp/e_rc4_hmac_md5.c
@@ -19,7 +19,7 @@
# include <openssl/objects.h>
# include <openssl/rc4.h>
# include <openssl/md5.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
typedef struct {
RC4_KEY ks;
diff --git a/crypto/evp/e_rc5.c b/crypto/evp/e_rc5.c
index dc5589b688..c86e87b65a 100644
--- a/crypto/evp/e_rc5.c
+++ b/crypto/evp/e_rc5.c
@@ -13,9 +13,9 @@
#ifndef OPENSSL_NO_RC5
# include <openssl/evp.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/objects.h>
-# include "evp_locl.h"
+# include "evp_local.h"
# include <openssl/rc5.h>
static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
diff --git a/crypto/evp/e_seed.c b/crypto/evp/e_seed.c
index 40aec5fc6a..aeb2363bea 100644
--- a/crypto/evp/e_seed.c
+++ b/crypto/evp/e_seed.c
@@ -16,7 +16,7 @@ NON_EMPTY_TRANSLATION_UNIT
# include <string.h>
# include <assert.h>
# include <openssl/seed.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
diff --git a/crypto/evp/e_sm4.c b/crypto/evp/e_sm4.c
index 79deb65636..fce32794fc 100644
--- a/crypto/evp/e_sm4.c
+++ b/crypto/evp/e_sm4.c
@@ -13,8 +13,8 @@
#ifndef OPENSSL_NO_SM4
# include <openssl/evp.h>
# include <openssl/modes.h>
-# include "internal/sm4.h"
-# include "internal/evp_int.h"
+# include "crypto/sm4.h"
+# include "crypto/evp.h"
typedef struct {
SM4_KEY ks;
diff --git a/crypto/evp/e_xcbc_d.c b/crypto/evp/e_xcbc_d.c
index 57ce813da8..b730775422 100644
--- a/crypto/evp/e_xcbc_d.c
+++ b/crypto/evp/e_xcbc_d.c
@@ -14,7 +14,7 @@
# include <openssl/evp.h>
# include <openssl/objects.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/des.h>
static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c
index da32d4fd19..9307ff0464 100644
--- a/crypto/evp/encode.c
+++ b/crypto/evp/encode.c
@@ -11,8 +11,8 @@
#include <limits.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "evp_locl.h"
-#include "internal/evp_int.h"
+#include "evp_local.h"
+#include "crypto/evp.h"
static unsigned char conv_ascii2bin(unsigned char a,
const unsigned char *table);
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 05dd791b6c..08bd209dd8 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -15,8 +15,8 @@
#include <openssl/rand.h>
#include <openssl/rand_drbg.h>
#include <openssl/engine.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c)
{
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index 4935c2a94a..45cde0da8b 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -11,8 +11,8 @@
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/objects.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
{
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_local.h
similarity index 100%
rename from crypto/evp/evp_locl.h
rename to crypto/evp/evp_local.h
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c
index 5a88817b4a..967203f373 100644
--- a/crypto/evp/evp_pbe.c
+++ b/crypto/evp/evp_pbe.c
@@ -12,7 +12,7 @@
#include <openssl/evp.h>
#include <openssl/pkcs12.h>
#include <openssl/x509.h>
-#include "evp_locl.h"
+#include "evp_local.h"
/* Password based encryption (PBE) functions */
diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c
index e61a8761a9..586b74605c 100644
--- a/crypto/evp/evp_pkey.c
+++ b/crypto/evp/evp_pkey.c
@@ -12,9 +12,9 @@
#include "internal/cryptlib.h"
#include <openssl/x509.h>
#include <openssl/rand.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
-#include "internal/x509_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
+#include "crypto/x509.h"
/* Extract a private key from a PKCS8 structure */
diff --git a/crypto/evp/m_md2.c b/crypto/evp/m_md2.c
index c4e28ae17a..1aec518523 100644
--- a/crypto/evp/m_md2.c
+++ b/crypto/evp/m_md2.c
@@ -18,7 +18,7 @@
# include <openssl/md2.h>
# include <openssl/rsa.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_md4.c b/crypto/evp/m_md4.c
index 0efc586dba..45d2cafee1 100644
--- a/crypto/evp/m_md4.c
+++ b/crypto/evp/m_md4.c
@@ -17,7 +17,7 @@
# include <openssl/x509.h>
# include <openssl/md4.h>
# include <openssl/rsa.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c
index 3d96ae93b6..d26b5a4d31 100644
--- a/crypto/evp/m_md5.c
+++ b/crypto/evp/m_md5.c
@@ -17,7 +17,7 @@
# include <openssl/x509.h>
# include <openssl/md5.h>
# include <openssl/rsa.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_md5_sha1.c b/crypto/evp/m_md5_sha1.c
index 2d98886ba0..eeec2b13e9 100644
--- a/crypto/evp/m_md5_sha1.c
+++ b/crypto/evp/m_md5_sha1.c
@@ -15,7 +15,7 @@
# include <openssl/md5.h>
# include <openssl/sha.h>
# include "internal/cryptlib.h"
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/rsa.h>
struct md5_sha1_ctx {
diff --git a/crypto/evp/m_mdc2.c b/crypto/evp/m_mdc2.c
index 1051a9070f..fffa751efd 100644
--- a/crypto/evp/m_mdc2.c
+++ b/crypto/evp/m_mdc2.c
@@ -17,7 +17,7 @@
# include <openssl/x509.h>
# include <openssl/mdc2.h>
# include <openssl/rsa.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_null.c b/crypto/evp/m_null.c
index 5dce1d510e..0847139df1 100644
--- a/crypto/evp/m_null.c
+++ b/crypto/evp/m_null.c
@@ -12,7 +12,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_ripemd.c b/crypto/evp/m_ripemd.c
index 7ab320843c..d93ad24fe5 100644
--- a/crypto/evp/m_ripemd.c
+++ b/crypto/evp/m_ripemd.c
@@ -17,7 +17,7 @@
# include <openssl/objects.h>
# include <openssl/x509.h>
# include <openssl/rsa.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_sha1.c b/crypto/evp/m_sha1.c
index ac52417855..22b9bbc7d8 100644
--- a/crypto/evp/m_sha1.c
+++ b/crypto/evp/m_sha1.c
@@ -14,8 +14,8 @@
#include <openssl/objects.h>
#include <openssl/sha.h>
#include <openssl/rsa.h>
-#include "internal/evp_int.h"
-#include "internal/sha.h"
+#include "crypto/evp.h"
+#include "crypto/sha.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/m_sha3.c b/crypto/evp/m_sha3.c
index 01cf57d313..54c592a3cc 100644
--- a/crypto/evp/m_sha3.c
+++ b/crypto/evp/m_sha3.c
@@ -12,8 +12,8 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
size_t SHA3_absorb(uint64_t A[5][5], const unsigned char *inp, size_t len,
size_t r);
diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c
index 94e37f02b2..04643acc88 100644
--- a/crypto/evp/m_sigver.c
+++ b/crypto/evp/m_sigver.c
@@ -12,8 +12,8 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/evp_int.h"
-#include "evp_locl.h"
+#include "crypto/evp.h"
+#include "evp_local.h"
static int update(EVP_MD_CTX *ctx, const void *data, size_t datalen)
{
diff --git a/crypto/evp/m_wp.c b/crypto/evp/m_wp.c
index 27e2b3c5ca..5ce15d2d5e 100644
--- a/crypto/evp/m_wp.c
+++ b/crypto/evp/m_wp.c
@@ -16,7 +16,7 @@
# include <openssl/objects.h>
# include <openssl/x509.h>
# include <openssl/whrlpool.h>
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/evp/names.c b/crypto/evp/names.c
index 077c2a6c4b..90c7b73b7a 100644
--- a/crypto/evp/names.c
+++ b/crypto/evp/names.c
@@ -10,9 +10,9 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/objects.h"
+#include "crypto/objects.h"
#include <openssl/x509.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
int EVP_add_cipher(const EVP_CIPHER *c)
{
diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c
index e819eb9b47..7f625b3d57 100644
--- a/crypto/evp/p5_crpt2.c
+++ b/crypto/evp/p5_crpt2.c
@@ -13,7 +13,7 @@
# include <openssl/x509.h>
# include <openssl/evp.h>
# include <openssl/hmac.h>
-# include "evp_locl.h"
+# include "evp_local.h"
/* set this to print out info about the keygen algorithm */
/* #define OPENSSL_DEBUG_PKCS5V2 */
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 3cd7ca8d54..e57fa9e289 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -21,8 +21,8 @@
#include <openssl/cmac.h>
#include <openssl/engine.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
static void EVP_PKEY_free_it(EVP_PKEY *x);
diff --git a/crypto/evp/p_sign.c b/crypto/evp/p_sign.c
index 6cb442e4f9..0383294a87 100644
--- a/crypto/evp/p_sign.c
+++ b/crypto/evp/p_sign.c
@@ -12,7 +12,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
unsigned int *siglen, EVP_PKEY *pkey)
diff --git a/crypto/evp/p_verify.c b/crypto/evp/p_verify.c
index 6e8c565dfd..e27196f7c2 100644
--- a/crypto/evp/p_verify.c
+++ b/crypto/evp/p_verify.c
@@ -12,7 +12,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
unsigned int siglen, EVP_PKEY *pkey)
diff --git a/crypto/evp/pmeth_fn.c b/crypto/evp/pmeth_fn.c
index de1c07e171..02f4093461 100644
--- a/crypto/evp/pmeth_fn.c
+++ b/crypto/evp/pmeth_fn.c
@@ -12,7 +12,7 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#define M_check_autoarg(ctx, arg, arglen, err) \
if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) { \
diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c
index e14965f333..3ad6d5c7c7 100644
--- a/crypto/evp/pmeth_gn.c
+++ b/crypto/evp/pmeth_gn.c
@@ -12,9 +12,9 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/evp.h>
-#include "internal/bn_int.h"
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/bn.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx)
{
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 7fbf895e07..d44063de53 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -13,8 +13,8 @@
#include <openssl/engine.h>
#include <openssl/evp.h>
#include <openssl/x509v3.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
#include "internal/numbers.h"
typedef int sk_cmp_fn_type(const char *const *a, const char *const *b);
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 08dc7c4073..22f3b70edf 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include "internal/thread_once.h"
/*
diff --git a/crypto/hmac/hm_ameth.c b/crypto/hmac/hm_ameth.c
index fa204e9068..638f61b586 100644
--- a/crypto/hmac/hm_ameth.c
+++ b/crypto/hmac/hm_ameth.c
@@ -10,8 +10,8 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
/*
* HMAC "ASN1" method. This is just here to indicate the maximum HMAC output
diff --git a/crypto/hmac/hm_pmeth.c b/crypto/hmac/hm_pmeth.c
index 55dd27d63b..56f98707f5 100644
--- a/crypto/hmac/hm_pmeth.c
+++ b/crypto/hmac/hm_pmeth.c
@@ -14,7 +14,7 @@
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/err.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* HMAC pkey context structure */
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 0c0a7133fb..51dd91237c 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -13,7 +13,7 @@
#include "internal/cryptlib.h"
#include <openssl/hmac.h>
#include <openssl/opensslconf.h>
-#include "hmac_lcl.h"
+#include "hmac_local.h"
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl)
diff --git a/crypto/hmac/hmac_lcl.h b/crypto/hmac/hmac_local.h
similarity index 90%
rename from crypto/hmac/hmac_lcl.h
rename to crypto/hmac/hmac_local.h
index 8fd8345694..ed855e89a4 100644
--- a/crypto/hmac/hmac_lcl.h
+++ b/crypto/hmac/hmac_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_HMAC_LCL_H
-# define HEADER_HMAC_LCL_H
+#ifndef OSSL_CRYPTO_HMAC_LOCAL_H
+# define OSSL_CRYPTO_HMAC_LOCAL_H
/* The current largest case is for SHA3-224 */
#define HMAC_MAX_MD_CBLOCK_SIZE 144
diff --git a/crypto/idea/i_cbc.c b/crypto/idea/i_cbc.c
index a70a8682a7..4eff467111 100644
--- a/crypto/idea/i_cbc.c
+++ b/crypto/idea/i_cbc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/idea.h>
-#include "idea_lcl.h"
+#include "idea_local.h"
void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out,
long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
diff --git a/crypto/idea/i_cfb64.c b/crypto/idea/i_cfb64.c
index daf467eb5c..61c723015b 100644
--- a/crypto/idea/i_cfb64.c
+++ b/crypto/idea/i_cfb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/idea.h>
-#include "idea_lcl.h"
+#include "idea_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/idea/i_ecb.c b/crypto/idea/i_ecb.c
index 058d0c14c0..cb724e1a6c 100644
--- a/crypto/idea/i_ecb.c
+++ b/crypto/idea/i_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/idea.h>
-#include "idea_lcl.h"
+#include "idea_local.h"
#include <openssl/opensslv.h>
const char *IDEA_options(void)
diff --git a/crypto/idea/i_ofb64.c b/crypto/idea/i_ofb64.c
index 997a7b88ed..f000ced586 100644
--- a/crypto/idea/i_ofb64.c
+++ b/crypto/idea/i_ofb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/idea.h>
-#include "idea_lcl.h"
+#include "idea_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/idea/i_skey.c b/crypto/idea/i_skey.c
index 9d9145580f..230338d7e3 100644
--- a/crypto/idea/i_skey.c
+++ b/crypto/idea/i_skey.c
@@ -8,7 +8,7 @@
*/
#include <openssl/idea.h>
-#include "idea_lcl.h"
+#include "idea_local.h"
static IDEA_INT inverse(unsigned int xin);
void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks)
diff --git a/crypto/idea/idea_lcl.h b/crypto/idea/idea_local.h
similarity index 100%
rename from crypto/idea/idea_lcl.h
rename to crypto/idea/idea_local.h
diff --git a/crypto/include/internal/store.h b/crypto/include/internal/store.h
deleted file mode 100644
index f5013dc367..0000000000
--- a/crypto/include/internal/store.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Copyright 2016 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
- */
-
-void ossl_store_cleanup_int(void);
diff --git a/crypto/init.c b/crypto/init.c
index 9fc0e8ef68..1b0d523bea 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -8,25 +8,25 @@
*/
#include "e_os.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include <openssl/err.h>
-#include "internal/rand_int.h"
+#include "crypto/rand.h"
#include "internal/bio.h"
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#include "internal/conf.h"
-#include "internal/async.h"
-#include "internal/engine.h"
+#include "crypto/async.h"
+#include "crypto/engine.h"
#include "internal/comp.h"
#include "internal/err.h"
-#include "internal/err_int.h"
-#include "internal/objects.h"
+#include "crypto/err.h"
+#include "crypto/objects.h"
#include <stdlib.h>
#include <assert.h>
#include "internal/thread_once.h"
-#include "internal/dso_conf.h"
+#include "crypto/dso_conf.h"
#include "internal/dso.h"
-#include "internal/store.h"
+#include "crypto/store.h"
static int stopped = 0;
diff --git a/crypto/kdf/hkdf.c b/crypto/kdf/hkdf.c
index ae46fad609..25bf4b729f 100644
--- a/crypto/kdf/hkdf.c
+++ b/crypto/kdf/hkdf.c
@@ -13,7 +13,7 @@
#include <openssl/kdf.h>
#include <openssl/evp.h>
#include "internal/cryptlib.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#define HKDF_MAXBUF 1024
diff --git a/crypto/kdf/scrypt.c b/crypto/kdf/scrypt.c
index 61fd390e95..68606ac00a 100644
--- a/crypto/kdf/scrypt.c
+++ b/crypto/kdf/scrypt.c
@@ -13,7 +13,7 @@
#include <openssl/kdf.h>
#include <openssl/evp.h>
#include "internal/cryptlib.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
#ifndef OPENSSL_NO_SCRYPT
diff --git a/crypto/kdf/tls1_prf.c b/crypto/kdf/tls1_prf.c
index 49f7ecced9..e9ca8e1278 100644
--- a/crypto/kdf/tls1_prf.c
+++ b/crypto/kdf/tls1_prf.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/kdf.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
static int tls1_prf_alg(const EVP_MD *md,
const unsigned char *sec, size_t slen,
diff --git a/crypto/lhash/lh_stats.c b/crypto/lhash/lh_stats.c
index 65b91e1ef4..45f1b10555 100644
--- a/crypto/lhash/lh_stats.c
+++ b/crypto/lhash/lh_stats.c
@@ -18,7 +18,7 @@
#include <openssl/bio.h>
#include <openssl/lhash.h>
-#include "lhash_lcl.h"
+#include "lhash_local.h"
# ifndef OPENSSL_NO_STDIO
void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp)
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c
index 485d4c3fff..9dc887d91e 100644
--- a/crypto/lhash/lhash.c
+++ b/crypto/lhash/lhash.c
@@ -13,9 +13,9 @@
#include <openssl/crypto.h>
#include <openssl/lhash.h>
#include <openssl/err.h>
-#include "internal/ctype.h"
-#include "internal/lhash.h"
-#include "lhash_lcl.h"
+#include "crypto/ctype.h"
+#include "crypto/lhash.h"
+#include "lhash_local.h"
/*
* A hashing implementation that appears to be based on the linear hashing
diff --git a/crypto/lhash/lhash_lcl.h b/crypto/lhash/lhash_local.h
similarity index 100%
rename from crypto/lhash/lhash_lcl.h
rename to crypto/lhash/lhash_local.h
diff --git a/crypto/md4/md4_dgst.c b/crypto/md4/md4_dgst.c
index 5319618615..29b6b252ba 100644
--- a/crypto/md4/md4_dgst.c
+++ b/crypto/md4/md4_dgst.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <openssl/opensslv.h>
-#include "md4_locl.h"
+#include "md4_local.h"
/*
* Implemented from RFC1186 The MD4 Message-Digest Algorithm
@@ -39,7 +39,7 @@ void md4_block_data_order(MD4_CTX *c, const void *data_, size_t num)
const unsigned char *data = data_;
register unsigned MD32_REG_T A, B, C, D, l;
# ifndef MD32_XARRAY
- /* See comment in crypto/sha/sha_locl.h for details. */
+ /* See comment in crypto/sha/sha_local.h for details. */
unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
# define X(i) XX##i
diff --git a/crypto/md4/md4_locl.h b/crypto/md4/md4_local.h
similarity index 98%
rename from crypto/md4/md4_locl.h
rename to crypto/md4/md4_local.h
index a6c4003fdb..391fee8869 100644
--- a/crypto/md4/md4_locl.h
+++ b/crypto/md4/md4_local.h
@@ -31,7 +31,7 @@ void md4_block_data_order(MD4_CTX *c, const void *p, size_t num);
} while (0)
#define HASH_BLOCK_DATA_ORDER md4_block_data_order
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
/*-
#define F(x,y,z) (((x) & (y)) | ((~(x)) & (z)))
diff --git a/crypto/md5/md5_dgst.c b/crypto/md5/md5_dgst.c
index fbede6742a..d84cba37ae 100644
--- a/crypto/md5/md5_dgst.c
+++ b/crypto/md5/md5_dgst.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "md5_locl.h"
+#include "md5_local.h"
#include <openssl/opensslv.h>
/*
@@ -39,7 +39,7 @@ void md5_block_data_order(MD5_CTX *c, const void *data_, size_t num)
const unsigned char *data = data_;
register unsigned MD32_REG_T A, B, C, D, l;
# ifndef MD32_XARRAY
- /* See comment in crypto/sha/sha_locl.h for details. */
+ /* See comment in crypto/sha/sha_local.h for details. */
unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
# define X(i) XX##i
diff --git a/crypto/md5/md5_locl.h b/crypto/md5/md5_local.h
similarity index 98%
rename from crypto/md5/md5_locl.h
rename to crypto/md5/md5_local.h
index 4eb7e50ef4..9e537ed15b 100644
--- a/crypto/md5/md5_locl.h
+++ b/crypto/md5/md5_local.h
@@ -42,7 +42,7 @@ void md5_block_data_order(MD5_CTX *c, const void *p, size_t num);
} while (0)
#define HASH_BLOCK_DATA_ORDER md5_block_data_order
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
/*-
#define F(x,y,z) (((x) & (y)) | ((~(x)) & (z)))
diff --git a/crypto/mem.c b/crypto/mem.c
index 780053ffef..2b39ca3a10 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -9,7 +9,7 @@
#include "e_os.h"
#include "internal/cryptlib.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
diff --git a/crypto/mips_arch.h b/crypto/mips_arch.h
index e18ac07210..4ae1a1a933 100644
--- a/crypto/mips_arch.h
+++ b/crypto/mips_arch.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef __MIPS_ARCH_H__
-# define __MIPS_ARCH_H__
+#ifndef OSSL_CRYPTO_MIPS_ARCH_H
+# define OSSL_CRYPTO_MIPS_ARCH_H
# if (defined(__mips_smartmips) || defined(_MIPS_ARCH_MIPS32R3) || \
defined(_MIPS_ARCH_MIPS32R5) || defined(_MIPS_ARCH_MIPS32R6)) \
diff --git a/crypto/modes/cbc128.c b/crypto/modes/cbc128.c
index 4ce5eb2ae3..fc7e0b6051 100644
--- a/crypto/modes/cbc128.c
+++ b/crypto/modes/cbc128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
#if !defined(STRICT_ALIGNMENT) && !defined(PEDANTIC)
diff --git a/crypto/modes/ccm128.c b/crypto/modes/ccm128.c
index 05a33239f5..424722811c 100644
--- a/crypto/modes/ccm128.c
+++ b/crypto/modes/ccm128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
/*
diff --git a/crypto/modes/cfb128.c b/crypto/modes/cfb128.c
index e439567fe5..b6bec414a9 100644
--- a/crypto/modes/cfb128.c
+++ b/crypto/modes/cfb128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
/*
diff --git a/crypto/modes/ctr128.c b/crypto/modes/ctr128.c
index 03920b4473..ae35116e95 100644
--- a/crypto/modes/ctr128.c
+++ b/crypto/modes/ctr128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
/*
diff --git a/crypto/modes/cts128.c b/crypto/modes/cts128.c
index 93826a1e2f..9052e85776 100644
--- a/crypto/modes/cts128.c
+++ b/crypto/modes/cts128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
/*
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 15f76e3e86..48775e6d05 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
#if defined(BSWAP4) && defined(STRICT_ALIGNMENT)
diff --git a/crypto/modes/modes_lcl.h b/crypto/modes/modes_local.h
similarity index 100%
rename from crypto/modes/modes_lcl.h
rename to crypto/modes/modes_local.h
diff --git a/crypto/modes/ocb128.c b/crypto/modes/ocb128.c
index 713b9aaf19..b39a55a1a1 100644
--- a/crypto/modes/ocb128.c
+++ b/crypto/modes/ocb128.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#ifndef OPENSSL_NO_OCB
diff --git a/crypto/modes/ofb128.c b/crypto/modes/ofb128.c
index 83092564c6..44bdf888db 100644
--- a/crypto/modes/ofb128.c
+++ b/crypto/modes/ofb128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
/*
diff --git a/crypto/modes/xts128.c b/crypto/modes/xts128.c
index 81b1eacd59..b5bda5e640 100644
--- a/crypto/modes/xts128.c
+++ b/crypto/modes/xts128.c
@@ -8,7 +8,7 @@
*/
#include <openssl/crypto.h>
-#include "modes_lcl.h"
+#include "modes_local.h"
#include <string.h>
int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx,
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c
index c4355370cb..979d83577c 100644
--- a/crypto/objects/o_names.c
+++ b/crypto/objects/o_names.c
@@ -17,8 +17,8 @@
#include <openssl/safestack.h>
#include <openssl/e_os2.h>
#include "internal/thread_once.h"
-#include "internal/lhash.h"
-#include "obj_lcl.h"
+#include "crypto/lhash.h"
+#include "obj_local.h"
#include "e_os.h"
/*
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index ef2d1e0dda..46006fe6cf 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -8,15 +8,15 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <limits.h>
#include "internal/cryptlib.h"
#include <openssl/lhash.h>
#include <openssl/asn1.h>
-#include "internal/objects.h"
+#include "crypto/objects.h"
#include <openssl/bn.h>
-#include "internal/asn1_int.h"
-#include "obj_lcl.h"
+#include "crypto/asn1.h"
+#include "obj_local.h"
/* obj_dat.h is generated from objects.h by obj_dat.pl */
#include "obj_dat.h"
diff --git a/crypto/objects/obj_lib.c b/crypto/objects/obj_lib.c
index acbdeec2c9..456a1598ce 100644
--- a/crypto/objects/obj_lib.c
+++ b/crypto/objects/obj_lib.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o)
{
diff --git a/crypto/objects/obj_lcl.h b/crypto/objects/obj_local.h
similarity index 100%
rename from crypto/objects/obj_lcl.h
rename to crypto/objects/obj_local.h
diff --git a/crypto/ocsp/ocsp_asn.c b/crypto/ocsp/ocsp_asn.c
index 1e0b82797b..a869e32bc8 100644
--- a/crypto/ocsp/ocsp_asn.c
+++ b/crypto/ocsp/ocsp_asn.c
@@ -10,7 +10,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
ASN1_SEQUENCE(OCSP_SIGNATURE) = {
ASN1_EMBED(OCSP_SIGNATURE, signatureAlgorithm, X509_ALGOR),
diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c
index 739ac01807..55ffd45c6e 100644
--- a/crypto/ocsp/ocsp_cl.c
+++ b/crypto/ocsp/ocsp_cl.c
@@ -16,7 +16,7 @@
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
/*
* Utility functions related to sending OCSP requests and extracting relevant
diff --git a/crypto/ocsp/ocsp_ext.c b/crypto/ocsp/ocsp_ext.c
index 3ab5308a12..f6c387ffb7 100644
--- a/crypto/ocsp/ocsp_ext.c
+++ b/crypto/ocsp/ocsp_ext.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
#include <openssl/rand.h>
#include <openssl/x509v3.h>
diff --git a/crypto/ocsp/ocsp_ht.c b/crypto/ocsp/ocsp_ht.c
index 42c3686431..ba408bc86f 100644
--- a/crypto/ocsp/ocsp_ht.c
+++ b/crypto/ocsp/ocsp_ht.c
@@ -10,7 +10,7 @@
#include "e_os.h"
#include <stdio.h>
#include <stdlib.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <string.h>
#include <openssl/asn1.h>
#include <openssl/ocsp.h>
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c
index b8b91cc9eb..37ac6c03fd 100644
--- a/crypto/ocsp/ocsp_lib.c
+++ b/crypto/ocsp/ocsp_lib.c
@@ -14,7 +14,7 @@
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
#include <openssl/asn1t.h>
/* Convert a certificate and its issuer to an OCSP_CERTID */
diff --git a/crypto/ocsp/ocsp_lcl.h b/crypto/ocsp/ocsp_local.h
similarity index 100%
rename from crypto/ocsp/ocsp_lcl.h
rename to crypto/ocsp/ocsp_local.h
diff --git a/crypto/ocsp/ocsp_prn.c b/crypto/ocsp/ocsp_prn.c
index 5605812ef7..1965f2a183 100644
--- a/crypto/ocsp/ocsp_prn.c
+++ b/crypto/ocsp/ocsp_prn.c
@@ -10,7 +10,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
#include "internal/cryptlib.h"
#include <openssl/pem.h>
diff --git a/crypto/ocsp/ocsp_srv.c b/crypto/ocsp/ocsp_srv.c
index 6bd6f7b6d8..e35fc52fd9 100644
--- a/crypto/ocsp/ocsp_srv.c
+++ b/crypto/ocsp/ocsp_srv.c
@@ -14,7 +14,7 @@
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
/*
* Utility functions related to sending OCSP responses and extracting
diff --git a/crypto/ocsp/ocsp_vfy.c b/crypto/ocsp/ocsp_vfy.c
index 9a8d343866..e87b71c0c7 100644
--- a/crypto/ocsp/ocsp_vfy.c
+++ b/crypto/ocsp/ocsp_vfy.c
@@ -8,7 +8,7 @@
*/
#include <openssl/ocsp.h>
-#include "ocsp_lcl.h"
+#include "ocsp_local.h"
#include <openssl/err.h>
#include <string.h>
diff --git a/crypto/ocsp/v3_ocsp.c b/crypto/ocsp/v3_ocsp.c
index 2d425a8951..a174ce15a6 100644
--- a/crypto/ocsp/v3_ocsp.c
+++ b/crypto/ocsp/v3_ocsp.c
@@ -12,7 +12,7 @@
# include <openssl/conf.h>
# include <openssl/asn1.h>
# include <openssl/ocsp.h>
-# include "ocsp_lcl.h"
+# include "ocsp_local.h"
# include <openssl/x509v3.h>
# include "../x509v3/ext_dat.h"
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index 4bb86463fa..64baf7108e 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <string.h>
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
@@ -18,7 +18,7 @@
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/pkcs12.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#include <openssl/des.h>
#include <openssl/engine.h>
diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c
index aa032d2b1c..e58cdf4a3e 100644
--- a/crypto/pem/pem_pkey.c
+++ b/crypto/pem/pem_pkey.c
@@ -17,8 +17,8 @@
#include <openssl/pem.h>
#include <openssl/engine.h>
#include <openssl/dh.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
int pem_check_suffix(const char *pem_str, const char *suffix);
diff --git a/crypto/pkcs12/p12_add.c b/crypto/pkcs12/p12_add.c
index 193ed8097d..af184c86af 100644
--- a/crypto/pkcs12/p12_add.c
+++ b/crypto/pkcs12/p12_add.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
/* Pack an object into an OCTET STRING and turn into a safebag */
diff --git a/crypto/pkcs12/p12_asn.c b/crypto/pkcs12/p12_asn.c
index 422dfc398f..88f145890c 100644
--- a/crypto/pkcs12/p12_asn.c
+++ b/crypto/pkcs12/p12_asn.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
/* PKCS#12 ASN1 module */
diff --git a/crypto/pkcs12/p12_attr.c b/crypto/pkcs12/p12_attr.c
index c324f50514..a958fdf346 100644
--- a/crypto/pkcs12/p12_attr.c
+++ b/crypto/pkcs12/p12_attr.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
/* Add a local keyid to a safebag */
diff --git a/crypto/pkcs12/p12_crt.c b/crypto/pkcs12/p12_crt.c
index 10cf8dd589..d43dc3b30c 100644
--- a/crypto/pkcs12/p12_crt.c
+++ b/crypto/pkcs12/p12_crt.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags,
PKCS12_SAFEBAG *bag);
diff --git a/crypto/pkcs12/p12_init.c b/crypto/pkcs12/p12_init.c
index 88db0f2dc4..7ecc29ec0c 100644
--- a/crypto/pkcs12/p12_init.c
+++ b/crypto/pkcs12/p12_init.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
/* Initialise a PKCS12 structure to take data */
diff --git a/crypto/pkcs12/p12_lcl.h b/crypto/pkcs12/p12_local.h
similarity index 100%
rename from crypto/pkcs12/p12_lcl.h
rename to crypto/pkcs12/p12_local.h
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c
index 0cbbed364a..3658003fe5 100644
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -13,7 +13,7 @@
#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
int PKCS12_mac_present(const PKCS12 *p12)
{
diff --git a/crypto/pkcs12/p12_npas.c b/crypto/pkcs12/p12_npas.c
index 0ce75ed330..0334289a89 100644
--- a/crypto/pkcs12/p12_npas.c
+++ b/crypto/pkcs12/p12_npas.c
@@ -13,7 +13,7 @@
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
/* PKCS#12 password change routine */
diff --git a/crypto/pkcs12/p12_p8e.c b/crypto/pkcs12/p12_p8e.c
index 86a07e1335..05fc388a99 100644
--- a/crypto/pkcs12/p12_p8e.c
+++ b/crypto/pkcs12/p12_p8e.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,
const char *pass, int passlen,
diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c
index a09c5b9313..7cf522786b 100644
--- a/crypto/pkcs12/p12_sbag.c
+++ b/crypto/pkcs12/p12_sbag.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
-#include "p12_lcl.h"
+#include "p12_local.h"
#if OPENSSL_API_COMPAT < 0x10100000L
ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid)
diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c
index 16b76431d1..ec4d9abd58 100644
--- a/crypto/pkcs7/pk7_lib.c
+++ b/crypto/pkcs7/pk7_lib.c
@@ -11,8 +11,8 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg)
{
diff --git a/crypto/poly1305/poly1305.c b/crypto/poly1305/poly1305.c
index 1d182364ae..e7f5b92c8f 100644
--- a/crypto/poly1305/poly1305.c
+++ b/crypto/poly1305/poly1305.c
@@ -11,7 +11,7 @@
#include <string.h>
#include <openssl/crypto.h>
-#include "internal/poly1305.h"
+#include "crypto/poly1305.h"
#include "poly1305_local.h"
size_t Poly1305_ctx_size(void)
@@ -89,7 +89,7 @@ static void
poly1305_blocks(void *ctx, const unsigned char *inp, size_t len, u32 padbit);
/*
- * Type-agnostic "rip-off" from constant_time_locl.h
+ * Type-agnostic "rip-off" from constant_time.h
*/
# define CONSTANT_TIME_CARRY(a,b) ( \
(a ^ ((a ^ b) | ((a - b) ^ b))) >> (sizeof(a) * 8 - 1) \
diff --git a/crypto/poly1305/poly1305_ameth.c b/crypto/poly1305/poly1305_ameth.c
index 033ee8cd96..0c8a91dc79 100644
--- a/crypto/poly1305/poly1305_ameth.c
+++ b/crypto/poly1305/poly1305_ameth.c
@@ -10,10 +10,10 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/asn1_int.h"
-#include "internal/poly1305.h"
+#include "crypto/asn1.h"
+#include "crypto/poly1305.h"
#include "poly1305_local.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/*
* POLY1305 "ASN1" method. This is just here to indicate the maximum
diff --git a/crypto/poly1305/poly1305_pmeth.c b/crypto/poly1305/poly1305_pmeth.c
index 3bc24c98cd..49a799a12f 100644
--- a/crypto/poly1305/poly1305_pmeth.c
+++ b/crypto/poly1305/poly1305_pmeth.c
@@ -13,9 +13,9 @@
#include <openssl/x509v3.h>
#include <openssl/evp.h>
#include <openssl/err.h>
-#include "internal/poly1305.h"
+#include "crypto/poly1305.h"
#include "poly1305_local.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* POLY1305 pkey context structure */
diff --git a/crypto/ppc_arch.h b/crypto/ppc_arch.h
index 72bd746874..e3845e9394 100644
--- a/crypto/ppc_arch.h
+++ b/crypto/ppc_arch.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_PPC_ARCH_H
-# define HEADER_PPC_ARCH_H
+#ifndef OSSL_CRYPTO_PPC_ARCH_H
+# define OSSL_CRYPTO_PPC_ARCH_H
extern unsigned int OPENSSL_ppccap_P;
diff --git a/crypto/ppccap.c b/crypto/ppccap.c
index a59485207b..b12cd949cc 100644
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -29,8 +29,8 @@
#include <openssl/crypto.h>
#include <openssl/bn.h>
#include <internal/cryptlib.h>
-#include <internal/chacha.h>
-#include "bn/bn_lcl.h"
+#include <crypto/chacha.h>
+#include "bn/bn_local.h"
#include "ppc_arch.h"
diff --git a/crypto/rand/drbg_ctr.c b/crypto/rand/drbg_ctr.c
index a243361b56..93b82f34ce 100644
--- a/crypto/rand/drbg_ctr.c
+++ b/crypto/rand/drbg_ctr.c
@@ -14,7 +14,7 @@
#include <openssl/rand.h>
#include "internal/thread_once.h"
#include "internal/thread_once.h"
-#include "rand_lcl.h"
+#include "rand_local.h"
/*
* Implementation of NIST SP 800-90A CTR DRBG.
*/
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index 12bb627a04..3af1d557c1 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -11,10 +11,10 @@
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#include "rand_lcl.h"
+#include "rand_local.h"
#include "internal/thread_once.h"
-#include "internal/rand_int.h"
-#include "internal/cryptlib_int.h"
+#include "crypto/rand.h"
+#include "crypto/cryptlib.h"
/*
* Support framework for NIST SP 800-90A DRBG
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 91b2652311..4a2e8826b8 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -11,10 +11,10 @@
#include <time.h>
#include "internal/cryptlib.h"
#include <openssl/opensslconf.h>
-#include "internal/rand_int.h"
+#include "crypto/rand.h"
#include <openssl/engine.h>
#include "internal/thread_once.h"
-#include "rand_lcl.h"
+#include "rand_local.h"
#include "e_os.h"
#ifndef OPENSSL_NO_ENGINE
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_local.h
similarity index 99%
rename from crypto/rand/rand_lcl.h
rename to crypto/rand/rand_local.h
index 306c59f6ef..96fa3cabce 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_RAND_LCL_H
-# define HEADER_RAND_LCL_H
+#ifndef OSSL_CRYPTO_RAND_LOCAL_H
+# define OSSL_CRYPTO_RAND_LOCAL_H
# include <openssl/aes.h>
# include <openssl/evp.h>
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 69efcdeed7..2997d3ee62 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -15,8 +15,8 @@
#include "internal/cryptlib.h"
#include <openssl/rand.h>
#include <openssl/crypto.h>
-#include "rand_lcl.h"
-#include "internal/rand_int.h"
+#include "rand_local.h"
+#include "crypto/rand.h"
#include <stdio.h>
#include "internal/dso.h"
#ifdef __linux
diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c
index e1e1c0b9db..c0581ce6db 100644
--- a/crypto/rand/rand_vms.c
+++ b/crypto/rand/rand_vms.c
@@ -14,8 +14,8 @@
# include <unistd.h>
# include "internal/cryptlib.h"
# include <openssl/rand.h>
-# include "internal/rand_int.h"
-# include "rand_lcl.h"
+# include "crypto/rand.h"
+# include "rand_local.h"
# include <descrip.h>
# include <dvidef.h>
# include <jpidef.h>
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index a9c5751f1a..2743ee7bf8 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -9,8 +9,8 @@
#include "internal/cryptlib.h"
#include <openssl/rand.h>
-#include "rand_lcl.h"
-#include "internal/rand_int.h"
+#include "rand_local.h"
+#include "crypto/rand.h"
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
# ifndef OPENSSL_RAND_SEED_OS
diff --git a/crypto/rc2/rc2_cbc.c b/crypto/rc2/rc2_cbc.c
index 2b59353b11..17e86f690e 100644
--- a/crypto/rc2/rc2_cbc.c
+++ b/crypto/rc2/rc2_cbc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc2.h>
-#include "rc2_locl.h"
+#include "rc2_local.h"
void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
RC2_KEY *ks, unsigned char *iv, int encrypt)
diff --git a/crypto/rc2/rc2_ecb.c b/crypto/rc2/rc2_ecb.c
index fb2f78273d..8d9927cd58 100644
--- a/crypto/rc2/rc2_ecb.c
+++ b/crypto/rc2/rc2_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc2.h>
-#include "rc2_locl.h"
+#include "rc2_local.h"
#include <openssl/opensslv.h>
/*-
diff --git a/crypto/rc2/rc2_locl.h b/crypto/rc2/rc2_local.h
similarity index 100%
rename from crypto/rc2/rc2_locl.h
rename to crypto/rc2/rc2_local.h
diff --git a/crypto/rc2/rc2_skey.c b/crypto/rc2/rc2_skey.c
index 55d8ba3715..60ebd42f26 100644
--- a/crypto/rc2/rc2_skey.c
+++ b/crypto/rc2/rc2_skey.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc2.h>
-#include "rc2_locl.h"
+#include "rc2_local.h"
static const unsigned char key_table[256] = {
0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79,
diff --git a/crypto/rc2/rc2cfb64.c b/crypto/rc2/rc2cfb64.c
index e11093db9e..8d1c3a4d8f 100644
--- a/crypto/rc2/rc2cfb64.c
+++ b/crypto/rc2/rc2cfb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc2.h>
-#include "rc2_locl.h"
+#include "rc2_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/rc2/rc2ofb64.c b/crypto/rc2/rc2ofb64.c
index d610278a9b..61b2c56434 100644
--- a/crypto/rc2/rc2ofb64.c
+++ b/crypto/rc2/rc2ofb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc2.h>
-#include "rc2_locl.h"
+#include "rc2_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/rc4/rc4_enc.c b/crypto/rc4/rc4_enc.c
index 638a75bb06..09ef6a896f 100644
--- a/crypto/rc4/rc4_enc.c
+++ b/crypto/rc4/rc4_enc.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc4.h>
-#include "rc4_locl.h"
+#include "rc4_local.h"
/*-
* RC4 as implemented from a posting from
diff --git a/crypto/rc4/rc4_locl.h b/crypto/rc4/rc4_local.h
similarity index 86%
rename from crypto/rc4/rc4_locl.h
rename to crypto/rc4/rc4_local.h
index 4380addbcc..e739be4be7 100644
--- a/crypto/rc4/rc4_locl.h
+++ b/crypto/rc4/rc4_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_RC4_LOCL_H
-# define HEADER_RC4_LOCL_H
+#ifndef OSSL_CRYPTO_RC4_LOCAL_H
+# define OSSL_CRYPTO_RC4_LOCAL_H
# include <openssl/opensslconf.h>
# include "internal/cryptlib.h"
diff --git a/crypto/rc4/rc4_skey.c b/crypto/rc4/rc4_skey.c
index e9007331eb..100eb79c2a 100644
--- a/crypto/rc4/rc4_skey.c
+++ b/crypto/rc4/rc4_skey.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc4.h>
-#include "rc4_locl.h"
+#include "rc4_local.h"
#include <openssl/opensslv.h>
const char *RC4_options(void)
diff --git a/crypto/rc5/rc5_ecb.c b/crypto/rc5/rc5_ecb.c
index c32f38e473..94ec646390 100644
--- a/crypto/rc5/rc5_ecb.c
+++ b/crypto/rc5/rc5_ecb.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc5.h>
-#include "rc5_locl.h"
+#include "rc5_local.h"
#include <openssl/opensslv.h>
void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out,
diff --git a/crypto/rc5/rc5_enc.c b/crypto/rc5/rc5_enc.c
index 58631dee20..75ddeb2eaf 100644
--- a/crypto/rc5/rc5_enc.c
+++ b/crypto/rc5/rc5_enc.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <openssl/rc5.h>
-#include "rc5_locl.h"
+#include "rc5_local.h"
void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out,
long length, RC5_32_KEY *ks, unsigned char *iv,
diff --git a/crypto/rc5/rc5_locl.h b/crypto/rc5/rc5_local.h
similarity index 100%
rename from crypto/rc5/rc5_locl.h
rename to crypto/rc5/rc5_local.h
diff --git a/crypto/rc5/rc5_skey.c b/crypto/rc5/rc5_skey.c
index 943a7849bb..b2e6bbb1af 100644
--- a/crypto/rc5/rc5_skey.c
+++ b/crypto/rc5/rc5_skey.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc5.h>
-#include "rc5_locl.h"
+#include "rc5_local.h"
void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
int rounds)
diff --git a/crypto/rc5/rc5cfb64.c b/crypto/rc5/rc5cfb64.c
index 9a8aa6b244..cfce7ec1e8 100644
--- a/crypto/rc5/rc5cfb64.c
+++ b/crypto/rc5/rc5cfb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc5.h>
-#include "rc5_locl.h"
+#include "rc5_local.h"
/*
* The input and output encrypted as though 64bit cfb mode is being used.
diff --git a/crypto/rc5/rc5ofb64.c b/crypto/rc5/rc5ofb64.c
index 3a41d773cb..224eb96857 100644
--- a/crypto/rc5/rc5ofb64.c
+++ b/crypto/rc5/rc5ofb64.c
@@ -8,7 +8,7 @@
*/
#include <openssl/rc5.h>
-#include "rc5_locl.h"
+#include "rc5_local.h"
/*
* The input and output encrypted as though 64bit ofb mode is being used.
diff --git a/crypto/ripemd/rmd_dgst.c b/crypto/ripemd/rmd_dgst.c
index a1670c7fbd..e9e440f18c 100644
--- a/crypto/ripemd/rmd_dgst.c
+++ b/crypto/ripemd/rmd_dgst.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "rmd_locl.h"
+#include "rmd_local.h"
#include <openssl/opensslv.h>
#ifdef RMD160_ASM
@@ -39,7 +39,7 @@ void ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *p, size_t num)
register unsigned MD32_REG_T A, B, C, D, E;
unsigned MD32_REG_T a, b, c, d, e, l;
# ifndef MD32_XARRAY
- /* See comment in crypto/sha/sha_locl.h for details. */
+ /* See comment in crypto/sha/sha_local.h for details. */
unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
# define X(i) XX##i
diff --git a/crypto/ripemd/rmd_locl.h b/crypto/ripemd/rmd_local.h
similarity index 96%
rename from crypto/ripemd/rmd_locl.h
rename to crypto/ripemd/rmd_local.h
index f1ae4323ca..f3604e3490 100644
--- a/crypto/ripemd/rmd_locl.h
+++ b/crypto/ripemd/rmd_local.h
@@ -13,7 +13,7 @@
#include <openssl/ripemd.h>
/*
- * DO EXAMINE COMMENTS IN crypto/md5/md5_locl.h & crypto/md5/md5_dgst.c
+ * DO EXAMINE COMMENTS IN crypto/md5/md5_local.h & crypto/md5/md5_dgst.c
* FOR EXPLANATIONS ON FOLLOWING "CODE."
*/
#ifdef RMD160_ASM
@@ -42,7 +42,7 @@ void ripemd160_block_data_order(RIPEMD160_CTX *c, const void *p, size_t num);
} while (0)
#define HASH_BLOCK_DATA_ORDER ripemd160_block_data_order
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
/*
* Transformed F2 and F4 are courtesy of Wei Dai
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c
index 9dcb85d837..6692a51ed8 100644
--- a/crypto/rsa/rsa_ameth.c
+++ b/crypto/rsa/rsa_ameth.c
@@ -13,9 +13,9 @@
#include <openssl/x509.h>
#include <openssl/bn.h>
#include <openssl/cms.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
-#include "rsa_locl.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
+#include "rsa_local.h"
#ifndef OPENSSL_NO_CMS
static int rsa_cms_sign(CMS_SignerInfo *si);
diff --git a/crypto/rsa/rsa_asn1.c b/crypto/rsa/rsa_asn1.c
index 9fe62c82eb..e8df8d762e 100644
--- a/crypto/rsa/rsa_asn1.c
+++ b/crypto/rsa/rsa_asn1.c
@@ -12,7 +12,7 @@
#include <openssl/bn.h>
#include <openssl/x509.h>
#include <openssl/asn1t.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
/*
* Override the default free and new methods,
diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c
index 1b69be30ca..b4ba7fce3f 100644
--- a/crypto/rsa/rsa_chk.c
+++ b/crypto/rsa/rsa_chk.c
@@ -9,7 +9,7 @@
#include <openssl/bn.h>
#include <openssl/err.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
int RSA_check_key(const RSA *key)
{
diff --git a/crypto/rsa/rsa_crpt.c b/crypto/rsa/rsa_crpt.c
index f4ef8b4381..f1131ce9e0 100644
--- a/crypto/rsa/rsa_crpt.c
+++ b/crypto/rsa/rsa_crpt.c
@@ -10,9 +10,9 @@
#include <stdio.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
-#include "internal/bn_int.h"
+#include "crypto/bn.h"
#include <openssl/rand.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
int RSA_bits(const RSA *r)
{
diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c
index 2b81808860..29056a62a1 100644
--- a/crypto/rsa/rsa_gen.c
+++ b/crypto/rsa/rsa_gen.c
@@ -17,7 +17,7 @@
#include <time.h>
#include "internal/cryptlib.h"
#include <openssl/bn.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
static int rsa_builtin_keygen(RSA *rsa, int bits, int primes, BIGNUM *e_value,
BN_GENCB *cb);
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index e737a28898..cfee919352 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -11,11 +11,11 @@
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "internal/refcount.h"
-#include "internal/bn_int.h"
+#include "crypto/bn.h"
#include <openssl/engine.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
-#include "rsa_locl.h"
+#include "crypto/evp.h"
+#include "rsa_local.h"
RSA *RSA_new(void)
{
diff --git a/crypto/rsa/rsa_locl.h b/crypto/rsa/rsa_local.h
similarity index 100%
rename from crypto/rsa/rsa_locl.h
rename to crypto/rsa/rsa_local.h
diff --git a/crypto/rsa/rsa_meth.c b/crypto/rsa/rsa_meth.c
index def19f375f..2845b79db8 100644
--- a/crypto/rsa/rsa_meth.c
+++ b/crypto/rsa/rsa_meth.c
@@ -8,7 +8,7 @@
*/
#include <string.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
#include <openssl/err.h>
RSA_METHOD *RSA_meth_new(const char *name, int flags)
diff --git a/crypto/rsa/rsa_mp.c b/crypto/rsa/rsa_mp.c
index e7e810823b..44dda8f800 100644
--- a/crypto/rsa/rsa_mp.c
+++ b/crypto/rsa/rsa_mp.c
@@ -10,7 +10,7 @@
#include <openssl/bn.h>
#include <openssl/err.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
void rsa_multip_info_free_ex(RSA_PRIME_INFO *pinfo)
{
diff --git a/crypto/rsa/rsa_oaep.c b/crypto/rsa/rsa_oaep.c
index 48b888bf27..302360a964 100644
--- a/crypto/rsa/rsa_oaep.c
+++ b/crypto/rsa/rsa_oaep.c
@@ -20,7 +20,7 @@
* one-wayness. For the RSA function, this is an equivalent notion.
*/
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
#include <stdio.h>
#include "internal/cryptlib.h"
@@ -28,7 +28,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
const unsigned char *from, int flen,
diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c
index c8c3b7886a..b52a66f6a6 100644
--- a/crypto/rsa/rsa_ossl.c
+++ b/crypto/rsa/rsa_ossl.c
@@ -8,9 +8,9 @@
*/
#include "internal/cryptlib.h"
-#include "internal/bn_int.h"
-#include "rsa_locl.h"
-#include "internal/constant_time_locl.h"
+#include "crypto/bn.h"
+#include "rsa_local.h"
+#include "internal/constant_time.h"
static int rsa_ossl_public_encrypt(int flen, const unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c
index 5260d12f4c..5deab15173 100644
--- a/crypto/rsa/rsa_pk1.c
+++ b/crypto/rsa/rsa_pk1.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
#include <stdio.h>
#include "internal/cryptlib.h"
diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c
index 082ab8fd8a..0eb21c8af9 100644
--- a/crypto/rsa/rsa_pmeth.c
+++ b/crypto/rsa/rsa_pmeth.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
#include <stdio.h>
#include "internal/cryptlib.h"
@@ -18,8 +18,8 @@
#include <openssl/evp.h>
#include <openssl/x509v3.h>
#include <openssl/cms.h>
-#include "internal/evp_int.h"
-#include "rsa_locl.h"
+#include "crypto/evp.h"
+#include "rsa_local.h"
/* RSA pkey context structure */
diff --git a/crypto/rsa/rsa_pss.c b/crypto/rsa/rsa_pss.c
index f7c575d00a..40ce1c4d37 100644
--- a/crypto/rsa/rsa_pss.c
+++ b/crypto/rsa/rsa_pss.c
@@ -14,7 +14,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
static const unsigned char zeroes[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
diff --git a/crypto/rsa/rsa_sign.c b/crypto/rsa/rsa_sign.c
index 952d24fb8a..7fc69361bf 100644
--- a/crypto/rsa/rsa_sign.c
+++ b/crypto/rsa/rsa_sign.c
@@ -13,8 +13,8 @@
#include <openssl/rsa.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
-#include "rsa_locl.h"
+#include "crypto/x509.h"
+#include "rsa_local.h"
/* Size of an SSL signature: MD5+SHA1 */
#define SSL_SIG_LENGTH 36
diff --git a/crypto/rsa/rsa_ssl.c b/crypto/rsa/rsa_ssl.c
index 3859128a6d..0a659bc49c 100644
--- a/crypto/rsa/rsa_ssl.c
+++ b/crypto/rsa/rsa_ssl.c
@@ -12,7 +12,7 @@
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/rand.h>
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
const unsigned char *from, int flen)
diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c
index e7ac476bb4..322cd14a84 100644
--- a/crypto/rsa/rsa_x931g.c
+++ b/crypto/rsa/rsa_x931g.c
@@ -12,7 +12,7 @@
#include <time.h>
#include <openssl/err.h>
#include <openssl/bn.h>
-#include "rsa_locl.h"
+#include "rsa_local.h"
/* X9.31 RSA key derivation and generation */
diff --git a/crypto/s390x_arch.h b/crypto/s390x_arch.h
index 4a775a927d..4d2cc02eb3 100644
--- a/crypto/s390x_arch.h
+++ b/crypto/s390x_arch.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef S390X_ARCH_H
-# define S390X_ARCH_H
+#ifndef OSSL_CRYPTO_S390X_ARCH_H
+# define OSSL_CRYPTO_S390X_ARCH_H
# ifndef __ASSEMBLER__
diff --git a/crypto/seed/seed.c b/crypto/seed/seed.c
index d62da91ede..c3a1f183a5 100644
--- a/crypto/seed/seed.c
+++ b/crypto/seed/seed.c
@@ -42,7 +42,7 @@
# endif
# include <openssl/seed.h>
-# include "seed_locl.h"
+# include "seed_local.h"
# ifdef SS /* can get defined on Solaris by inclusion of
* <stdlib.h> */
diff --git a/crypto/seed/seed_locl.h b/crypto/seed/seed_local.h
similarity index 97%
rename from crypto/seed/seed_locl.h
rename to crypto/seed/seed_local.h
index ac2950d97c..e3681f8bd4 100644
--- a/crypto/seed/seed_locl.h
+++ b/crypto/seed/seed_local.h
@@ -32,8 +32,8 @@
* SUCH DAMAGE.
*
*/
-#ifndef HEADER_SEED_LOCL_H
-# define HEADER_SEED_LOCL_H
+#ifndef OSSL_CRYPTO_SEED_LOCAL_H
+# define OSSL_CRYPTO_SEED_LOCAL_H
# include "openssl/e_os2.h"
# include <openssl/seed.h>
@@ -109,4 +109,4 @@ typedef unsigned int seed_word;
(X1) ^= (T0); \
(X2) ^= (T1)
-#endif /* HEADER_SEED_LOCL_H */
+#endif /* OSSL_CRYPTO_SEED_LOCAL_H */
diff --git a/crypto/sha/sha1dgst.c b/crypto/sha/sha1dgst.c
index 819370e615..7965829e64 100644
--- a/crypto/sha/sha1dgst.c
+++ b/crypto/sha/sha1dgst.c
@@ -14,4 +14,4 @@
/* The implementation is in ../md32_common.h */
-# include "sha_locl.h"
+# include "sha_local.h"
diff --git a/crypto/sha/sha256.c b/crypto/sha/sha256.c
index bf78f075ee..11050ba547 100644
--- a/crypto/sha/sha256.c
+++ b/crypto/sha/sha256.c
@@ -128,7 +128,7 @@ static
#endif
void sha256_block_data_order(SHA256_CTX *ctx, const void *in, size_t num);
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
#ifndef SHA256_ASM
static const SHA_LONG K256[64] = {
diff --git a/crypto/sha/sha512.c b/crypto/sha/sha512.c
index 50b65ee811..ca1f387a64 100644
--- a/crypto/sha/sha512.c
+++ b/crypto/sha/sha512.c
@@ -50,7 +50,7 @@
#include <openssl/opensslv.h>
#include "internal/cryptlib.h"
-#include "internal/sha.h"
+#include "crypto/sha.h"
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || \
diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_local.h
similarity index 99%
rename from crypto/sha/sha_locl.h
rename to crypto/sha/sha_local.h
index 4e5a090382..6edb9ef1d2 100644
--- a/crypto/sha/sha_locl.h
+++ b/crypto/sha/sha_local.h
@@ -42,7 +42,7 @@ static void sha1_block_data_order(SHA_CTX *c, const void *p, size_t num);
void sha1_block_data_order(SHA_CTX *c, const void *p, size_t num);
#endif
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
#define INIT_DATA_h0 0x67452301UL
#define INIT_DATA_h1 0xefcdab89UL
diff --git a/crypto/siphash/siphash.c b/crypto/siphash/siphash.c
index be74a38d93..07d94c1e6e 100644
--- a/crypto/siphash/siphash.c
+++ b/crypto/siphash/siphash.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <openssl/crypto.h>
-#include "internal/siphash.h"
+#include "crypto/siphash.h"
#include "siphash_local.h"
/* default: SipHash-2-4 */
diff --git a/crypto/siphash/siphash_ameth.c b/crypto/siphash/siphash_ameth.c
index c0ab7efae4..2da6dfec80 100644
--- a/crypto/siphash/siphash_ameth.c
+++ b/crypto/siphash/siphash_ameth.c
@@ -10,10 +10,10 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
-#include "internal/asn1_int.h"
-#include "internal/siphash.h"
+#include "crypto/asn1.h"
+#include "crypto/siphash.h"
#include "siphash_local.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/*
* SIPHASH "ASN1" method. This is just here to indicate the maximum
diff --git a/crypto/siphash/siphash_pmeth.c b/crypto/siphash/siphash_pmeth.c
index 66e552fec5..0c7d2c6190 100644
--- a/crypto/siphash/siphash_pmeth.c
+++ b/crypto/siphash/siphash_pmeth.c
@@ -13,9 +13,9 @@
#include <openssl/x509v3.h>
#include <openssl/evp.h>
#include <openssl/err.h>
-#include "internal/siphash.h"
+#include "crypto/siphash.h"
#include "siphash_local.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/* SIPHASH pkey context structure */
diff --git a/crypto/sm2/sm2_crypt.c b/crypto/sm2/sm2_crypt.c
index 4389fc731e..ef505f6441 100644
--- a/crypto/sm2/sm2_crypt.c
+++ b/crypto/sm2/sm2_crypt.c
@@ -9,9 +9,9 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/sm2.h"
-#include "internal/sm2err.h"
-#include "internal/ec_int.h" /* ecdh_KDF_X9_63() */
+#include "crypto/sm2.h"
+#include "crypto/sm2err.h"
+#include "crypto/ec.h" /* ecdh_KDF_X9_63() */
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/bn.h>
diff --git a/crypto/sm2/sm2_err.c b/crypto/sm2/sm2_err.c
index 653c6797f8..e5973e9c71 100644
--- a/crypto/sm2/sm2_err.c
+++ b/crypto/sm2/sm2_err.c
@@ -9,7 +9,7 @@
*/
#include <openssl/err.h>
-#include "internal/sm2err.h"
+#include "crypto/sm2err.h"
#ifndef OPENSSL_NO_ERR
diff --git a/crypto/sm2/sm2_pmeth.c b/crypto/sm2/sm2_pmeth.c
index d187699cc4..62a5b5534d 100644
--- a/crypto/sm2/sm2_pmeth.c
+++ b/crypto/sm2/sm2_pmeth.c
@@ -11,9 +11,9 @@
#include <openssl/asn1t.h>
#include <openssl/ec.h>
#include <openssl/evp.h>
-#include "internal/evp_int.h"
-#include "internal/sm2.h"
-#include "internal/sm2err.h"
+#include "crypto/evp.h"
+#include "crypto/sm2.h"
+#include "crypto/sm2err.h"
/* EC pkey context structure */
diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c
index 50ecb4d68c..683f03f935 100644
--- a/crypto/sm2/sm2_sign.c
+++ b/crypto/sm2/sm2_sign.c
@@ -9,9 +9,9 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/sm2.h"
-#include "internal/sm2err.h"
-#include "internal/ec_int.h" /* ec_group_do_inverse_ord() */
+#include "crypto/sm2.h"
+#include "crypto/sm2err.h"
+#include "crypto/ec.h" /* ec_group_do_inverse_ord() */
#include "internal/numbers.h"
#include <openssl/err.h>
#include <openssl/evp.h>
diff --git a/crypto/sm3/m_sm3.c b/crypto/sm3/m_sm3.c
index 85538dc8af..7e54f42984 100644
--- a/crypto/sm3/m_sm3.c
+++ b/crypto/sm3/m_sm3.c
@@ -12,8 +12,8 @@
#ifndef OPENSSL_NO_SM3
# include <openssl/evp.h>
-# include "internal/evp_int.h"
-# include "internal/sm3.h"
+# include "crypto/evp.h"
+# include "crypto/sm3.h"
static int init(EVP_MD_CTX *ctx)
{
diff --git a/crypto/sm3/sm3.c b/crypto/sm3/sm3.c
index 1588dd115a..d78292b4c5 100644
--- a/crypto/sm3/sm3.c
+++ b/crypto/sm3/sm3.c
@@ -10,7 +10,7 @@
*/
#include <openssl/e_os2.h>
-#include "sm3_locl.h"
+#include "sm3_local.h"
int sm3_init(SM3_CTX *c)
{
diff --git a/crypto/sm3/sm3_locl.h b/crypto/sm3/sm3_local.h
similarity index 97%
rename from crypto/sm3/sm3_locl.h
rename to crypto/sm3/sm3_local.h
index efa6db57c6..7171de510d 100644
--- a/crypto/sm3/sm3_locl.h
+++ b/crypto/sm3/sm3_local.h
@@ -10,7 +10,7 @@
*/
#include <string.h>
-#include "internal/sm3.h"
+#include "crypto/sm3.h"
#define DATA_ORDER_IS_BIG_ENDIAN
@@ -36,7 +36,7 @@
void sm3_transform(SM3_CTX *c, const unsigned char *data);
-#include "internal/md32_common.h"
+#include "crypto/md32_common.h"
#define P0(X) (X ^ ROTATE(X, 9) ^ ROTATE(X, 17))
#define P1(X) (X ^ ROTATE(X, 15) ^ ROTATE(X, 23))
diff --git a/crypto/sm4/sm4.c b/crypto/sm4/sm4.c
index 0c819a4b68..5750e76331 100644
--- a/crypto/sm4/sm4.c
+++ b/crypto/sm4/sm4.c
@@ -10,7 +10,7 @@
*/
#include <openssl/e_os2.h>
-#include "internal/sm4.h"
+#include "crypto/sm4.h"
static const uint8_t SM4_S[256] = {
0xD6, 0x90, 0xE9, 0xFE, 0xCC, 0xE1, 0x3D, 0xB7, 0x16, 0xB6, 0x14, 0xC2,
diff --git a/crypto/sparc_arch.h b/crypto/sparc_arch.h
index 99eafb3313..c74063be2f 100644
--- a/crypto/sparc_arch.h
+++ b/crypto/sparc_arch.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef __SPARC_ARCH_H__
-# define __SPARC_ARCH_H__
+#ifndef OSSL_CRYPTO_SPARC_ARCH_H
+# define OSSL_CRYPTO_SPARC_ARCH_H
# define SPARCV9_TICK_PRIVILEGED (1<<0)
# define SPARCV9_PREFER_FPU (1<<1)
@@ -115,4 +115,4 @@
mov tmp, %o7;
# endif
-#endif /* __SPARC_ARCH_H__ */
+#endif /* OSSL_CRYPTO_SPARC_ARCH_H */
diff --git a/crypto/srp/srp_lib.c b/crypto/srp/srp_lib.c
index ca20f6d097..4f417de0c9 100644
--- a/crypto/srp/srp_lib.c
+++ b/crypto/srp/srp_lib.c
@@ -16,7 +16,7 @@
# include <openssl/sha.h>
# include <openssl/srp.h>
# include <openssl/evp.h>
-# include "internal/bn_srp.h"
+# include "crypto/bn_srp.h"
/* calculate = SHA1(PAD(x) || PAD(y)) */
diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c
index eb279dd418..3dd2ab0507 100644
--- a/crypto/srp/srp_vfy.c
+++ b/crypto/srp/srp_vfy.c
@@ -13,7 +13,7 @@
#ifndef OPENSSL_NO_SRP
# include "internal/cryptlib.h"
-# include "internal/evp_int.h"
+# include "crypto/evp.h"
# include <openssl/sha.h>
# include <openssl/srp.h>
# include <openssl/evp.h>
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c
index 6f569ee62d..8f1d20e74a 100644
--- a/crypto/store/loader_file.c
+++ b/crypto/store/loader_file.c
@@ -24,12 +24,12 @@
#include <openssl/store.h>
#include <openssl/ui.h>
#include <openssl/x509.h> /* For the PKCS8 stuff o.O */
-#include "internal/asn1_int.h"
-#include "internal/ctype.h"
+#include "crypto/asn1.h"
+#include "crypto/ctype.h"
#include "internal/o_dir.h"
#include "internal/cryptlib.h"
-#include "internal/store_int.h"
-#include "store_locl.h"
+#include "crypto/store.h"
+#include "store_local.h"
#ifdef _WIN32
# define stat _stat
diff --git a/crypto/store/store_init.c b/crypto/store/store_init.c
index b398bf598f..0103c8db8a 100644
--- a/crypto/store/store_init.c
+++ b/crypto/store/store_init.c
@@ -8,8 +8,8 @@
*/
#include <openssl/err.h>
-#include "internal/store.h"
-#include "store_locl.h"
+#include "crypto/store.h"
+#include "store_local.h"
static CRYPTO_ONCE store_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(do_store_init)
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 7de2e31f55..fb8184d2d9 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -18,8 +18,8 @@
#include <openssl/err.h>
#include <openssl/store.h>
#include "internal/thread_once.h"
-#include "internal/store_int.h"
-#include "store_locl.h"
+#include "crypto/store.h"
+#include "store_local.h"
struct ossl_store_ctx_st {
const OSSL_STORE_LOADER *loader;
diff --git a/crypto/store/store_locl.h b/crypto/store/store_local.h
similarity index 100%
rename from crypto/store/store_locl.h
rename to crypto/store/store_local.h
diff --git a/crypto/store/store_register.c b/crypto/store/store_register.c
index e68cb3c568..3631d9b506 100644
--- a/crypto/store/store_register.c
+++ b/crypto/store/store_register.c
@@ -8,12 +8,12 @@
*/
#include <string.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <assert.h>
#include <openssl/err.h>
#include <openssl/lhash.h>
-#include "store_locl.h"
+#include "store_local.h"
static CRYPTO_RWLOCK *registry_lock;
static CRYPTO_ONCE registry_init = CRYPTO_ONCE_STATIC_INIT;
diff --git a/crypto/ts/ts_asn1.c b/crypto/ts/ts_asn1.c
index 8707207082..2840f5858a 100644
--- a/crypto/ts/ts_asn1.c
+++ b/crypto/ts/ts_asn1.c
@@ -10,7 +10,7 @@
#include <openssl/ts.h>
#include <openssl/err.h>
#include <openssl/asn1t.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
ASN1_SEQUENCE(TS_MSG_IMPRINT) = {
ASN1_SIMPLE(TS_MSG_IMPRINT, hash_algo, X509_ALGOR),
diff --git a/crypto/ts/ts_lib.c b/crypto/ts/ts_lib.c
index ce2e12c593..bfe981364b 100644
--- a/crypto/ts/ts_lib.c
+++ b/crypto/ts/ts_lib.c
@@ -14,7 +14,7 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/ts.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num)
{
diff --git a/crypto/ts/ts_lcl.h b/crypto/ts/ts_local.h
similarity index 100%
rename from crypto/ts/ts_lcl.h
rename to crypto/ts/ts_local.h
diff --git a/crypto/ts/ts_req_print.c b/crypto/ts/ts_req_print.c
index 0dedf47d92..4eba5cf018 100644
--- a/crypto/ts/ts_req_print.c
+++ b/crypto/ts/ts_req_print.c
@@ -13,7 +13,7 @@
#include <openssl/bn.h>
#include <openssl/x509v3.h>
#include <openssl/ts.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
int TS_REQ_print_bio(BIO *bio, TS_REQ *a)
{
diff --git a/crypto/ts/ts_req_utils.c b/crypto/ts/ts_req_utils.c
index 2073d3395d..a4568e3b77 100644
--- a/crypto/ts/ts_req_utils.c
+++ b/crypto/ts/ts_req_utils.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/x509v3.h>
#include <openssl/ts.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
int TS_REQ_set_version(TS_REQ *a, long version)
{
diff --git a/crypto/ts/ts_rsp_print.c b/crypto/ts/ts_rsp_print.c
index 6eb0ec8d75..a2451aaa8d 100644
--- a/crypto/ts/ts_rsp_print.c
+++ b/crypto/ts/ts_rsp_print.c
@@ -13,7 +13,7 @@
#include <openssl/bn.h>
#include <openssl/x509v3.h>
#include <openssl/ts.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
struct status_map_st {
int bit;
diff --git a/crypto/ts/ts_rsp_sign.c b/crypto/ts/ts_rsp_sign.c
index 1b2b84ef6b..a584ae5f5e 100644
--- a/crypto/ts/ts_rsp_sign.c
+++ b/crypto/ts/ts_rsp_sign.c
@@ -14,7 +14,7 @@
#include <openssl/ts.h>
#include <openssl/pkcs7.h>
#include <openssl/crypto.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
static ASN1_INTEGER *def_serial_cb(struct TS_resp_ctx *, void *);
static int def_time_cb(struct TS_resp_ctx *, void *, long *sec, long *usec);
diff --git a/crypto/ts/ts_rsp_utils.c b/crypto/ts/ts_rsp_utils.c
index 3ecee39a22..3fa0dbd0f0 100644
--- a/crypto/ts/ts_rsp_utils.c
+++ b/crypto/ts/ts_rsp_utils.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/ts.h>
#include <openssl/pkcs7.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
int TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *status_info)
{
diff --git a/crypto/ts/ts_rsp_verify.c b/crypto/ts/ts_rsp_verify.c
index 9deda81b07..086021247c 100644
--- a/crypto/ts/ts_rsp_verify.c
+++ b/crypto/ts/ts_rsp_verify.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/ts.h>
#include <openssl/pkcs7.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
static int ts_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted,
X509 *signer, STACK_OF(X509) **chain);
diff --git a/crypto/ts/ts_verify_ctx.c b/crypto/ts/ts_verify_ctx.c
index d4792ee04f..1e80e0d370 100644
--- a/crypto/ts/ts_verify_ctx.c
+++ b/crypto/ts/ts_verify_ctx.c
@@ -10,7 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/ts.h>
-#include "ts_lcl.h"
+#include "ts_local.h"
TS_VERIFY_CTX *TS_VERIFY_CTX_new(void)
{
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c
index f550972d3e..49cc45057c 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -13,7 +13,7 @@
#include <openssl/buffer.h>
#include <openssl/ui.h>
#include <openssl/err.h>
-#include "ui_locl.h"
+#include "ui_local.h"
UI *UI_new(void)
{
diff --git a/crypto/ui/ui_locl.h b/crypto/ui/ui_local.h
similarity index 98%
rename from crypto/ui/ui_locl.h
rename to crypto/ui/ui_local.h
index 19b33b8fc6..8a7dbda147 100644
--- a/crypto/ui/ui_locl.h
+++ b/crypto/ui/ui_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_UI_LOCL_H
-# define HEADER_UI_LOCL_H
+#ifndef OSSL_CRYPTO_UI_LOCAL_H
+# define OSSL_CRYPTO_UI_LOCAL_H
# include <openssl/ui.h>
# include <openssl/crypto.h>
diff --git a/crypto/ui/ui_null.c b/crypto/ui/ui_null.c
index 9e5f6fca59..9ab00e0a7c 100644
--- a/crypto/ui/ui_null.c
+++ b/crypto/ui/ui_null.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ui_locl.h"
+#include "ui_local.h"
static const UI_METHOD ui_null = {
"OpenSSL NULL UI",
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 0ec9f0daf3..168de4630d 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -53,7 +53,7 @@
# endif
# endif
-# include "ui_locl.h"
+# include "ui_local.h"
# include "internal/cryptlib.h"
# ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */
diff --git a/crypto/ui/ui_util.c b/crypto/ui/ui_util.c
index b379324f9b..6a37b6d287 100644
--- a/crypto/ui/ui_util.c
+++ b/crypto/ui/ui_util.c
@@ -9,7 +9,7 @@
#include <string.h>
#include "internal/thread_once.h"
-#include "ui_locl.h"
+#include "ui_local.h"
#ifndef BUFSIZ
#define BUFSIZ 256
diff --git a/crypto/whrlpool/wp_block.c b/crypto/whrlpool/wp_block.c
index 2ae5c38aba..c21c04dbc1 100644
--- a/crypto/whrlpool/wp_block.c
+++ b/crypto/whrlpool/wp_block.c
@@ -36,7 +36,7 @@
*
*/
-#include "wp_locl.h"
+#include "wp_local.h"
#include <string.h>
typedef unsigned char u8;
diff --git a/crypto/whrlpool/wp_dgst.c b/crypto/whrlpool/wp_dgst.c
index 1ac29803a4..e8a3392268 100644
--- a/crypto/whrlpool/wp_dgst.c
+++ b/crypto/whrlpool/wp_dgst.c
@@ -53,7 +53,7 @@
*/
#include <openssl/crypto.h>
-#include "wp_locl.h"
+#include "wp_local.h"
#include <string.h>
int WHIRLPOOL_Init(WHIRLPOOL_CTX *c)
diff --git a/crypto/whrlpool/wp_locl.h b/crypto/whrlpool/wp_local.h
similarity index 100%
rename from crypto/whrlpool/wp_locl.h
rename to crypto/whrlpool/wp_local.h
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index b691a83a0d..238c2519a6 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -19,8 +19,8 @@
#endif
#include <openssl/x509.h>
-#include "internal/x509_int.h"
-#include "x509_lcl.h"
+#include "crypto/x509.h"
+#include "x509_local.h"
struct lookup_dir_hashes_st {
unsigned long hash;
diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
index 244512c935..237b362e27 100644
--- a/crypto/x509/by_file.c
+++ b/crypto/x509/by_file.c
@@ -15,7 +15,7 @@
#include <openssl/buffer.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
long argl, char **ret);
diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c
index ccacbe7cbf..12d807f705 100644
--- a/crypto/x509/t_x509.c
+++ b/crypto/x509/t_x509.c
@@ -14,7 +14,7 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#ifndef OPENSSL_NO_STDIO
int X509_print_fp(FILE *fp, X509 *x)
diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c
index 3c4566d2e7..651aa78083 100644
--- a/crypto/x509/x509_att.c
+++ b/crypto/x509/x509_att.c
@@ -15,7 +15,7 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x)
{
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c
index 833bfce1bf..e06489c334 100644
--- a/crypto/x509/x509_cmp.c
+++ b/crypto/x509/x509_cmp.c
@@ -13,7 +13,7 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b)
{
diff --git a/crypto/x509/x509_ext.c b/crypto/x509/x509_ext.c
index 2db843760c..4cdab724ea 100644
--- a/crypto/x509/x509_ext.c
+++ b/crypto/x509/x509_ext.c
@@ -13,7 +13,7 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/x509v3.h>
int X509_CRL_get_ext_count(const X509_CRL *x)
diff --git a/crypto/x509/x509_lcl.h b/crypto/x509/x509_local.h
similarity index 100%
rename from crypto/x509/x509_lcl.h
rename to crypto/x509/x509_local.h
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index b7d2e66574..641a41c35c 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -11,9 +11,9 @@
#include "internal/cryptlib.h"
#include "internal/refcount.h"
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/x509v3.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
{
diff --git a/crypto/x509/x509_meth.c b/crypto/x509/x509_meth.c
index 9dc587a092..9348cc8eb7 100644
--- a/crypto/x509/x509_meth.c
+++ b/crypto/x509/x509_meth.c
@@ -15,7 +15,7 @@
#include <openssl/asn1.h>
#include <openssl/x509.h>
#include <openssl/ossl_typ.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name)
{
diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c
index 85c39415c1..f54d483cc4 100644
--- a/crypto/x509/x509_obj.c
+++ b/crypto/x509/x509_obj.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/buffer.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
/*
* Limit to ensure we don't overflow: much greater than
diff --git a/crypto/x509/x509_r2x.c b/crypto/x509/x509_r2x.c
index 3d72787d31..6b1623feac 100644
--- a/crypto/x509/x509_r2x.c
+++ b/crypto/x509/x509_r2x.c
@@ -13,7 +13,7 @@
#include <openssl/evp.h>
#include <openssl/asn1.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c
index 0bdbb81db8..7ba0f26495 100644
--- a/crypto/x509/x509_req.c
+++ b/crypto/x509/x509_req.c
@@ -14,7 +14,7 @@
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/objects.h>
#include <openssl/buffer.h>
#include <openssl/pem.h>
diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c
index 3ab6bf3511..164b4e2be1 100644
--- a/crypto/x509/x509_set.c
+++ b/crypto/x509/x509_set.c
@@ -15,9 +15,9 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/asn1_int.h"
-#include "internal/x509_int.h"
-#include "x509_lcl.h"
+#include "crypto/asn1.h"
+#include "crypto/x509.h"
+#include "x509_local.h"
int X509_set_version(X509 *x, long version)
{
diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c
index d749af4d59..9e199d63e4 100644
--- a/crypto/x509/x509_trs.c
+++ b/crypto/x509/x509_trs.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
static int tr_cmp(const X509_TRUST *const *a, const X509_TRUST *const *b);
static void trtable_free(X509_TRUST *p);
diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c
index 75ae767d60..c787602330 100644
--- a/crypto/x509/x509_v3.c
+++ b/crypto/x509/x509_v3.c
@@ -15,7 +15,7 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x)
{
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 6be2c71e86..361954c62e 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -12,7 +12,7 @@
#include <errno.h>
#include <limits.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/crypto.h>
#include <openssl/buffer.h>
@@ -22,8 +22,8 @@
#include <openssl/x509v3.h>
#include <openssl/objects.h>
#include "internal/dane.h"
-#include "internal/x509_int.h"
-#include "x509_lcl.h"
+#include "crypto/x509.h"
+#include "x509_local.h"
/* CRL score values */
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index aea186295c..68b681d5ee 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -14,9 +14,9 @@
#include <openssl/buffer.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
-#include "x509_lcl.h"
+#include "x509_local.h"
/* X509_VERIFY_PARAM functions */
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c
index 7645ce3759..6c08509138 100644
--- a/crypto/x509/x509cset.c
+++ b/crypto/x509/x509cset.c
@@ -14,7 +14,7 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
int X509_CRL_set_version(X509_CRL *x, long version)
{
diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c
index 64a73e793f..c86d8e7914 100644
--- a/crypto/x509/x509name.c
+++ b/crypto/x509/x509name.c
@@ -14,7 +14,7 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len)
{
diff --git a/crypto/x509/x509rset.c b/crypto/x509/x509rset.c
index e8921b82a8..9da3f2ee27 100644
--- a/crypto/x509/x509rset.c
+++ b/crypto/x509/x509rset.c
@@ -13,7 +13,7 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
int X509_REQ_set_version(X509_REQ *x, long version)
{
diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c
index 24e4114601..6cccfa99d1 100644
--- a/crypto/x509/x_all.c
+++ b/crypto/x509/x_all.c
@@ -13,7 +13,7 @@
#include <openssl/asn1.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/ocsp.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>
diff --git a/crypto/x509/x_attrib.c b/crypto/x509/x_attrib.c
index 9a41e547cb..813c5b01c3 100644
--- a/crypto/x509/x_attrib.c
+++ b/crypto/x509/x_attrib.c
@@ -12,7 +12,7 @@
#include <openssl/objects.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
/*-
* X509_ATTRIBUTE: this has the following form:
diff --git a/crypto/x509/x_crl.c b/crypto/x509/x_crl.c
index 12ab3cca42..e864126fef 100644
--- a/crypto/x509/x_crl.c
+++ b/crypto/x509/x_crl.c
@@ -11,9 +11,9 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/x509v3.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
static int X509_REVOKED_cmp(const X509_REVOKED *const *a,
const X509_REVOKED *const *b);
diff --git a/crypto/x509/x_exten.c b/crypto/x509/x_exten.c
index f10f4a4d87..bd7518ef12 100644
--- a/crypto/x509/x_exten.c
+++ b/crypto/x509/x_exten.c
@@ -11,7 +11,7 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
-#include "x509_lcl.h"
+#include "x509_local.h"
ASN1_SEQUENCE(X509_EXTENSION) = {
ASN1_SIMPLE(X509_EXTENSION, object, ASN1_OBJECT),
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c
index a1e9bbdb66..aa7f4722b6 100644
--- a/crypto/x509/x_name.c
+++ b/crypto/x509/x_name.c
@@ -8,13 +8,13 @@
*/
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
-#include "internal/asn1_int.h"
-#include "x509_lcl.h"
+#include "crypto/x509.h"
+#include "crypto/asn1.h"
+#include "x509_local.h"
/*
* Maximum length of X509_NAME: much larger than anything we should
diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c
index 1c87b8268e..4f694b93fb 100644
--- a/crypto/x509/x_pubkey.c
+++ b/crypto/x509/x_pubkey.c
@@ -11,9 +11,9 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/asn1_int.h"
-#include "internal/evp_int.h"
-#include "internal/x509_int.h"
+#include "crypto/asn1.h"
+#include "crypto/evp.h"
+#include "crypto/x509.h"
#include <openssl/rsa.h>
#include <openssl/dsa.h>
diff --git a/crypto/x509/x_req.c b/crypto/x509/x_req.c
index c2da95a73e..d2b02f6dae 100644
--- a/crypto/x509/x_req.c
+++ b/crypto/x509/x_req.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
/*-
* X509_REQ_INFO is handled in an unusual way to get round
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c
index afe59c46c5..7aa8b77ae7 100644
--- a/crypto/x509/x_x509.c
+++ b/crypto/x509/x_x509.c
@@ -13,7 +13,7 @@
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = {
ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0),
diff --git a/crypto/x509/x_x509a.c b/crypto/x509/x_x509a.c
index 8c9ad71d1b..c5175faef7 100644
--- a/crypto/x509/x_x509a.c
+++ b/crypto/x509/x_x509a.c
@@ -12,7 +12,7 @@
#include <openssl/evp.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
/*
* X509_CERT_AUX routines. These are used to encode additional user
diff --git a/crypto/x509v3/pcy_cache.c b/crypto/x509v3/pcy_cache.c
index 623870b1f6..04401bace8 100644
--- a/crypto/x509v3/pcy_cache.c
+++ b/crypto/x509v3/pcy_cache.c
@@ -10,9 +10,9 @@
#include "internal/cryptlib.h"
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
-#include "pcy_int.h"
+#include "pcy_local.h"
static int policy_data_cmp(const X509_POLICY_DATA *const *a,
const X509_POLICY_DATA *const *b);
diff --git a/crypto/x509v3/pcy_data.c b/crypto/x509v3/pcy_data.c
index bd3bb0e40d..0735059513 100644
--- a/crypto/x509v3/pcy_data.c
+++ b/crypto/x509v3/pcy_data.c
@@ -11,7 +11,7 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "pcy_int.h"
+#include "pcy_local.h"
/* Policy Node routines */
diff --git a/crypto/x509v3/pcy_lib.c b/crypto/x509v3/pcy_lib.c
index 67f7eafc6e..2e196b838c 100644
--- a/crypto/x509v3/pcy_lib.c
+++ b/crypto/x509v3/pcy_lib.c
@@ -11,7 +11,7 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "pcy_int.h"
+#include "pcy_local.h"
/* accessor functions */
diff --git a/crypto/x509v3/pcy_int.h b/crypto/x509v3/pcy_local.h
similarity index 100%
rename from crypto/x509v3/pcy_int.h
rename to crypto/x509v3/pcy_local.h
diff --git a/crypto/x509v3/pcy_map.c b/crypto/x509v3/pcy_map.c
index ab9dd21b7d..ae2a62c977 100644
--- a/crypto/x509v3/pcy_map.c
+++ b/crypto/x509v3/pcy_map.c
@@ -10,9 +10,9 @@
#include "internal/cryptlib.h"
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
-#include "pcy_int.h"
+#include "pcy_local.h"
/*
* Set policy mapping entries in cache. Note: this modifies the passed
diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c
index 1ffe98498b..e2d7b15322 100644
--- a/crypto/x509v3/pcy_node.c
+++ b/crypto/x509v3/pcy_node.c
@@ -12,7 +12,7 @@
#include <openssl/x509v3.h>
#include <openssl/err.h>
-#include "pcy_int.h"
+#include "pcy_local.h"
static int node_cmp(const X509_POLICY_NODE *const *a,
const X509_POLICY_NODE *const *b)
diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c
index 87f51d001b..6e8322cbc5 100644
--- a/crypto/x509v3/pcy_tree.c
+++ b/crypto/x509v3/pcy_tree.c
@@ -11,7 +11,7 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "pcy_int.h"
+#include "pcy_local.h"
/*
* Enable this to print out the complete policy tree at various point during
diff --git a/crypto/x509v3/v3_addr.c b/crypto/x509v3/v3_addr.c
index bb58e04846..4258dbc40c 100644
--- a/crypto/x509v3/v3_addr.c
+++ b/crypto/x509v3/v3_addr.c
@@ -20,7 +20,7 @@
#include <openssl/asn1t.h>
#include <openssl/buffer.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include "ext_dat.h"
#ifndef OPENSSL_NO_RFC3779
diff --git a/crypto/x509v3/v3_admis.h b/crypto/x509v3/v3_admis.h
index fa23fc7617..ea7632b370 100644
--- a/crypto/x509v3/v3_admis.h
+++ b/crypto/x509v3/v3_admis.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_V3_ADMISSION_H
-# define HEADER_V3_ADMISSION_H
+#ifndef OSSL_CRYPTO_X509V3_V3_ADMIS_H
+# define OSSL_CRYPTO_X509V3_V3_ADMIS_H
struct NamingAuthority_st {
ASN1_OBJECT* namingAuthorityId;
diff --git a/crypto/x509v3/v3_asid.c b/crypto/x509v3/v3_asid.c
index ef2d64826f..ac68572672 100644
--- a/crypto/x509v3/v3_asid.c
+++ b/crypto/x509v3/v3_asid.c
@@ -20,7 +20,7 @@
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/bn.h>
#include "ext_dat.h"
diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c
index 7acaebfa22..e93de34546 100644
--- a/crypto/x509v3/v3_conf.c
+++ b/crypto/x509v3/v3_conf.c
@@ -10,11 +10,11 @@
/* extension creation utilities */
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/cryptlib.h"
#include <openssl/conf.h>
#include <openssl/x509.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/x509v3.h>
static int v3_check_critical(const char **value);
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index 7a47fd38b3..1d12c89912 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -14,7 +14,7 @@
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>
-#include "pcy_int.h"
+#include "pcy_local.h"
#include "ext_dat.h"
/* Certificate policies extension support: this one is a bit complex... */
diff --git a/crypto/x509v3/v3_crld.c b/crypto/x509v3/v3_crld.c
index 6cba4240ab..4854748ffb 100644
--- a/crypto/x509v3/v3_crld.c
+++ b/crypto/x509v3/v3_crld.c
@@ -14,7 +14,7 @@
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include "ext_dat.h"
static void *v2i_crld(const X509V3_EXT_METHOD *method,
diff --git a/crypto/x509v3/v3_ncons.c b/crypto/x509v3/v3_ncons.c
index 9a2cd5af00..2a7b4f0992 100644
--- a/crypto/x509v3/v3_ncons.c
+++ b/crypto/x509v3/v3_ncons.c
@@ -10,12 +10,12 @@
#include "internal/cryptlib.h"
#include "internal/numbers.h"
#include <stdio.h>
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#include <openssl/asn1t.h>
#include <openssl/conf.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include "ext_dat.h"
static void *v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method,
diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c
index 2f06289d19..3f60c2ea1d 100644
--- a/crypto/x509v3/v3_purp.c
+++ b/crypto/x509v3/v3_purp.c
@@ -12,7 +12,7 @@
#include "internal/numbers.h"
#include <openssl/x509v3.h>
#include <openssl/x509_vfy.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include "internal/tsan_assist.h"
static void x509v3_cache_extensions(X509 *x);
diff --git a/crypto/x509v3/v3_skey.c b/crypto/x509v3/v3_skey.c
index 749f51b2f0..c2e8204568 100644
--- a/crypto/x509v3/v3_skey.c
+++ b/crypto/x509v3/v3_skey.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include "ext_dat.h"
static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c
index c9b40d2c76..7281a7b917 100644
--- a/crypto/x509v3/v3_utl.c
+++ b/crypto/x509v3/v3_utl.c
@@ -12,11 +12,11 @@
#include "e_os.h"
#include "internal/cryptlib.h"
#include <stdio.h>
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include <openssl/conf.h>
#include <openssl/crypto.h>
#include <openssl/x509v3.h>
-#include "internal/x509_int.h"
+#include "crypto/x509.h"
#include <openssl/bn.h>
#include "ext_dat.h"
diff --git a/e_os.h b/e_os.h
index 858bc40cb1..2f8e3fe349 100644
--- a/e_os.h
+++ b/e_os.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_E_OS_H
-# define HEADER_E_OS_H
+#ifndef OSSL_E_OS_H
+# define OSSL_E_OS_H
# include <limits.h>
# include <openssl/opensslconf.h>
diff --git a/engines/e_afalg.h b/engines/e_afalg.h
index 2c03c448d6..3323c898c6 100644
--- a/engines/e_afalg.h
+++ b/engines/e_afalg.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_AFALG_H
-# define HEADER_AFALG_H
+#ifndef OSSL_ENGINES_E_AFALG_H
+# define OSSL_ENGINES_E_AFALG_H
# if defined(__GNUC__) && __GNUC__ >= 4 && \
(!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
diff --git a/engines/e_afalg_err.h b/engines/e_afalg_err.h
index 3eb1332bbf..3036443f44 100644
--- a/engines/e_afalg_err.h
+++ b/engines/e_afalg_err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_AFALGERR_H
-# define HEADER_AFALGERR_H
+#ifndef OSSL_ENGINES_E_AFALG_ERR_H
+# define OSSL_ENGINES_E_AFALG_ERR_H
# define AFALGerr(f, r) ERR_AFALG_error((f), (r), OPENSSL_FILE, OPENSSL_LINE)
diff --git a/engines/e_capi_err.h b/engines/e_capi_err.h
index e034c98cae..e3a927aa73 100644
--- a/engines/e_capi_err.h
+++ b/engines/e_capi_err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CAPIERR_H
-# define HEADER_CAPIERR_H
+#ifndef OSSL_ENGINES_E_CAPI_ERR_H
+# define OSSL_ENGINES_E_CAPI_ERR_H
# define CAPIerr(f, r) ERR_CAPI_error((f), (r), OPENSSL_FILE, OPENSSL_LINE)
diff --git a/engines/e_dasync_err.h b/engines/e_dasync_err.h
index 7c2c027879..5b74d8be25 100644
--- a/engines/e_dasync_err.h
+++ b/engines/e_dasync_err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_DASYNCERR_H
-# define HEADER_DASYNCERR_H
+#ifndef OSSL_ENGINES_E_DASYNC_ERR_H
+# define OSSL_ENGINES_E_DASYNC_ERR_H
# define DASYNCerr(f, r) ERR_DASYNC_error((f), (r), OPENSSL_FILE, OPENSSL_LINE)
diff --git a/engines/e_ossltest_err.h b/engines/e_ossltest_err.h
index e745c1a236..8e6535b76c 100644
--- a/engines/e_ossltest_err.h
+++ b/engines/e_ossltest_err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_OSSLTESTERR_H
-# define HEADER_OSSLTESTERR_H
+#ifndef OSSL_ENGINES_E_OSSLTEST_ERR_H
+# define OSSL_ENGINES_E_OSSLTEST_ERR_H
# define OSSLTESTerr(f, r) ERR_OSSLTEST_error((f), (r), OPENSSL_FILE, OPENSSL_LINE)
diff --git a/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H b/include/crypto/__DECC_INCLUDE_EPILOGUE.H
similarity index 100%
rename from crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H
rename to include/crypto/__DECC_INCLUDE_EPILOGUE.H
diff --git a/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H b/include/crypto/__DECC_INCLUDE_PROLOGUE.H
similarity index 100%
rename from crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H
rename to include/crypto/__DECC_INCLUDE_PROLOGUE.H
diff --git a/crypto/include/internal/aria.h b/include/crypto/aria.h
similarity index 96%
rename from crypto/include/internal/aria.h
rename to include/crypto/aria.h
index 355abe5398..03a62950ae 100644
--- a/crypto/include/internal/aria.h
+++ b/include/crypto/aria.h
@@ -10,8 +10,8 @@
/* Copyright (c) 2017 National Security Research Institute. All rights reserved. */
-#ifndef HEADER_ARIA_H
-# define HEADER_ARIA_H
+#ifndef OSSL_CRYPTO_ARIA_H
+# define OSSL_CRYPTO_ARIA_H
# include <openssl/opensslconf.h>
diff --git a/crypto/include/internal/asn1_int.h b/include/crypto/asn1.h
similarity index 100%
rename from crypto/include/internal/asn1_int.h
rename to include/crypto/asn1.h
diff --git a/crypto/include/internal/async.h b/include/crypto/async.h
similarity index 100%
rename from crypto/include/internal/async.h
rename to include/crypto/async.h
diff --git a/crypto/include/internal/bn_int.h b/include/crypto/bn.h
similarity index 98%
rename from crypto/include/internal/bn_int.h
rename to include/crypto/bn.h
index 30be7efe14..60afda1dad 100644
--- a/crypto/include/internal/bn_int.h
+++ b/include/crypto/bn.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_BN_INT_H
-# define HEADER_BN_INT_H
+#ifndef OSSL_CRYPTO_BN_H
+# define OSSL_CRYPTO_BN_H
# include <openssl/bn.h>
# include <limits.h>
diff --git a/crypto/include/internal/bn_conf.h.in b/include/crypto/bn_conf.h.in
similarity index 93%
rename from crypto/include/internal/bn_conf.h.in
rename to include/crypto/bn_conf.h.in
index ec6e4f6c1b..b6b9eb743f 100644
--- a/crypto/include/internal/bn_conf.h.in
+++ b/include/crypto/bn_conf.h.in
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_BN_CONF_H
-# define HEADER_BN_CONF_H
+#ifndef OSSL_CRYPTO_BN_CONF_H
+# define OSSL_CRYPTO_BN_CONF_H
/*
* The contents of this file are not used in the UEFI build, as
diff --git a/crypto/include/internal/bn_dh.h b/include/crypto/bn_dh.h
similarity index 100%
rename from crypto/include/internal/bn_dh.h
rename to include/crypto/bn_dh.h
diff --git a/crypto/include/internal/bn_srp.h b/include/crypto/bn_srp.h
similarity index 100%
rename from crypto/include/internal/bn_srp.h
rename to include/crypto/bn_srp.h
diff --git a/crypto/include/internal/chacha.h b/include/crypto/chacha.h
similarity index 96%
rename from crypto/include/internal/chacha.h
rename to include/crypto/chacha.h
index 67243f2228..4029400a67 100644
--- a/crypto/include/internal/chacha.h
+++ b/include/crypto/chacha.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CHACHA_H
-#define HEADER_CHACHA_H
+#ifndef OSSL_CRYPTO_CHACHA_H
+#define OSSL_CRYPTO_CHACHA_H
#include <stddef.h>
diff --git a/crypto/include/internal/cryptlib_int.h b/include/crypto/cryptlib.h
similarity index 100%
rename from crypto/include/internal/cryptlib_int.h
rename to include/crypto/cryptlib.h
diff --git a/crypto/include/internal/ctype.h b/include/crypto/ctype.h
similarity index 98%
rename from crypto/include/internal/ctype.h
rename to include/crypto/ctype.h
index 9f3a58339c..81ef8f5cf7 100644
--- a/crypto/include/internal/ctype.h
+++ b/include/crypto/ctype.h
@@ -18,8 +18,8 @@
* throughout the rest of the source code. Refer to issue #4154 for
* details.
*/
-#ifndef INTERNAL_CTYPE_H
-# define INTERNAL_CTYPE_H
+#ifndef OSSL_CRYPTO_CTYPE_H
+# define OSSL_CRYPTO_CTYPE_H
# define CTYPE_MASK_lower 0x1
# define CTYPE_MASK_upper 0x2
diff --git a/crypto/include/internal/dso_conf.h.in b/include/crypto/dso_conf.h.in
similarity index 95%
rename from crypto/include/internal/dso_conf.h.in
rename to include/crypto/dso_conf.h.in
index b2ace48a80..57a09b10a2 100644
--- a/crypto/include/internal/dso_conf.h.in
+++ b/include/crypto/dso_conf.h.in
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_DSO_CONF_H
-# define HEADER_DSO_CONF_H
+#ifndef OSSL_CRYPTO_DSO_CONF_H
+# define OSSL_CRYPTO_DSO_CONF_H
{- # The DSO code currently always implements all functions so that no
# applications will have to worry about that from a compilation point
# of view. However, the "method"s may return zero unless that platform
diff --git a/crypto/include/internal/ec_int.h b/include/crypto/ec.h
similarity index 96%
rename from crypto/include/internal/ec_int.h
rename to include/crypto/ec.h
index 182c39cc80..fe52ae704b 100644
--- a/crypto/include/internal/ec_int.h
+++ b/include/crypto/ec.h
@@ -9,8 +9,8 @@
/* Internal EC functions for other submodules: not for application use */
-#ifndef HEADER_OSSL_EC_INTERNAL_H
-# define HEADER_OSSL_EC_INTERNAL_H
+#ifndef OSSL_CRYPTO_EC_H
+# define OSSL_CRYPTO_EC_H
# include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_EC
diff --git a/crypto/include/internal/engine.h b/include/crypto/engine.h
similarity index 100%
rename from crypto/include/internal/engine.h
rename to include/crypto/engine.h
diff --git a/crypto/include/internal/err_int.h b/include/crypto/err.h
similarity index 90%
rename from crypto/include/internal/err_int.h
rename to include/crypto/err.h
index 44ac944627..8ab0e5baaa 100644
--- a/crypto/include/internal/err_int.h
+++ b/include/crypto/err.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef INTERNAL_ERR_INT_H
-# define INTERNAL_ERR_INT_H
+#ifndef OSSL_CRYPTO_ERR_H
+# define OSSL_CRYPTO_ERR_H
int err_load_crypto_strings_int(void);
void err_cleanup(void);
diff --git a/crypto/include/internal/evp_int.h b/include/crypto/evp.h
similarity index 100%
rename from crypto/include/internal/evp_int.h
rename to include/crypto/evp.h
diff --git a/crypto/include/internal/lhash.h b/include/crypto/lhash.h
similarity index 87%
rename from crypto/include/internal/lhash.h
rename to include/crypto/lhash.h
index 200ba8685d..ab060cce74 100644
--- a/crypto/include/internal/lhash.h
+++ b/include/crypto/lhash.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef INTERNAL_LHASH_H
-# define INTERNAL_LHASH_H
+#ifndef OSSL_CRYPTO_LHASH_H
+# define OSSL_CRYPTO_LHASH_H
unsigned long openssl_lh_strcasehash(const char *);
diff --git a/crypto/include/internal/md32_common.h b/include/crypto/md32_common.h
similarity index 100%
rename from crypto/include/internal/md32_common.h
rename to include/crypto/md32_common.h
diff --git a/crypto/include/internal/objects.h b/include/crypto/objects.h
similarity index 100%
rename from crypto/include/internal/objects.h
rename to include/crypto/objects.h
diff --git a/crypto/include/internal/poly1305.h b/include/crypto/poly1305.h
similarity index 100%
rename from crypto/include/internal/poly1305.h
rename to include/crypto/poly1305.h
diff --git a/crypto/include/internal/rand_int.h b/include/crypto/rand.h
similarity index 98%
rename from crypto/include/internal/rand_int.h
rename to include/crypto/rand.h
index 10347ab0e3..5350d3a931 100644
--- a/crypto/include/internal/rand_int.h
+++ b/include/crypto/rand.h
@@ -15,8 +15,8 @@
* or in the file LICENSE in the source distribution.
*/
-#ifndef HEADER_RAND_INT_H
-# define HEADER_RAND_INT_H
+#ifndef OSSL_CRYPTO_RAND_H
+# define OSSL_CRYPTO_RAND_H
# include <openssl/rand.h>
diff --git a/crypto/include/internal/sha.h b/include/crypto/sha.h
similarity index 89%
rename from crypto/include/internal/sha.h
rename to include/crypto/sha.h
index 458a75e89d..6d15edb9e5 100644
--- a/crypto/include/internal/sha.h
+++ b/include/crypto/sha.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_INTERNAL_SHA_H
-# define HEADER_INTERNAL_SHA_H
+#ifndef OSSL_CRYPTO_SHA_H
+# define OSSL_CRYPTO_SHA_H
# include <openssl/opensslconf.h>
diff --git a/crypto/include/internal/siphash.h b/include/crypto/siphash.h
similarity index 100%
rename from crypto/include/internal/siphash.h
rename to include/crypto/siphash.h
diff --git a/crypto/include/internal/sm2.h b/include/crypto/sm2.h
similarity index 97%
rename from crypto/include/internal/sm2.h
rename to include/crypto/sm2.h
index 5c5cd4b4f5..76ee80baff 100644
--- a/crypto/include/internal/sm2.h
+++ b/include/crypto/sm2.h
@@ -9,8 +9,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SM2_H
-# define HEADER_SM2_H
+#ifndef OSSL_CRYPTO_SM2_H
+# define OSSL_CRYPTO_SM2_H
# include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_SM2
diff --git a/crypto/include/internal/sm2err.h b/include/crypto/sm2err.h
similarity index 97%
rename from crypto/include/internal/sm2err.h
rename to include/crypto/sm2err.h
index 09edfab787..d1c0ee2591 100644
--- a/crypto/include/internal/sm2err.h
+++ b/include/crypto/sm2err.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SM2ERR_H
-# define HEADER_SM2ERR_H
+#ifndef OSSL_CRYPTO_SM2ERR_H
+# define OSSL_CRYPTO_SM2ERR_H
# ifndef HEADER_SYMHACKS_H
# include <openssl/symhacks.h>
diff --git a/crypto/include/internal/sm3.h b/include/crypto/sm3.h
similarity index 94%
rename from crypto/include/internal/sm3.h
rename to include/crypto/sm3.h
index 27eb471c28..97e7460333 100644
--- a/crypto/include/internal/sm3.h
+++ b/include/crypto/sm3.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SM3_H
-# define HEADER_SM3_H
+#ifndef OSSL_CRYPTO_SM3_H
+# define OSSL_CRYPTO_SM3_H
# include <openssl/opensslconf.h>
diff --git a/crypto/include/internal/sm4.h b/include/crypto/sm4.h
similarity index 94%
rename from crypto/include/internal/sm4.h
rename to include/crypto/sm4.h
index f1f157ef53..abe28f385e 100644
--- a/crypto/include/internal/sm4.h
+++ b/include/crypto/sm4.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SM4_H
-# define HEADER_SM4_H
+#ifndef OSSL_CRYPTO_SM4_H
+# define OSSL_CRYPTO_SM4_H
# include <openssl/opensslconf.h>
# include <openssl/e_os2.h>
diff --git a/crypto/include/internal/store_int.h b/include/crypto/store.h
similarity index 82%
rename from crypto/include/internal/store_int.h
rename to include/crypto/store.h
index 6f31e019ea..428d3c60e1 100644
--- a/crypto/include/internal/store_int.h
+++ b/include/crypto/store.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2019 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
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_STORE_INT_H
-# define HEADER_STORE_INT_H
+#ifndef OSSL_CRYPTO_STORE_H
+# define OSSL_CRYPTO_STORE_H
# include <openssl/bio.h>
# include <openssl/store.h>
@@ -23,4 +23,6 @@ OSSL_STORE_CTX *ossl_store_attach_pem_bio(BIO *bp, const UI_METHOD *ui_method,
void *ui_data);
int ossl_store_detach_pem_bio(OSSL_STORE_CTX *ctx);
+void ossl_store_cleanup_int(void);
+
#endif
diff --git a/crypto/include/internal/x509_int.h b/include/crypto/x509.h
similarity index 100%
rename from crypto/include/internal/x509_int.h
rename to include/crypto/x509.h
diff --git a/include/internal/conf.h b/include/internal/conf.h
index 29bc9f963c..163fea8de4 100644
--- a/include/internal/conf.h
+++ b/include/internal/conf.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_INTERNAL_CONF_H
-# define HEADER_INTERNAL_CONF_H
+#ifndef OSSL_INTERNAL_CONF_H
+# define OSSL_INTERNAL_CONF_H
#include <openssl/conf.h>
diff --git a/include/internal/constant_time_locl.h b/include/internal/constant_time.h
similarity index 98%
rename from include/internal/constant_time_locl.h
rename to include/internal/constant_time.h
index 0193a653d4..6600a1d72a 100644
--- a/include/internal/constant_time_locl.h
+++ b/include/internal/constant_time.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CONSTANT_TIME_LOCL_H
-# define HEADER_CONSTANT_TIME_LOCL_H
+#ifndef OSSL_INTERNAL_CONSTANT_TIME_H
+# define OSSL_INTERNAL_CONSTANT_TIME_H
# include <stdlib.h>
# include <string.h>
@@ -384,4 +384,4 @@ static ossl_inline void constant_time_lookup(void *out,
*/
void err_clear_last_constant_time(int clear);
-#endif /* HEADER_CONSTANT_TIME_LOCL_H */
+#endif /* OSSL_INTERNAL_CONSTANT_TIME_H */
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index 23e17e5586..6e7291ae41 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_CRYPTLIB_H
-# define HEADER_CRYPTLIB_H
+#ifndef OSSL_INTERNAL_CRYPTLIB_H
+# define OSSL_INTERNAL_CRYPTLIB_H
# include <stdlib.h>
# include <string.h>
diff --git a/include/internal/dane.h b/include/internal/dane.h
index a1cb5488ba..7a39bd7d7d 100644
--- a/include/internal/dane.h
+++ b/include/internal/dane.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_INTERNAL_DANE_H
-#define HEADER_INTERNAL_DANE_H
+#ifndef OSSL_INTERNAL_DANE_H
+#define OSSL_INTERNAL_DANE_H
#include <openssl/safestack.h>
@@ -100,4 +100,4 @@ struct ssl_dane_st {
#define DANETLS_HAS_DANE_TA(dane) ((dane)&&((dane)->umask & DANETLS_DANE_TA_MASK))
#define DANETLS_HAS_DANE_EE(dane) ((dane)&&((dane)->umask & DANETLS_DANE_EE_MASK))
-#endif /* HEADER_INTERNAL_DANE_H */
+#endif /* OSSL_INTERNAL_DANE_H */
diff --git a/include/internal/dso.h b/include/internal/dso.h
index eb5f7d53c7..c57c0c4075 100644
--- a/include/internal/dso.h
+++ b/include/internal/dso.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_DSO_H
-# define HEADER_DSO_H
+#ifndef OSSL_INTERNAL_DSO_H
+# define OSSL_INTERNAL_DSO_H
# include <openssl/crypto.h>
# include "internal/dsoerr.h"
diff --git a/include/internal/dsoerr.h b/include/internal/dsoerr.h
index 5f4511c4d6..94d642a22d 100644
--- a/include/internal/dsoerr.h
+++ b/include/internal/dsoerr.h
@@ -8,8 +8,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_DSOERR_H
-# define HEADER_DSOERR_H
+#ifndef OSSL_INTERNAL_DSOERR_H
+# define OSSL_INTERNAL_DSOERR_H
# ifndef HEADER_SYMHACKS_H
# include <openssl/symhacks.h>
diff --git a/include/internal/err.h b/include/internal/err.h
index d46b8bdb29..88dde70591 100644
--- a/include/internal/err.h
+++ b/include/internal/err.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef INTERNAL_ERR_H
-# define INTERNAL_ERR_H
+#ifndef OSSL_INTERNAL_ERR_H
+# define OSSL_INTERNAL_ERR_H
void err_free_strings_int(void);
diff --git a/include/internal/nelem.h b/include/internal/nelem.h
index d65a21a9fb..699ef88ee5 100644
--- a/include/internal/nelem.h
+++ b/include/internal/nelem.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_NELEM_H
-# define HEADER_NELEM_H
+#ifndef OSSL_INTERNAL_NELEM_H
+# define OSSL_INTERNAL_NELEM_H
# define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
#endif
diff --git a/include/internal/numbers.h b/include/internal/numbers.h
index 31931df3c2..f5ade5226e 100644
--- a/include/internal/numbers.h
+++ b/include/internal/numbers.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_NUMBERS_H
-# define HEADER_NUMBERS_H
+#ifndef OSSL_INTERNAL_NUMBERS_H
+# define OSSL_INTERNAL_NUMBERS_H
# include <limits.h>
diff --git a/include/internal/o_dir.h b/include/internal/o_dir.h
index e7b55e0c18..dafc8dd2e7 100644
--- a/include/internal/o_dir.h
+++ b/include/internal/o_dir.h
@@ -36,8 +36,8 @@
* SUCH DAMAGE.
*/
-#ifndef O_DIR_H
-# define O_DIR_H
+#ifndef OSSL_INTERNAL_O_DIR_H
+# define OSSL_INTERNAL_O_DIR_H
typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
diff --git a/include/internal/o_str.h b/include/internal/o_str.h
index 86403c9ee2..15c12e820d 100644
--- a/include/internal/o_str.h
+++ b/include/internal/o_str.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_O_STR_H
-# define HEADER_O_STR_H
+#ifndef OSSL_INTERNAL_O_STR_H
+# define OSSL_INTERNAL_O_STR_H
# include <stddef.h> /* to get size_t */
diff --git a/include/internal/refcount.h b/include/internal/refcount.h
index 6e1a840ef1..8fb536eadc 100644
--- a/include/internal/refcount.h
+++ b/include/internal/refcount.h
@@ -6,8 +6,8 @@
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_INTERNAL_REFCOUNT_H
-# define HEADER_INTERNAL_REFCOUNT_H
+#ifndef OSSL_INTERNAL_REFCOUNT_H
+# define OSSL_INTERNAL_REFCOUNT_H
/* Used to checking reference counts, most while doing perl5 stuff :-) */
# if defined(OPENSSL_NO_STDIO)
diff --git a/include/internal/sockets.h b/include/internal/sockets.h
index 5bb0355f07..39186efef2 100644
--- a/include/internal/sockets.h
+++ b/include/internal/sockets.h
@@ -8,8 +8,8 @@
*/
-#ifndef HEADER_INTERNAL_SOCKETS
-# define HEADER_INTERNAL_SOCKETS
+#ifndef OSSL_INTERNAL_SOCKETS_H
+# define OSSL_INTERNAL_SOCKETS_H
# if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)
# define NO_SYS_PARAM_H
diff --git a/include/internal/sslconf.h b/include/internal/sslconf.h
index d538f8614f..92c8941d02 100644
--- a/include/internal/sslconf.h
+++ b/include/internal/sslconf.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SSLCONF_H
-# define HEADER_SSLCONF_H
+#ifndef OSSL_INTERNAL_SSLCONF_H
+# define OSSL_INTERNAL_SSLCONF_H
typedef struct ssl_conf_cmd_st SSL_CONF_CMD;
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index d1876d8b8c..ab9e6668cd 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -14,7 +14,7 @@
#include <openssl/crypto.h>
#include "internal/bio.h"
#include <openssl/err.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
static int ssl_write(BIO *h, const char *buf, size_t size, size_t *written);
static int ssl_read(BIO *b, char *buf, size_t size, size_t *readbytes);
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index fcda327547..2a15ee8ad9 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <openssl/objects.h>
#include <openssl/rand.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
static void get_current_time(struct timeval *t);
static int dtls1_handshake_write(SSL *s);
diff --git a/ssl/d1_msg.c b/ssl/d1_msg.c
index 6365b365e7..8a31064ae1 100644
--- a/ssl/d1_msg.c
+++ b/ssl/d1_msg.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ssl_locl.h"
+#include "ssl_local.h"
int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, size_t len,
size_t *written)
diff --git a/ssl/d1_srtp.c b/ssl/d1_srtp.c
index ff8f0c5712..c05a77e346 100644
--- a/ssl/d1_srtp.c
+++ b/ssl/d1_srtp.c
@@ -15,7 +15,7 @@
#include <stdio.h>
#include <openssl/objects.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#ifndef OPENSSL_NO_SRTP
diff --git a/ssl/methods.c b/ssl/methods.c
index 348efe467d..c5e8898364 100644
--- a/ssl/methods.c
+++ b/ssl/methods.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <openssl/objects.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
/*-
* TLS/SSLv3 methods
diff --git a/ssl/packet.c b/ssl/packet.c
index 95031430ed..1ddde969f3 100644
--- a/ssl/packet.c
+++ b/ssl/packet.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "packet_locl.h"
+#include "packet_local.h"
#include <openssl/sslerr.h>
#define DEFAULT_BUF_SIZE 256
diff --git a/ssl/packet_locl.h b/ssl/packet_local.h
similarity index 99%
rename from ssl/packet_locl.h
rename to ssl/packet_local.h
index 860360b8b2..1b6c2fb9bc 100644
--- a/ssl/packet_locl.h
+++ b/ssl/packet_local.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_PACKET_LOCL_H
-# define HEADER_PACKET_LOCL_H
+#ifndef OSSL_SSL_PACKET_LOCAL_H
+# define OSSL_SSL_PACKET_LOCAL_H
# include <string.h>
# include <openssl/bn.h>
@@ -871,4 +871,4 @@ unsigned char *WPACKET_get_curr(WPACKET *pkt);
/* Release resources in a WPACKET if a failure has occurred. */
void WPACKET_cleanup(WPACKET *pkt);
-#endif /* HEADER_PACKET_LOCL_H */
+#endif /* OSSL_SSL_PACKET_LOCAL_H */
diff --git a/ssl/pqueue.c b/ssl/pqueue.c
index 548a7a443d..758440217d 100644
--- a/ssl/pqueue.c
+++ b/ssl/pqueue.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/bn.h>
struct pqueue_st {
diff --git a/ssl/record/README b/ssl/record/README
index 987e9fd305..630fe8027a 100644
--- a/ssl/record/README
+++ b/ssl/record/README
@@ -12,7 +12,7 @@ of these components is defined by:
3) A set of accessor macros
All struct definitions are in record.h. The functions and macros are either
-defined in record.h or record_locl.h dependent on whether they are intended to
+defined in record.h or record_local.h dependent on whether they are intended to
be private to the record layer, or whether they form part of the API to the rest
of libssl.
@@ -55,7 +55,7 @@ Conceptually it looks like this:
|| rec_layer_d1.c ||
||____________________||
|______________________|
- record_locl.h ^ ^ ^
+ record_local.h ^ ^ ^
_________________| | |_________________
| | |
_____V_________ ______V________ _______V________
diff --git a/ssl/record/dtls1_bitmap.c b/ssl/record/dtls1_bitmap.c
index 5923c53717..8167b41834 100644
--- a/ssl/record/dtls1_bitmap.c
+++ b/ssl/record/dtls1_bitmap.c
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#include "../ssl_locl.h"
-#include "record_locl.h"
+#include "../ssl_local.h"
+#include "record_local.h"
/* mod 128 saturating subtract of two 64-bit values in big-endian order */
static int satsub64be(const unsigned char *v1, const unsigned char *v2)
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index cb5d54ef5a..73ca8a6ee4 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -9,11 +9,11 @@
#include <stdio.h>
#include <errno.h>
-#include "../ssl_locl.h"
+#include "../ssl_local.h"
#include <openssl/evp.h>
#include <openssl/buffer.h>
-#include "record_locl.h"
-#include "../packet_locl.h"
+#include "record_local.h"
+#include "../packet_local.h"
#include "internal/cryptlib.h"
int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl)
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 982a06089c..76a00fc510 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -10,12 +10,12 @@
#include <stdio.h>
#include <limits.h>
#include <errno.h>
-#include "../ssl_locl.h"
+#include "../ssl_local.h"
#include <openssl/evp.h>
#include <openssl/buffer.h>
#include <openssl/rand.h>
-#include "record_locl.h"
-#include "../packet_locl.h"
+#include "record_local.h"
+#include "../packet_local.h"
#if defined(OPENSSL_SMALL_FOOTPRINT) || \
!( defined(AES_ASM) && ( \
diff --git a/ssl/record/record_locl.h b/ssl/record/record_local.h
similarity index 100%
rename from ssl/record/record_locl.h
rename to ssl/record/record_local.h
diff --git a/ssl/record/ssl3_buffer.c b/ssl/record/ssl3_buffer.c
index 53bd4cb190..605f8f9b75 100644
--- a/ssl/record/ssl3_buffer.c
+++ b/ssl/record/ssl3_buffer.c
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#include "../ssl_locl.h"
-#include "record_locl.h"
+#include "../ssl_local.h"
+#include "record_local.h"
void SSL3_BUFFER_set_data(SSL3_BUFFER *b, const unsigned char *d, size_t n)
{
diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c
index e59ac5a676..d116ff0e90 100644
--- a/ssl/record/ssl3_record.c
+++ b/ssl/record/ssl3_record.c
@@ -7,10 +7,10 @@
* https://www.openssl.org/source/license.html
*/
-#include "../ssl_locl.h"
-#include "internal/constant_time_locl.h"
+#include "../ssl_local.h"
+#include "internal/constant_time.h"
#include <openssl/rand.h>
-#include "record_locl.h"
+#include "record_local.h"
#include "internal/cryptlib.h"
static const unsigned char ssl3_pad_1[48] = {
diff --git a/ssl/record/ssl3_record_tls13.c b/ssl/record/ssl3_record_tls13.c
index a11ed483e6..89d789cb23 100644
--- a/ssl/record/ssl3_record_tls13.c
+++ b/ssl/record/ssl3_record_tls13.c
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#include "../ssl_locl.h"
-#include "record_locl.h"
+#include "../ssl_local.h"
+#include "record_local.h"
#include "internal/cryptlib.h"
/*-
diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c
index 8377d7fe13..aa7d63f84a 100644
--- a/ssl/s3_cbc.c
+++ b/ssl/s3_cbc.c
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/constant_time_locl.h"
-#include "ssl_locl.h"
+#include "internal/constant_time.h"
+#include "ssl_local.h"
#include "internal/cryptlib.h"
#include <openssl/md5.h>
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 2e185e9fba..8a89f512fe 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -9,7 +9,7 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/evp.h>
#include <openssl/md5.h>
#include "internal/cryptlib.h"
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 066bf47221..0cb3e8ccd3 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -12,7 +12,7 @@
#include <stdio.h>
#include <openssl/objects.h>
#include "internal/nelem.h"
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/md5.h>
#include <openssl/dh.h>
#include <openssl/rand.h>
diff --git a/ssl/s3_msg.c b/ssl/s3_msg.c
index 42382547fb..339fb2774a 100644
--- a/ssl/s3_msg.c
+++ b/ssl/s3_msg.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ssl_locl.h"
+#include "ssl_local.h"
int ssl3_do_change_cipher_spec(SSL *s)
{
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c
index b56c5e96c5..799fee771b 100644
--- a/ssl/ssl_asn1.c
+++ b/ssl/ssl_asn1.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/asn1t.h>
#include <openssl/x509.h>
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 9df9fb9677..b56099e33c 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -20,7 +20,7 @@
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include "internal/refcount.h"
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include "ssl_cert_table.h"
#include "internal/thread_once.h"
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 27a1b2ec68..735a483c64 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -17,7 +17,7 @@
#include <openssl/crypto.h>
#include <openssl/conf.h>
#include "internal/nelem.h"
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include "internal/thread_once.h"
#include "internal/cryptlib.h"
@@ -92,7 +92,7 @@ static CRYPTO_ONCE ssl_load_builtin_comp_once = CRYPTO_ONCE_STATIC_INIT;
/*
* Constant SSL_MAX_DIGEST equal to size of digests array should be defined
- * in the ssl_locl.h
+ * in the ssl_local.h
*/
#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c
index 9c202708d7..8ef29bb345 100644
--- a/ssl/ssl_conf.c
+++ b/ssl/ssl_conf.c
@@ -8,7 +8,7 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/conf.h>
#include <openssl/objects.h>
#include <openssl/dh.h>
diff --git a/ssl/ssl_init.c b/ssl/ssl_init.c
index f0969fa9b1..d083d95970 100644
--- a/ssl/ssl_init.c
+++ b/ssl/ssl_init.c
@@ -12,7 +12,7 @@
#include "internal/err.h"
#include <openssl/crypto.h>
#include <openssl/evp.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include "internal/thread_once.h"
static int stopped;
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index ac820cf9fe..0d0c0dbd6a 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -10,7 +10,7 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/objects.h>
#include <openssl/x509v3.h>
#include <openssl/rand.h>
diff --git a/ssl/ssl_locl.h b/ssl/ssl_local.h
similarity index 99%
rename from ssl/ssl_locl.h
rename to ssl/ssl_local.h
index 25875c9f6d..d335df252e 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_local.h
@@ -9,8 +9,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SSL_LOCL_H
-# define HEADER_SSL_LOCL_H
+#ifndef OSSL_SSL_LOCAL_H
+# define OSSL_SSL_LOCAL_H
# include "e_os.h" /* struct timeval for DTLS */
# include <stdlib.h>
@@ -30,7 +30,7 @@
# include <openssl/ct.h>
# include "record/record.h"
# include "statem/statem.h"
-# include "packet_locl.h"
+# include "packet_local.h"
# include "internal/dane.h"
# include "internal/refcount.h"
# include "internal/tsan_assist.h"
diff --git a/ssl/ssl_mcnf.c b/ssl/ssl_mcnf.c
index a0e2657714..583df41669 100644
--- a/ssl/ssl_mcnf.c
+++ b/ssl/ssl_mcnf.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <openssl/conf.h>
#include <openssl/ssl.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include "internal/sslconf.h"
/* SSL library configuration module. */
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c
index 172e15f920..b9693527b3 100644
--- a/ssl/ssl_rsa.c
+++ b/ssl/ssl_rsa.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
-#include "packet_locl.h"
+#include "ssl_local.h"
+#include "packet_local.h"
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 52cfa7ef6d..40c157bb42 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -13,8 +13,8 @@
#include <openssl/engine.h>
#include "internal/refcount.h"
#include "internal/cryptlib.h"
-#include "ssl_locl.h"
-#include "statem/statem_locl.h"
+#include "ssl_local.h"
+#include "statem/statem_local.h"
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
diff --git a/ssl/ssl_stat.c b/ssl/ssl_stat.c
index 179513b1a3..ca51c0331c 100644
--- a/ssl/ssl_stat.c
+++ b/ssl/ssl_stat.c
@@ -9,7 +9,7 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
const char *SSL_state_string_long(const SSL *s)
{
diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c
index cf6e4c3c05..457bc8b3c2 100644
--- a/ssl/ssl_txt.c
+++ b/ssl/ssl_txt.c
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <openssl/buffer.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#ifndef OPENSSL_NO_STDIO
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x)
diff --git a/ssl/ssl_utst.c b/ssl/ssl_utst.c
index cea1bc2707..487f56e539 100644
--- a/ssl/ssl_utst.c
+++ b/ssl/ssl_utst.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ssl_locl.h"
+#include "ssl_local.h"
#ifndef OPENSSL_NO_UNIT_TEST
diff --git a/ssl/statem/README b/ssl/statem/README
index 145c69db8d..86cc066372 100644
--- a/ssl/statem/README
+++ b/ssl/statem/README
@@ -40,7 +40,7 @@ Conceptually the state machine component is designed as follows:
| |
| Core state machine code |
|____________________________|
- statem_locl.h ^ ^
+ statem_local.h ^ ^
_________| |_______
| |
_____________|____________ _____________|____________
diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 24410991b2..ae3354c1bc 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -10,8 +10,8 @@
#include <string.h>
#include "internal/nelem.h"
#include "internal/cryptlib.h"
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include "internal/cryptlib.h"
static int final_renegotiate(SSL *s, unsigned int context, int sent);
@@ -94,7 +94,7 @@ typedef struct extensions_definition_st {
/*
* Definitions of all built-in extensions. NOTE: Changes in the number or order
* of these extensions should be mirrored with equivalent changes to the
- * indexes ( TLSEXT_IDX_* ) defined in ssl_locl.h.
+ * indexes ( TLSEXT_IDX_* ) defined in ssl_local.h.
* Each extension has an initialiser, a client and
* server side parser and a finaliser. The initialiser is called (if the
* extension is relevant to the given context) even if we did not see the
diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c
index f0ae642fa0..bcce0f1d95 100644
--- a/ssl/statem/extensions_clnt.c
+++ b/ssl/statem/extensions_clnt.c
@@ -8,9 +8,9 @@
*/
#include <openssl/ocsp.h>
-#include "../ssl_locl.h"
+#include "../ssl_local.h"
#include "internal/cryptlib.h"
-#include "statem_locl.h"
+#include "statem_local.h"
EXT_RETURN tls_construct_ctos_renegotiate(SSL *s, WPACKET *pkt,
unsigned int context, X509 *x,
diff --git a/ssl/statem/extensions_cust.c b/ssl/statem/extensions_cust.c
index a4cdc81d68..a0ba18efa7 100644
--- a/ssl/statem/extensions_cust.c
+++ b/ssl/statem/extensions_cust.c
@@ -10,9 +10,9 @@
/* Custom extension utility functions */
#include <openssl/ct.h>
-#include "../ssl_locl.h"
+#include "../ssl_local.h"
#include "internal/cryptlib.h"
-#include "statem_locl.h"
+#include "statem_local.h"
typedef struct {
void *add_arg;
diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c
index ab5453f63e..de273a3b96 100644
--- a/ssl/statem/extensions_srvr.c
+++ b/ssl/statem/extensions_srvr.c
@@ -8,8 +8,8 @@
*/
#include <openssl/ocsp.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include "internal/cryptlib.h"
#define COOKIE_STATE_FORMAT_VERSION 0
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index e3c5ec0038..20f5bd584e 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -9,8 +9,8 @@
#include "internal/cryptlib.h"
#include <openssl/rand.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include <assert.h>
/*
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 6410414fb6..64e392cfbf 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -12,8 +12,8 @@
#include <stdio.h>
#include <time.h>
#include <assert.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include <openssl/buffer.h>
#include <openssl/rand.h>
#include <openssl/objects.h>
diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c
index b016fa7cff..8e3fb686ee 100644
--- a/ssl/statem/statem_dtls.c
+++ b/ssl/statem/statem_dtls.c
@@ -10,8 +10,8 @@
#include <limits.h>
#include <string.h>
#include <stdio.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/objects.h>
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c
index 22e9f0490e..ed52b18d3a 100644
--- a/ssl/statem/statem_lib.c
+++ b/ssl/statem/statem_lib.c
@@ -11,8 +11,8 @@
#include <limits.h>
#include <string.h>
#include <stdio.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/objects.h>
diff --git a/ssl/statem/statem_locl.h b/ssl/statem/statem_local.h
similarity index 100%
rename from ssl/statem/statem_locl.h
rename to ssl/statem/statem_local.h
diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c
index 8cf9c40d15..48142f3b8a 100644
--- a/ssl/statem/statem_srvr.c
+++ b/ssl/statem/statem_srvr.c
@@ -10,9 +10,9 @@
*/
#include <stdio.h>
-#include "../ssl_locl.h"
-#include "statem_locl.h"
-#include "internal/constant_time_locl.h"
+#include "../ssl_local.h"
+#include "statem_local.h"
+#include "internal/constant_time.h"
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/rand.h>
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 57fb17a660..9a9cbe1835 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -9,7 +9,7 @@
*/
#include <stdio.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/comp.h>
#include <openssl/evp.h>
#include <openssl/kdf.h>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index b482019c4c..9a6328449f 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -18,7 +18,7 @@
#include <openssl/dh.h>
#include <openssl/bn.h>
#include "internal/nelem.h"
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include <openssl/ct.h>
static const SIGALG_LOOKUP *find_sig_alg(SSL *s, X509 *x, EVP_PKEY *pkey);
diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c
index be3039af38..0559fba9d9 100644
--- a/ssl/t1_trce.c
+++ b/ssl/t1_trce.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "ssl_locl.h"
+#include "ssl_local.h"
#ifndef OPENSSL_NO_SSL_TRACE
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index b5f57a02f7..36de1943ef 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -8,7 +8,7 @@
*/
#include <stdlib.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/kdf.h>
diff --git a/ssl/tls_srp.c b/ssl/tls_srp.c
index f94e46b4e8..ede7427ff8 100644
--- a/ssl/tls_srp.c
+++ b/ssl/tls_srp.c
@@ -14,7 +14,7 @@
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/err.h>
-#include "ssl_locl.h"
+#include "ssl_local.h"
#ifndef OPENSSL_NO_SRP
# include <openssl/srp.h>
diff --git a/test/asn1_internal_test.c b/test/asn1_internal_test.c
index 63278040b6..865e058421 100644
--- a/test/asn1_internal_test.c
+++ b/test/asn1_internal_test.c
@@ -59,7 +59,7 @@ static int test_tbl_standard(void)
*
***/
-#include "internal/asn1_int.h"
+#include "crypto/asn1.h"
#include "../crypto/asn1/standard_methods.h"
static int test_standard_methods(void)
diff --git a/test/asynciotest.c b/test/asynciotest.c
index 5e85cbb044..5a12d01344 100644
--- a/test/asynciotest.c
+++ b/test/asynciotest.c
@@ -13,7 +13,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "ssltestlib.h"
#include "testutil.h"
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c
index 1c836b9c17..e06206b6ac 100644
--- a/test/bad_dtls_test.c
+++ b/test/bad_dtls_test.c
@@ -37,7 +37,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/kdf.h>
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "internal/nelem.h"
#include "testutil.h"
diff --git a/test/build.info b/test/build.info
index 1727f28626..a1822ab706 100644
--- a/test/build.info
+++ b/test/build.info
@@ -491,7 +491,7 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=MAIN
DEPEND[wpackettest]=../libcrypto ../libssl.a libtestutil.a
SOURCE[ctype_internal_test]=ctype_internal_test.c
- INCLUDE[ctype_internal_test]=.. ../crypto/include ../include
+ INCLUDE[ctype_internal_test]=.. ../include
DEPEND[ctype_internal_test]=../libcrypto.a libtestutil.a
SOURCE[siphash_internal_test]=siphash_internal_test.c
diff --git a/test/chacha_internal_test.c b/test/chacha_internal_test.c
index be44012187..dcb3c23728 100644
--- a/test/chacha_internal_test.c
+++ b/test/chacha_internal_test.c
@@ -15,7 +15,7 @@
#include <string.h>
#include <openssl/opensslconf.h>
#include "testutil.h"
-#include "internal/chacha.h"
+#include "crypto/chacha.h"
static const unsigned int key[] = {
0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
diff --git a/test/cipher_overhead_test.c b/test/cipher_overhead_test.c
index f8c6fd738e..2275fceda0 100644
--- a/test/cipher_overhead_test.c
+++ b/test/cipher_overhead_test.c
@@ -15,7 +15,7 @@
# pragma names as_is,shortened
#endif
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
#ifdef __VMS
# pragma names restore
diff --git a/test/clienthellotest.c b/test/clienthellotest.c
index 862ca9ff6c..8ae1e4d9c6 100644
--- a/test/clienthellotest.c
+++ b/test/clienthellotest.c
@@ -17,7 +17,7 @@
#include <openssl/err.h>
#include <time.h>
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "testutil.h"
diff --git a/test/constant_time_test.c b/test/constant_time_test.c
index e5e3e497c0..25f5392801 100644
--- a/test/constant_time_test.c
+++ b/test/constant_time_test.c
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include "internal/nelem.h"
-#include "internal/constant_time_locl.h"
+#include "internal/constant_time.h"
#include "testutil.h"
#include "internal/numbers.h"
diff --git a/test/ctype_internal_test.c b/test/ctype_internal_test.c
index a4613031fe..1bb61ab1fc 100644
--- a/test/ctype_internal_test.c
+++ b/test/ctype_internal_test.c
@@ -8,7 +8,7 @@
*/
#include "testutil.h"
-#include "internal/ctype.h"
+#include "crypto/ctype.h"
#include "internal/nelem.h"
#include <ctype.h>
#include <stdio.h>
diff --git a/test/curve448_internal_test.c b/test/curve448_internal_test.c
index e7d4378527..4b65ee3fad 100644
--- a/test/curve448_internal_test.c
+++ b/test/curve448_internal_test.c
@@ -16,7 +16,7 @@
# pragma names as_is,shortened
#endif
-#include "curve448_lcl.h"
+#include "curve448_local.h"
#ifdef __VMS
# pragma names restore
diff --git a/test/drbg_cavs_data.h b/test/drbg_cavs_data.h
index d673375619..c04b01298d 100644
--- a/test/drbg_cavs_data.h
+++ b/test/drbg_cavs_data.h
@@ -13,8 +13,8 @@
#include <stddef.h>
-#ifndef DRBG_CAVS_DATA_H
-# define DRBG_CAVS_DATA_H
+#ifndef OSSL_TEST_DRBG_CAVS_DATA_H
+# define OSSL_TEST_DRBG_CAVS_DATA_H
enum drbg_kat_type {
NO_RESEED,
diff --git a/test/drbg_cavs_test.c b/test/drbg_cavs_test.c
index eea387b4f9..4573e2b0b7 100644
--- a/test/drbg_cavs_test.c
+++ b/test/drbg_cavs_test.c
@@ -15,7 +15,7 @@
#include <openssl/obj_mac.h>
#include <openssl/evp.h>
#include <openssl/aes.h>
-#include "../crypto/rand/rand_lcl.h"
+#include "../crypto/rand/rand_local.h"
#include "testutil.h"
#include "drbg_cavs_data.h"
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 7325e2ffa3..2aff4aaf03 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -15,8 +15,8 @@
#include <openssl/obj_mac.h>
#include <openssl/evp.h>
#include <openssl/aes.h>
-#include "../crypto/rand/rand_lcl.h"
-#include "../crypto/include/internal/rand_int.h"
+#include "../crypto/rand/rand_local.h"
+#include "../include/crypto/rand.h"
#if defined(_WIN32)
# include <windows.h>
diff --git a/test/dtls_mtu_test.c b/test/dtls_mtu_test.c
index 3aa519f156..f20edf02d2 100644
--- a/test/dtls_mtu_test.c
+++ b/test/dtls_mtu_test.c
@@ -18,7 +18,7 @@
#include "testutil.h"
/* for SSL_READ_ETM() */
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
static int debug = 0;
diff --git a/test/ec_internal_test.c b/test/ec_internal_test.c
index 8d3a4fdd67..4b849312be 100644
--- a/test/ec_internal_test.c
+++ b/test/ec_internal_test.c
@@ -10,7 +10,7 @@
#include "internal/nelem.h"
#include "testutil.h"
#include <openssl/ec.h>
-#include "ec_lcl.h"
+#include "ec_local.h"
#include <openssl/objects.h>
static size_t crv_len = 0;
diff --git a/test/ecdsatest.h b/test/ecdsatest.h
index 216e66e277..63fe319025 100644
--- a/test/ecdsatest.h
+++ b/test/ecdsatest.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef ECDSATEST_CAVS_H
-# define ECDSATEST_CAVS_H
+#ifndef OSSL_TEST_ECDSATEST_H
+# define OSSL_TEST_ECDSATEST_H
/*-
* NIST CAVP ECDSA KATs:
@@ -10211,4 +10211,4 @@ static const ecdsa_cavs_kat_t ecdsa_cavs_kats[] = {
"1c8c4343a8ecbf7c4d4e48f7d76d5658bc027c77086ec8b10097deb307d6"}
# endif /* OPENSSL_NO_EC2M */
};
-#endif /* ECDSATEST_CAVS_H */
+#endif /* OSSL_TEST_ECDSATEST_H */
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index 3ae6408f09..88aba1a4ac 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -20,7 +20,7 @@
#include <openssl/kdf.h>
#include "testutil.h"
#include "internal/nelem.h"
-#include "internal/evp_int.h"
+#include "crypto/evp.h"
/*
* kExampleRSAKeyDER is an RSA private key in ASN.1, DER format. Of course, you
diff --git a/test/handshake_helper.c b/test/handshake_helper.c
index 27ff794014..1742004b5b 100644
--- a/test/handshake_helper.c
+++ b/test/handshake_helper.c
@@ -16,7 +16,7 @@
#include <openssl/srp.h>
#endif
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
#include "internal/sockets.h"
#include "internal/nelem.h"
#include "handshake_helper.h"
diff --git a/test/handshake_helper.h b/test/handshake_helper.h
index ab6446a490..96406dd93e 100644
--- a/test/handshake_helper.h
+++ b/test/handshake_helper.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_HANDSHAKE_HELPER_H
-#define HEADER_HANDSHAKE_HELPER_H
+#ifndef OSSL_TEST_HANDSHAKE_HELPER_H
+#define OSSL_TEST_HANDSHAKE_HELPER_H
#include "ssl_test_ctx.h"
@@ -78,4 +78,4 @@ HANDSHAKE_RESULT *do_handshake(SSL_CTX *server_ctx, SSL_CTX *server2_ctx,
SSL_CTX *resume_client_ctx,
const SSL_TEST_CTX *test_ctx);
-#endif /* HEADER_HANDSHAKE_HELPER_H */
+#endif /* OSSL_TEST_HANDSHAKE_HELPER_H */
diff --git a/test/modes_internal_test.c b/test/modes_internal_test.c
index e0f1adf6af..a0fa86e623 100644
--- a/test/modes_internal_test.c
+++ b/test/modes_internal_test.c
@@ -14,7 +14,7 @@
#include <openssl/aes.h>
#include <openssl/modes.h>
-#include "../crypto/modes/modes_lcl.h"
+#include "../crypto/modes/modes_local.h"
#include "testutil.h"
#include "internal/nelem.h"
diff --git a/test/ossl_shim/async_bio.h b/test/ossl_shim/async_bio.h
index bb24eadbbf..c09e236aef 100644
--- a/test/ossl_shim/async_bio.h
+++ b/test/ossl_shim/async_bio.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_ASYNC_BIO
-#define HEADER_ASYNC_BIO
+#ifndef OSSL_TEST_SHIM_ASYNC_BIO_H
+#define OSSL_TEST_SHIM_ASYNC_BIO_H
#include <openssl/base.h>
#include <openssl/bio.h>
@@ -36,4 +36,4 @@ void AsyncBioAllowWrite(BIO *bio, size_t count);
void AsyncBioEnforceWriteQuota(BIO *bio, bool enforce);
-#endif // HEADER_ASYNC_BIO
+#endif // OSSL_TEST_SHIM_ASYNC_BIO_H
diff --git a/test/ossl_shim/include/openssl/base.h b/test/ossl_shim/include/openssl/base.h
index f725cd9d45..a8d47b86ae 100644
--- a/test/ossl_shim/include/openssl/base.h
+++ b/test/ossl_shim/include/openssl/base.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef OPENSSL_HEADER_BASE_H
-#define OPENSSL_HEADER_BASE_H
+#ifndef OSSL_TEST_SHIM_INCLUDE_OPENSSL_BASE_H
+#define OSSL_TEST_SHIM_INCLUDE_OPENSSL_BASE_H
/* Needed for BORINGSSL_MAKE_DELETER */
# include <openssl/bio.h>
@@ -108,4 +108,4 @@ BORINGSSL_MAKE_DELETER(SSL_SESSION, SSL_SESSION_free)
} /* extern C++ */
-#endif /* OPENSSL_HEADER_BASE_H */
+#endif /* OSSL_TEST_SHIM_INCLUDE_OPENSSL_BASE_H */
diff --git a/test/ossl_shim/packeted_bio.h b/test/ossl_shim/packeted_bio.h
index 436cf9082f..895bd37952 100644
--- a/test/ossl_shim/packeted_bio.h
+++ b/test/ossl_shim/packeted_bio.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_PACKETED_BIO
-#define HEADER_PACKETED_BIO
+#ifndef OSSL_TEST_SHIM_PACKETED_BIO_H
+#define OSSL_TEST_SHIM_PACKETED_BIO_H
#include <openssl/base.h>
#include <openssl/bio.h>
@@ -32,4 +32,4 @@ timeval PacketedBioGetClock(const BIO *bio);
bool PacketedBioAdvanceClock(BIO *bio);
-#endif // HEADER_PACKETED_BIO
+#endif // OSSL_TEST_SHIM_PACKETED_BIO_H
diff --git a/test/ossl_shim/test_config.h b/test/ossl_shim/test_config.h
index b4efa455ae..f95475a42e 100644
--- a/test/ossl_shim/test_config.h
+++ b/test/ossl_shim/test_config.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_TEST_CONFIG
-#define HEADER_TEST_CONFIG
+#ifndef OSSL_TEST_SHIM_TEST_CONFIG_H
+#define OSSL_TEST_SHIM_TEST_CONFIG_H
#include <string>
#include <vector>
@@ -85,4 +85,4 @@ struct TestConfig {
bool ParseConfig(int argc, char **argv, TestConfig *out_config);
-#endif // HEADER_TEST_CONFIG
+#endif // OSSL_TEST_SHIM_TEST_CONFIG_H
diff --git a/test/packettest.c b/test/packettest.c
index e58d8d8bcf..6c82d04414 100644
--- a/test/packettest.c
+++ b/test/packettest.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "testutil.h"
#define BUF_LEN 255
diff --git a/test/poly1305_internal_test.c b/test/poly1305_internal_test.c
index 7f7a9e39c5..2b6a529baa 100644
--- a/test/poly1305_internal_test.c
+++ b/test/poly1305_internal_test.c
@@ -13,7 +13,7 @@
#include <string.h>
#include "testutil.h"
-#include "internal/poly1305.h"
+#include "crypto/poly1305.h"
#include "../crypto/poly1305/poly1305_local.h"
#include "internal/nelem.h"
diff --git a/test/servername_test.c b/test/servername_test.c
index d246918d66..39f6b2002f 100644
--- a/test/servername_test.c
+++ b/test/servername_test.c
@@ -18,7 +18,7 @@
#include <openssl/err.h>
#include <time.h>
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "testutil.h"
#include "internal/nelem.h"
diff --git a/test/shlibloadtest.c b/test/shlibloadtest.c
index 86bbfcd849..9649a941ad 100644
--- a/test/shlibloadtest.c
+++ b/test/shlibloadtest.c
@@ -13,7 +13,7 @@
#include <openssl/opensslv.h>
#include <openssl/ssl.h>
#include <openssl/ossl_typ.h>
-#include "internal/dso_conf.h"
+#include "crypto/dso_conf.h"
typedef void DSO;
diff --git a/test/siphash_internal_test.c b/test/siphash_internal_test.c
index ae9082bc7e..be86ee119c 100644
--- a/test/siphash_internal_test.c
+++ b/test/siphash_internal_test.c
@@ -14,7 +14,7 @@
#include <openssl/bio.h>
#include "testutil.h"
-#include "internal/siphash.h"
+#include "crypto/siphash.h"
#include "../crypto/siphash/siphash_local.h"
#include "internal/nelem.h"
diff --git a/test/sm2_internal_test.c b/test/sm2_internal_test.c
index 015fa85e68..952f688e8b 100644
--- a/test/sm2_internal_test.c
+++ b/test/sm2_internal_test.c
@@ -21,7 +21,7 @@
#ifndef OPENSSL_NO_SM2
-# include "internal/sm2.h"
+# include "crypto/sm2.h"
static RAND_METHOD fake_rand;
static const RAND_METHOD *saved_rand;
diff --git a/test/sm4_internal_test.c b/test/sm4_internal_test.c
index 2f3eaecbce..ce61b56428 100644
--- a/test/sm4_internal_test.c
+++ b/test/sm4_internal_test.c
@@ -17,7 +17,7 @@
#include "testutil.h"
#ifndef OPENSSL_NO_SM4
-# include "internal/sm4.h"
+# include "crypto/sm4.h"
static int test_sm4_ecb(void)
{
diff --git a/test/ssl_cert_table_internal_test.c b/test/ssl_cert_table_internal_test.c
index 2104e8c516..cb1e076bce 100644
--- a/test/ssl_cert_table_internal_test.c
+++ b/test/ssl_cert_table_internal_test.c
@@ -21,7 +21,7 @@
# pragma names as_is,shortened
#endif
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
#include "../ssl/ssl_cert_table.h"
#ifdef __VMS
diff --git a/test/ssl_test_ctx.h b/test/ssl_test_ctx.h
index 36d73f752c..7e670c9468 100644
--- a/test/ssl_test_ctx.h
+++ b/test/ssl_test_ctx.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SSL_TEST_CTX_H
-#define HEADER_SSL_TEST_CTX_H
+#ifndef OSSL_TEST_SSL_TEST_CTX_H
+#define OSSL_TEST_SSL_TEST_CTX_H
#include <openssl/conf.h>
#include <openssl/ssl.h>
@@ -250,4 +250,4 @@ SSL_TEST_CTX *SSL_TEST_CTX_new(void);
void SSL_TEST_CTX_free(SSL_TEST_CTX *ctx);
-#endif /* HEADER_SSL_TEST_CTX_H */
+#endif /* OSSL_TEST_SSL_TEST_CTX_H */
diff --git a/test/sslapitest.c b/test/sslapitest.c
index 7a142268fa..76a8ca23da 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -22,7 +22,7 @@
#include "testutil.h"
#include "testutil/output.h"
#include "internal/nelem.h"
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
#ifndef OPENSSL_NO_TLS1_3
diff --git a/test/sslbuffertest.c b/test/sslbuffertest.c
index b8b1f52dde..b5f815f7db 100644
--- a/test/sslbuffertest.c
+++ b/test/sslbuffertest.c
@@ -13,7 +13,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#include "ssltestlib.h"
#include "testutil.h"
diff --git a/test/ssltestlib.h b/test/ssltestlib.h
index 56e323f5bc..17b278219a 100644
--- a/test/ssltestlib.h
+++ b/test/ssltestlib.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_SSLTESTLIB_H
-# define HEADER_SSLTESTLIB_H
+#ifndef OSSL_TEST_SSLTESTLIB_H
+# define OSSL_TEST_SSLTESTLIB_H
# include <openssl/ssl.h>
@@ -53,4 +53,4 @@ typedef struct mempacket_st MEMPACKET;
DEFINE_STACK_OF(MEMPACKET)
-#endif /* HEADER_SSLTESTLIB_H */
+#endif /* OSSL_TEST_SSLTESTLIB_H */
diff --git a/test/testutil.h b/test/testutil.h
index 2a610d7bff..575be955b5 100644
--- a/test/testutil.h
+++ b/test/testutil.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_TESTUTIL_H
-# define HEADER_TESTUTIL_H
+#ifndef OSSL_TESTUTIL_H
+# define OSSL_TESTUTIL_H
#include <stdarg.h>
@@ -465,4 +465,4 @@ void test_random_seed(uint32_t sd);
/* Create a file path from a directory and a filename */
char *test_mk_file_path(const char *dir, const char *file);
-#endif /* HEADER_TESTUTIL_H */
+#endif /* OSSL_TESTUTIL_H */
diff --git a/test/testutil/output.h b/test/testutil/output.h
index 8e2b2a340a..f5be69e662 100644
--- a/test/testutil/output.h
+++ b/test/testutil/output.h
@@ -7,8 +7,8 @@
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_TU_OUTPUT_H
-# define HEADER_TU_OUTPUT_H
+#ifndef OSSL_TESTUTIL_OUTPUT_H
+# define OSSL_TESTUTIL_OUTPUT_H
#include <stdarg.h>
@@ -29,4 +29,4 @@ int test_flush_stderr(void);
int test_printf_stdout(const char *fmt, ...);
int test_printf_stderr(const char *fmt, ...);
-#endif /* HEADER_TU_OUTPUT_H */
+#endif /* OSSL_TESTUTIL_OUTPUT_H */
diff --git a/test/tls13ccstest.c b/test/tls13ccstest.c
index 92e9d598ca..1633d3afe5 100644
--- a/test/tls13ccstest.c
+++ b/test/tls13ccstest.c
@@ -11,7 +11,7 @@
#include <string.h>
#include "ssltestlib.h"
#include "testutil.h"
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
static char *cert = NULL;
static char *privkey = NULL;
diff --git a/test/tls13encryptiontest.c b/test/tls13encryptiontest.c
index 6f359b3a2f..479ff4105e 100644
--- a/test/tls13encryptiontest.c
+++ b/test/tls13encryptiontest.c
@@ -15,8 +15,8 @@
# pragma names as_is,shortened
#endif
-#include "../ssl/ssl_locl.h"
-#include "../ssl/record/record_locl.h"
+#include "../ssl/ssl_local.h"
+#include "../ssl/record/record_local.h"
#ifdef __VMS
# pragma names restore
diff --git a/test/tls13secretstest.c b/test/tls13secretstest.c
index 9368b1cdc5..52fc2b6673 100644
--- a/test/tls13secretstest.c
+++ b/test/tls13secretstest.c
@@ -15,7 +15,7 @@
# pragma names as_is,shortened
#endif
-#include "../ssl/ssl_locl.h"
+#include "../ssl/ssl_local.h"
#ifdef __VMS
# pragma names restore
diff --git a/test/wpackettest.c b/test/wpackettest.c
index 773eef0525..4c779c875c 100644
--- a/test/wpackettest.c
+++ b/test/wpackettest.c
@@ -15,7 +15,7 @@
# pragma names as_is,shortened
#endif
-#include "../ssl/packet_locl.h"
+#include "../ssl/packet_local.h"
#ifdef __VMS
# pragma names restore
diff --git a/util/fix-includes b/util/fix-includes
new file mode 100755
index 0000000000..c49163875b
--- /dev/null
+++ b/util/fix-includes
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (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
+
+find -name ossl_typ.h -o \( \
+ -name '*.h' -o \
+ -name '*.h.in' -o \
+ -name '*.c' -o \
+ -name '*.ec' -o \
+ -name 'README*' -o \
+ -name '*.pod' -o \
+ -name '*.conf' \
+ \) -exec sed -E -i \
+ -f util/fix-includes.sed {} \;
diff --git a/util/fix-includes.sed b/util/fix-includes.sed
new file mode 100644
index 0000000000..fb0d652875
--- /dev/null
+++ b/util/fix-includes.sed
@@ -0,0 +1,5 @@
+s|internal/([a-z0-9_]+)_int\.h|crypto/\1.h|g ;
+s at internal/(aria.h|async.h|bn_conf.h|bn_dh.h|bn_srp.h|chacha.h|ctype.h|__DECC_INCLUDE_EPILOGUE.H|__DECC_INCLUDE_PROLOGUE.H|dso_conf.h|engine.h|lhash.h|md32_common.h|objects.h|poly1305.h|sha.h|siphash.h|sm2err.h|sm2.h|sm3.h|sm4.h|store.h|foobar)@crypto/\1 at g ;
+s/constant_time_locl/constant_time/g ;
+s/_lo?cl\.h/_local.h/g ;
+s/_int\.h/_local.h/g ;
diff --git a/util/mkerr.pl b/util/mkerr.pl
index df085fb3db..dc652e0a0d 100755
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -450,8 +450,8 @@ foreach my $lib ( keys %errorfile ) {
* https://www.openssl.org/source/license.html
*/
-#ifndef HEADER_${lib}ERR_H
-# define HEADER_${lib}ERR_H
+#ifndef OPENSSL_${lib}ERR_H
+# define OPENSSL_${lib}ERR_H
# include <openssl/symhacks.h>
More information about the openssl-commits
mailing list