Skip to content

Commit dc66422

Browse files
richardlautargos
authored andcommitted
build,deps,tools: prepare to update to OpenSSL 3.5
Update the updater script and files under `deps/openssl/config` in preparation for updating `deps/openssl` to OpenSSL 3.5. Co-Authored-By: Michaël Zasso <targos@protonmail.com> PR-URL: #58100 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 39978f5 commit dc66422

File tree

9 files changed

+167
-41
lines changed

9 files changed

+167
-41
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo
16411641

16421642
.PHONY: gen-openssl
16431643
ifeq ($(HAS_DOCKER), 1)
1644-
DOCKER_COMMAND ?= docker run -it -v $(PWD):/node
1644+
DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v $(PWD):/node
16451645
IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null)
16461646
GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir)
16471647
DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON))

deps/openssl/config/Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ OPSSL_SRC = ../openssl
3737
# Header files generated with Configure
3838
#INT_CFGS = bn_conf.h dso_conf.h
3939
INT_CFG_DIR = $(OPSSL_SRC)/include/crypto
40-
GEN_HEADERS = asn1 asn1t bio cmp cms configuration conf crmf crypto ct err \
41-
ess fipskey lhash ocsp opensslv pkcs12 pkcs7 safestack srp ssl \
42-
ui x509 x509v3 x509_vfy conf
40+
GEN_HEADERS = asn1 asn1t bio comp cmp cms conf configuration core_names crmf \
41+
crypto ct err ess fipskey lhash ocsp opensslv pkcs12 pkcs7 \
42+
safestack srp ssl ui x509_acert x509 x509v3 x509_vfy
43+
44+
INTERNAL_GEN_HEADERS = param_names
4345

4446
CRYPTO_GEN_HEADERS = bn_conf dso_conf
4547

@@ -52,24 +54,24 @@ all: $(ASM_ARCHS) $(NO_ASM_ARCHS) generate_headers
5254
# Configure and generate openssl asm files for each archs
5355
$(ASM_ARCHS):
5456
cd $(OPSSL_SRC); $(NO_WARN_ENV) CC=$(CC) $(PERL) $(CONFIGURE) $(COPTS) $@;
55-
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}"
57+
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}"
5658
# Confgure asm_avx2 and generate upto avx2 support
5759
cd $(OPSSL_SRC); $(NO_WARN_ENV) CC=$(FAKE_GCC) $(PERL) $(CONFIGURE) \
5860
$(COPTS) $@;
59-
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm_avx2 $@ "${GEN_HEADERS}" "${CRYTO_GEN_HEADERS}"
61+
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) asm_avx2 $@ "${GEN_HEADERS}" "${CRYTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}"
6062
# Configure no-asm and generate no-asm sources
6163
cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) \
6264
no-asm $@;
63-
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}"
65+
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}"
6466

6567
$(NO_ASM_ARCHS):
6668
# Configure no-asm and generate no-asm sources
6769
cd $(OPSSL_SRC); $(NO_WARN_ENV) $(PERL) $(CONFIGURE) $(COPTS) \
6870
no-asm $@;
69-
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}"
71+
$(PERL) -w -I$(OPSSL_SRC) $(GENERATE) no-asm $@ "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}"
7072

7173
generate_headers:
72-
@$(PERL) -w -I$(OPSSL_SRC) ./generate_headers.pl "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}"
74+
@$(PERL) -w -I$(OPSSL_SRC) ./generate_headers.pl "${GEN_HEADERS}" "${CRYPTO_GEN_HEADERS}" "${INTERNAL_GEN_HEADERS}"
7375

