commit 24c37b2
hovercats
·
2024-10-26 17:49:17 +0000 UTC
parent 4e0851d
libressl: import from oasis
8 files changed,
+427,
-0
+1,
-0
1@@ -46,6 +46,7 @@ subgen 'libnl'
2 subgen 'libpkgconf'
3 subgen 'libplacebo'
4 subgen 'libpng'
5+subgen 'libressl'
6 subgen 'libtermkey'
7 subgen 'libtls-bearssl'
8 subgen 'libutp'
+2,
-0
1@@ -0,0 +1,2 @@
2+/libressl-3.4.2.tar.gz
3+/src
+362,
-0
1@@ -0,0 +1,362 @@
2+cflags{
3+ '-Wundef', '-Wno-attributes',
4+ '-D LIBRESSL_INTERNAL',
5+ '-D OPENSSL_NO_HW_PADLOCK',
6+ '-D OPENSSL_NO_ASM',
7+ '-D __BEGIN_HIDDEN_DECLS=',
8+ '-D __END_HIDDEN_DECLS=',
9+ [[-D '__warn_references(sym,msg)=_Static_assert(1, "")']],
10+ '-I $srcdir/include',
11+ '-I $srcdir/crypto',
12+ '-I $srcdir/crypto/asn1',
13+ '-I $srcdir/crypto/bn',
14+ '-I $srcdir/crypto/ec',
15+ '-I $srcdir/crypto/ecdh',
16+ '-I $srcdir/crypto/ecdsa',
17+ '-I $srcdir/crypto/evp',
18+ '-I $srcdir/crypto/modes',
19+ '-I $basedir/pkg/openbsd/include',
20+ '-idirafter $srcdir/include/compat',
21+}
22+
23+pkg.hdrs = {
24+ copy('$outdir/include/openssl', '$srcdir/include/openssl', {
25+ 'aes.h',
26+ 'asn1.h',
27+ 'asn1t.h',
28+ 'blowfish.h',
29+ 'bio.h',
30+ 'bn.h',
31+ 'buffer.h',
32+ 'camellia.h',
33+ 'cast.h',
34+ 'chacha.h',
35+ 'cmac.h',
36+ 'cms.h',
37+ 'comp.h',
38+ 'conf.h',
39+ 'conf_api.h',
40+ 'crypto.h',
41+ 'curve25519.h',
42+ 'des.h',
43+ 'dh.h',
44+ 'dsa.h',
45+ 'dso.h',
46+ 'ec.h',
47+ 'ecdh.h',
48+ 'ecdsa.h',
49+ 'engine.h',
50+ 'err.h',
51+ 'evp.h',
52+ 'gost.h',
53+ 'hmac.h',
54+ 'idea.h',
55+ 'lhash.h',
56+ 'md4.h',
57+ 'md5.h',
58+ 'modes.h',
59+ 'objects.h',
60+ 'ocsp.h',
61+ 'opensslfeatures.h',
62+ 'opensslv.h',
63+ 'ossl_typ.h',
64+ 'pem.h',
65+ 'pem2.h',
66+ 'pkcs12.h',
67+ 'pkcs7.h',
68+ 'poly1305.h',
69+ 'rand.h',
70+ 'rc2.h',
71+ 'rc4.h',
72+ 'ripemd.h',
73+ 'rsa.h',
74+ 'sha.h',
75+ 'sm3.h',
76+ 'sm4.h',
77+ 'safestack.h',
78+ 'stack.h',
79+ 'ts.h',
80+ 'txt_db.h',
81+ 'ui.h',
82+ 'ui_compat.h',
83+ 'whrlpool.h',
84+ 'x509.h',
85+ 'x509_vfy.h',
86+ 'x509_verify.h',
87+ 'x509v3.h',
88+
89+ 'opensslconf.h',
90+ 'obj_mac.h',
91+
92+ 'srtp.h',
93+ 'ssl.h',
94+ 'ssl2.h',
95+ 'ssl3.h',
96+ 'ssl23.h',
97+ 'tls1.h',
98+ 'dtls1.h',
99+ }),
100+ install=true,
101+}
102+
103+-- src/crypto/Makefile.am
104+lib('libcrypto.a', [[crypto/(
105+ cryptlib.c malloc-wrapper.c mem_dbg.c cversion.c ex_data.c cpt_err.c
106+ o_time.c o_str.c o_init.c
107+ mem_clr.c crypto_init.c crypto_lock.c
108+ aes/(
109+ aes_misc.c aes_ecb.c aes_cfb.c aes_ofb.c
110+ aes_ctr.c aes_ige.c aes_wrap.c
111+ )
112+ asn1/(
113+ a_object.c a_bitstr.c a_time.c a_int.c a_octet.c
114+ a_print.c a_type.c a_dup.c a_d2i_fp.c a_i2d_fp.c
115+ a_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c
116+ x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c
117+ x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c
118+ x_nx509.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c
119+ t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c
120+ tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c
121+ tasn_prn.c ameth_lib.c
122+ f_int.c f_string.c n_pkey.c
123+ f_enum.c x_pkey.c a_bool.c x_exten.c bio_asn1.c bio_ndef.c asn_mime.c
124+ asn1_gen.c asn1_par.c asn1_lib.c asn1_err.c a_strnid.c
125+ evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c
126+ a_time_tm.c
127+ )
128+ bf/(bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c)
129+ bio/(
130+ bio_lib.c bio_cb.c bio_err.c bio_meth.c
131+ bss_mem.c bss_null.c bss_fd.c
132+ bss_file.c bss_sock.c bss_conn.c
133+ bf_null.c bf_buff.c b_print.c b_dump.c
134+ b_posix.c b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c
135+ bss_dgram.c
136+ )
137+ bn/(
138+ bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c
139+ bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c
140+ bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c
141+ bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c
142+ bn_depr.c bn_const.c bn_x931p.c
143+ )
144+ buffer/(buffer.c buf_err.c buf_str.c)
145+ camellia/(cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c)
146+ cast/(c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c)
147+ chacha/chacha.c
148+ cmac/(cmac.c cm_ameth.c cm_pmeth.c)
149+ cms/(
150+ cms_asn1.c cms_att.c cms_cd.c cms_dd.c cms_enc.c cms_env.c cms_err.c
151+ cms_ess.c cms_io.c cms_kari.c cms_lib.c cms_pwri.c cms_sd.c
152+ cms_smime.c
153+ )
154+ comp/(comp_lib.c comp_err.c c_rle.c c_zlib.c)
155+ conf/(
156+ conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c
157+ conf_mall.c conf_sap.c
158+ )
159+ curve25519/(curve25519.c curve25519-generic.c)
160+ des/(
161+ cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c
162+ ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c
163+ fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c
164+ qud_cksm.c rand_key.c set_key.c xcbc_enc.c
165+ str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c
166+ )
167+ dh/(
168+ dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_depr.c
169+ dh_ameth.c dh_pmeth.c dh_prn.c
170+ )
171+ dsa/(
172+ dsa_gen.c dsa_key.c dsa_lib.c dsa_asn1.c dsa_vrf.c dsa_sign.c
173+ dsa_err.c dsa_ossl.c dsa_depr.c dsa_ameth.c dsa_pmeth.c dsa_prn.c
174+ dsa_meth.c
175+ )
176+ dso/(
177+ dso_dlfcn.c dso_err.c dso_lib.c dso_null.c
178+ dso_openssl.c
179+ )
180+ ec/(
181+ ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c
182+ ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c
183+ ec2_smpl.c ec2_mult.c ec_ameth.c ec_pmeth.c ec_kmeth.c eck_prn.c
184+ ecp_oct.c ec2_oct.c ec_oct.c
185+ )
186+ ecdh/(ech_lib.c ech_key.c ech_err.c ecdh_kdf.c)
187+ ecdsa/(ecs_lib.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c ecs_err.c)
188+ engine/(
189+ eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c
190+ eng_table.c eng_pkey.c eng_fat.c eng_all.c
191+ tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c
192+ tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c tb_eckey.c
193+ eng_openssl.c eng_cnf.c eng_dyn.c
194+ )
195+ err/(err.c err_all.c err_prn.c)
196+ evp/(
197+ encode.c digest.c evp_enc.c evp_key.c
198+ e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c
199+ e_rc4.c e_aes.c names.c
200+ e_xcbc_d.c e_rc2.c e_cast.c
201+ m_null.c m_md4.c m_md5.c m_sha1.c m_sm3.c m_wp.c
202+ m_dss.c m_dss1.c m_ripemd.c m_ecdsa.c
203+ p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c
204+ bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c
205+ c_all.c evp_lib.c
206+ evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
207+ e_old.c pmeth_lib.c pmeth_fn.c pmeth_gn.c m_sigver.c
208+ e_aes_cbc_hmac_sha1.c e_rc4_hmac_md5.c
209+ e_chacha.c evp_aead.c e_chacha20poly1305.c
210+ e_gost2814789.c m_gost2814789.c m_gostr341194.c m_streebog.c
211+ e_sm4.c
212+ m_md5_sha1.c
213+ )
214+ gost/(
215+ gost2814789.c gost89_keywrap.c gost89_params.c gost89imit_ameth.c
216+ gost89imit_pmeth.c gost_asn1.c gost_err.c gostr341001.c
217+ gostr341001_ameth.c gostr341001_key.c gostr341001_params.c
218+ gostr341001_pmeth.c gostr341194.c streebog.c
219+ )
220+ hkdf/hkdf.c
221+ hmac/(hmac.c hm_ameth.c hm_pmeth.c)
222+ idea/(i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c)
223+ lhash/(lhash.c lh_stats.c)
224+ md4/(md4_dgst.c md4_one.c)
225+ md5/(md5_dgst.c md5_one.c)
226+ modes/(cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c ccm128.c xts128.c)
227+ objects/(o_names.c obj_dat.c obj_lib.c obj_err.c obj_xref.c)
228+ ocsp/(
229+ ocsp_asn.c ocsp_ext.c ocsp_ht.c ocsp_lib.c ocsp_cl.c
230+ ocsp_srv.c ocsp_prn.c ocsp_vfy.c ocsp_err.c
231+ )
232+ pem/(
233+ pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c
234+ pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c pvkfmt.c
235+ )
236+ pkcs12/(
237+ p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c
238+ p12_init.c p12_key.c p12_kiss.c p12_mutl.c
239+ p12_utl.c p12_npas.c pk12err.c p12_p8d.c p12_p8e.c
240+ )
241+ pkcs7/(
242+ pk7_asn1.c pk7_lib.c pkcs7err.c pk7_doit.c pk7_smime.c pk7_attr.c
243+ pk7_mime.c bio_pk7.c
244+ )
245+ poly1305/poly1305.c
246+ rand/(randfile.c rand_lib.c rand_err.c)
247+ rc2/(rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c)
248+ ripemd/(rmd_dgst.c rmd_one.c)
249+ rsa/(
250+ rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c
251+ rsa_pk1.c rsa_none.c rsa_oaep.c rsa_chk.c
252+ rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c rsa_ameth.c rsa_prn.c
253+ rsa_pmeth.c rsa_crpt.c rsa_meth.c
254+ )
255+ sha/(sha1dgst.c sha1_one.c sha256.c sha512.c)
256+ sm3/sm3.c
257+ sm4/sm4.c
258+ stack/stack.c
259+ ts/(
260+ ts_err.c ts_req_utils.c ts_req_print.c ts_rsp_utils.c ts_rsp_print.c
261+ ts_rsp_sign.c ts_rsp_verify.c ts_verify_ctx.c ts_lib.c ts_conf.c
262+ ts_asn1.c
263+ )
264+ txt_db/txt_db.c
265+ ui/(ui_err.c ui_lib.c ui_openssl.c ui_util.c)
266+ whrlpool/wp_dgst.c
267+ x509/(
268+ x509_addr.c x509_asid.c
269+ x509_def.c x509_d2.c x509_r2x.c x509_cmp.c
270+ x509_obj.c x509_req.c x509spki.c x509_vfy.c
271+ x509_set.c x509cset.c x509rset.c x509_err.c
272+ x509name.c x509_v3.c x509_ext.c x509_att.c
273+ x509type.c x509_lu.c x_all.c x509_txt.c
274+ x509_trs.c by_file.c by_dir.c by_mem.c x509_vpm.c
275+
276+ x509_bcons.c x509_bitst.c x509_conf.c x509_extku.c x509_ia5.c x509_lib.c
277+ x509_prn.c x509_utl.c x509_genn.c x509_alt.c x509_skey.c x509_akey.c x509_pku.c
278+ x509_int.c x509_enum.c x509_sxnet.c x509_cpols.c x509_crld.c x509_purp.c x509_info.c
279+ x509_ocsp.c x509_akeya.c x509_pmaps.c x509_pcons.c x509_ncons.c x509_pcia.c x509_pci.c
280+ x509_issuer_cache.c x509_constraints.c x509_verify.c
281+ pcy_cache.c pcy_node.c pcy_data.c pcy_map.c pcy_tree.c pcy_lib.c
282+ )
283+
284+ aes/(aes_core.c aes_cbc.c)
285+ bf/bf_enc.c
286+ bn/bn_asm.c
287+ camellia/(camellia.c cmll_cbc.c cmll_misc.c)
288+ des/(des_enc.c fcrypt_b.c)
289+ rc4/(rc4_enc.c rc4_skey.c)
290+ whrlpool/wp_block.c
291+) $builddir/pkg/openbsd/libbsd.a.d]])
292+file('lib/libcrypto.a', '644', '$outdir/libcrypto.a')
293+
294+-- src/ssl/Makefile.am
295+lib('libssl.a', [[ssl/(
296+ bio_ssl.c
297+ bs_ber.c
298+ bs_cbb.c
299+ bs_cbs.c
300+ d1_both.c
301+ d1_lib.c
302+ d1_pkt.c
303+ d1_srtp.c
304+ pqueue.c
305+ s3_cbc.c
306+ s3_lib.c
307+ ssl_algs.c
308+ ssl_asn1.c
309+ ssl_both.c
310+ ssl_cert.c
311+ ssl_ciph.c
312+ ssl_ciphers.c
313+ ssl_clnt.c
314+ ssl_err.c
315+ ssl_init.c
316+ ssl_kex.c
317+ ssl_lib.c
318+ ssl_methods.c
319+ ssl_packet.c
320+ ssl_pkt.c
321+ ssl_rsa.c
322+ ssl_sess.c
323+ ssl_sigalgs.c
324+ ssl_srvr.c
325+ ssl_stat.c
326+ ssl_tlsext.c
327+ ssl_transcript.c
328+ ssl_txt.c
329+ ssl_versions.c
330+ t1_enc.c
331+ t1_lib.c
332+ tls12_key_schedule.c
333+ tls12_lib.c
334+ tls12_record_layer.c
335+ tls13_buffer.c
336+ tls13_client.c
337+ tls13_error.c
338+ tls13_handshake.c
339+ tls13_handshake_msg.c
340+ tls13_key_schedule.c
341+ tls13_key_share.c
342+ tls13_legacy.c
343+ tls13_lib.c
344+ tls13_record.c
345+ tls13_record_layer.c
346+ tls13_server.c
347+ tls_content.c
348+) libcrypto.a.d]])
349+file('lib/libssl.a', '644', '$outdir/libssl.a')
350+
351+exe('openssl', [[apps/openssl/(
352+ apps.c apps_posix.c asn1pars.c ca.c certhash.c ciphers.c cms.c crl.c
353+ crl2p7.c dgst.c dh.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c
354+ errstr.c gendh.c gendsa.c genpkey.c genrsa.c nseq.c ocsp.c
355+ openssl.c passwd.c pkcs12.c pkcs7.c pkcs8.c pkey.c pkeyparam.c
356+ pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c s_cb.c s_client.c
357+ s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c spkac.c ts.c
358+ verify.c version.c x509.c
359+) libssl.a.d libcrypto.a.d]])
360+file('bin/openssl', '755', '$outdir/openssl')
361+man{'apps/openssl/openssl.1'}
362+
363+fetch 'curl'
1@@ -0,0 +1,31 @@
2+From a16c45e3c7b271fb74a83d84e83189858b9b88bb Mon Sep 17 00:00:00 2001
3+From: Michael Forney <mforney@mforney.org>
4+Date: Wed, 24 Apr 2019 00:07:34 -0700
5+Subject: [PATCH] Use plain vsyslog for OPENSSL_showfatal
6+
7+The compat version just ignores the second argument anyway, and
8+patching it out allows us to continue to ignore the compat functions.
9+---
10+ crypto/cryptlib.c | 3 +--
11+ 1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
14+index 38d31e7ac..d6eface9b 100644
15+--- a/crypto/cryptlib.c
16++++ b/crypto/cryptlib.c
17+@@ -345,11 +345,10 @@ OPENSSL_cpuid_setup(void)
18+ static void
19+ OPENSSL_showfatal(const char *fmta, ...)
20+ {
21+- struct syslog_data sdata = SYSLOG_DATA_INIT;
22+ va_list ap;
23+
24+ va_start(ap, fmta);
25+- vsyslog_r(LOG_INFO|LOG_LOCAL2, &sdata, fmta, ap);
26++ vsyslog(LOG_INFO|LOG_LOCAL2, fmta, ap);
27+ va_end(ap);
28+ }
29+
30+--
31+2.21.0
32+
1@@ -0,0 +1,28 @@
2+From adc84eef824bd6d685848965bc1271272a723727 Mon Sep 17 00:00:00 2001
3+From: Michael Forney <mforney@mforney.org>
4+Date: Fri, 30 Apr 2021 18:14:07 -0700
5+Subject: [PATCH] Remove unneeded ';' at top level
6+
7+This is not allowed in the ISO C grammar.
8+---
9+ crypto/x509/x509_issuer_cache.c | 4 ++--
10+ 1 file changed, 2 insertions(+), 2 deletions(-)
11+
12+diff --git a/crypto/x509/x509_issuer_cache.c b/crypto/x509/x509_issuer_cache.c
13+index 26cde17..d1af24a 100644
14+--- a/crypto/x509/x509_issuer_cache.c
15++++ b/crypto/x509/x509_issuer_cache.c
16+@@ -53,8 +53,8 @@ static TAILQ_HEAD(lruqueue, x509_issuer) x509_issuer_lru =
17+ TAILQ_HEAD_INITIALIZER(x509_issuer_lru);
18+ static pthread_mutex_t x509_issuer_tree_mutex = PTHREAD_MUTEX_INITIALIZER;
19+
20+-RB_PROTOTYPE(x509_issuer_tree, x509_issuer, entry, x509_issuer_cmp);
21+-RB_GENERATE(x509_issuer_tree, x509_issuer, entry, x509_issuer_cmp);
22++RB_PROTOTYPE(x509_issuer_tree, x509_issuer, entry, x509_issuer_cmp)
23++RB_GENERATE(x509_issuer_tree, x509_issuer, entry, x509_issuer_cmp)
24+
25+ /*
26+ * Set the maximum number of cached entries. On additions to the cache
27+--
28+2.31.1
29+
+1,
-0
1@@ -0,0 +1 @@
2+cb82ca7d547336917352fbd23db2fc483c6c44d35157b32780214ec74197b3ce libressl-3.4.2.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+url = "https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.2.tar.gz"
+1,
-0
1@@ -0,0 +1 @@
2+3.4.2 r0