7476
clean:
7577
find archs \( -name \*.S -o -name \*.s -o -name \*.asm -o \

deps/openssl/config/Makefile_VC-WIN32

Lines changed: 36 additions & 6 deletions
Large diffs are not rendered by default.

deps/openssl/config/Makefile_VC-WIN64-ARM

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ MINOR=1.1
1616

1717
SHLIB_VERSION_NUMBER=1.1
1818

19-
GENERATED_MANDATORY=include/crypto/bn_conf.h include/crypto/dso_conf.h include/openssl/asn1.h include/openssl/asn1t.h include/openssl/bio.h include/openssl/cmp.h include/openssl/cms.h include/openssl/conf.h include/openssl/configuration.h include/openssl/crmf.h include/openssl/crypto.h include/openssl/ct.h include/openssl/err.h include/openssl/ess.h include/openssl/fipskey.h include/openssl/lhash.h include/openssl/ocsp.h include/openssl/opensslv.h include/openssl/pkcs12.h include/openssl/pkcs7.h include/openssl/safestack.h include/openssl/srp.h include/openssl/ssl.h include/openssl/ui.h include/openssl/x509.h include/openssl/x509_vfy.h include/openssl/x509v3.h providers/common/include/prov/der_digests.h providers/common/include/prov/der_dsa.h providers/common/include/prov/der_ec.h providers/common/include/prov/der_ecx.h providers/common/include/prov/der_rsa.h providers/common/include/prov/der_rsa.h providers/common/include/prov/der_sm2.h providers/common/include/prov/der_wrap.h
20-
GENERATED=crypto/buildinf.h apps/progs.h providers/common/der/der_digests_gen.c providers/common/der/der_dsa_gen.c providers/common/der/der_ec_gen.c providers/common/der/der_ecx_gen.c providers/common/der/der_rsa_gen.c providers/common/der/der_sm2_gen.c providers/common/der/der_wrap_gen.c apps/progs.c providers/common/der/der_digests_gen.c providers/common/der/der_dsa_gen.c providers/common/der/der_ec_gen.c providers/common/der/der_ecx_gen.c providers/common/der/der_rsa_gen.c providers/common/der/der_sm2_gen.c providers/common/der/der_wrap_gen.c
19+
GENERATED_MANDATORY=crypto/params_idx.c include/crypto/bn_conf.h include/crypto/dso_conf.h include/internal/param_names.h include/openssl/asn1.h include/openssl/asn1t.h include/openssl/bio.h include/openssl/cmp.h include/openssl/comp.h include/openssl/cms.h include/openssl/conf.h include/openssl/configuration.h include/openssl/core_names.h include/openssl/crmf.h include/openssl/crypto.h include/openssl/ct.h include/openssl/err.h include/openssl/ess.h include/openssl/fipskey.h include/openssl/lhash.h include/openssl/ocsp.h include/openssl/opensslv.h include/openssl/pkcs12.h include/openssl/pkcs7.h include/openssl/safestack.h include/openssl/srp.h include/openssl/ssl.h include/openssl/ui.h include/openssl/x509.h include/openssl/x509_acert.h include/openssl/x509_vfy.h include/openssl/x509v3.h providers/common/include/prov/der_digests.h providers/common/include/prov/der_dsa.h providers/common/include/prov/der_ec.h providers/common/include/prov/der_ecx.h providers/common/include/prov/der_ml_dsa.h providers/common/include/prov/der_rsa.h providers/common/include/prov/der_slh_dsa.h providers/common/include/prov/der_sm2.h providers/common/include/prov/der_wrap.h
20+
GENERATED=crypto/buildinf.h apps/progs.h crypto/params_idx.c providers/common/der/der_digests_gen.c providers/common/der/der_dsa_gen.c providers/common/der/der_ec_gen.c providers/common/der/der_ecx_gen.c providers/common/der/der_rsa_gen.c providers/common/der/der_sm2_gen.c providers/common/der/der_wrap_gen.c apps/progs.c providers/common/der/der_digests_gen.c providers/common/der/der_dsa_gen.c providers/common/der/der_ec_gen.c providers/common/der/der_ecx_gen.c providers/common/der/der_ml_dsa_gen.c providers/common/der/der_rsa_gen.c providers/common/der/der_slh_dsa_gen.c providers/common/der/der_sm2_gen.c providers/common/der/der_wrap_gen.c
2121

2222
INSTALL_LIBS="libcrypto.lib" "libssl.lib"
2323
INSTALL_SHLIBS="libcrypto-1_1-arm64.dll" "libssl-1_1-arm64.dll"
@@ -138,13 +138,20 @@ apps/progs.h: apps/progs.c
138138
apps/progs.c:
139139
"$(PERL)" "apps/progs.pl" "-C" $(APPS_OPENSSL) > $@
140140

141+
crypto/params_idx.c: crypto/params_idx.c.in configdata.pm util/perl/OpenSSL/paramnames.pm
142+
"$(PERL)" "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-omakefile" crypto/params_idx.c.in > $@
143+
141144
include/crypto/bn_conf.h:
142145
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
143146
"-omakefile" "include/crypto/bn_conf.h.in" > $@
144147
include/crypto/dso_conf.h:
145148
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
146149
"-omakefile" "include/crypto/dso_conf.h.in" > $@
147150

151+
include/internal/param_names.h: include/internal/param_names.h.in configdata.pm
152+
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
153+
"-omakefile" "include/internal/param_names.h.in" > $@
154+
148155
include/openssl/asn1.h: include/openssl/asn1.h.in configdata.pm
149156
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
150157
"-omakefile" "include/openssl/asn1.h.in" > $@
@@ -157,9 +164,15 @@ include/openssl/bio.h: include/openssl/bio.h.in configdata.pm
157164
include/openssl/cmp.h: include/openssl/cmp.h.in configdata.pm
158165
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
159166
"-omakefile" "include/openssl/cmp.h.in" > $@
167+
include/openssl/comp.h: include/openssl/comp.h.in configdata.pm
168+
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
169+
"-omakefile" "include/openssl/comp.h.in" > $@
160170
include/openssl/cms.h: include/openssl/cms.h.in configdata.pm
161171
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
162172
"-omakefile" "include/openssl/cms.h.in" > $@
173+
include/openssl/comp.h: include/openssl/comp.h.in configdata.pm
174+
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
175+
"-omakefile" "include/openssl/comp.h.in" > $@
163176
include/openssl/conf.h: include/openssl/conf.h.in configdata.pm
164177
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
165178
"-omakefile" "include/openssl/conf.h.in" > $@
@@ -169,6 +182,9 @@ include/openssl/conf.h: include/openssl/conf.h.in configdata.pm
169182
include/openssl/configuration.h: include/openssl/configuration.h.in configdata.pm
170183
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
171184
"-omakefile" "include/openssl/configuration.h.in" > $@
185+
include/openssl/core_names.h: include/openssl/core_names.h.in configdata.pm
186+
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
187+
"-omakefile" "include/openssl/core_names.h.in" > $@
172188
include/openssl/crmf.h: include/openssl/crmf.h.in configdata.pm
173189
"$(PERL)" "-I$(BLDDIR)" -Mconfigdata "util/dofile.pl" \
174190
"-omakefile" "include/openssl/crmf.h.in" > $@
@@ -220,6 +236,9 @@ include/openssl/ui.h: include/openssl/ui.h.in configdata.pm
220236
include/openssl/x509.h: include/openssl/x509.h.in configdata.pm
221237
$(PERL) -I$(BLDDIR) -Mconfigdata util/dofile.pl \
222238
"-omakefile" "include/openssl/x509.h.in" > $@
239+
include/openssl/x509_acert.h: include/openssl/x509_acert.h.in configdata.pm
240+
$(PERL) -I$(BLDDIR) -Mconfigdata util/dofile.pl \
241+
"-omakefile" "include/openssl/x509_acert.h.in" > $@
223242
include/openssl/x509_vfy.h: include/openssl/x509_vfy.h.in configdata.pm
224243
$(PERL) -I$(BLDDIR) -Mconfigdata util/dofile.pl \
225244
"-omakefile" "include/openssl/x509_vfy.h.in" > $@
@@ -234,21 +253,27 @@ providers/common/include/prov/der_dsa.h: providers/common/include/prov/der_dsa.h
234253
providers/common/include/prov/der_wrap.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
235254
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_wrap.h.in > $@
236255

237-
providers/common/include/prov/der_rsa.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
256+
providers/common/include/prov/der_rsa.h: providers/common/include/prov/der_rsa.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
238257
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_rsa.h.in > $@
239258

240-
providers/common/include/prov/der_ecx.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
259+
providers/common/include/prov/der_ecx.h: providers/common/include/prov/der_ecx.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
241260
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_ecx.h.in > $@
242261

243-
providers/common/include/prov/der_sm2.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
262+
providers/common/include/prov/der_sm2.h: providers/common/include/prov/der_sm2.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
244263
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_sm2.h.in > $@
245264

246-
providers/common/include/prov/der_ec.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
265+
providers/common/include/prov/der_ec.h: providers/common/include/prov/der_ec.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
247266
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_ec.h.in > $@
248267

249-
providers/common/include/prov/der_digests.h: providers/common/include/prov/der_wrap.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
268+
providers/common/include/prov/der_digests.h: providers/common/include/prov/der_digests.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
250269
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_digests.h.in > $@
251270

271+
providers/common/include/prov/der_ml_dsa.h: providers/common/include/prov/der_ml_dsa.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
272+
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_ml_dsa.h.in > $@
273+
274+
providers/common/include/prov/der_slh_dsa.h: providers/common/include/prov/der_slh_dsa.h.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
275+
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/include/prov/der_slh_dsa.h.in > $@
276+
252277

253278
providers/common/der/der_digests_gen.c: providers/common/der/der_digests_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
254279
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_digests_gen.c.in > $@
@@ -262,9 +287,15 @@ providers/common/der/der_ec_gen.c: providers/common/der/der_ec_gen.c.in provider
262287
providers/common/der/der_ecx_gen.c: providers/common/der/der_ecx_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
263288
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_ecx_gen.c.in > $@
264289

290+
providers/common/der/der_ml_dsa_gen.c: providers/common/der/der_ml_dsa_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
291+
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_ml_dsa_gen.c.in > $@
292+
265293
providers/common/der/der_rsa_gen.c: providers/common/der/der_rsa_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
266294
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_rsa_gen.c.in > $@
267295

296+
providers/common/der/der_slh_dsa_gen.c: providers/common/der/der_slh_dsa_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
297+
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_slh_dsa_gen.c.in > $@
298+
268299
providers/common/der/der_sm2_gen.c: providers/common/der/der_sm2_gen.c.in providers/common/der/oids_to_c.pm configdata.pm providers/common/der/oids_to_c.pm
269300
$(PERL) "-I." "-Iproviders/common/der" -Mconfigdata -Moids_to_c "util/dofile.pl" "-oMakefile" providers/common/der/der_sm2_gen.c.in > $@
270301

0 commit comments

Comments
 (0)