1cflags{
2 '-std=c11', '-Wall', '-Wundef', '-Wno-attributes',
3 '-D _DEFAULT_SOURCE',
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 $dir',
11 '-I $srcdir/crypto/hidden',
12 '-I $srcdir/ssl/hidden',
13 '-I $srcdir/include',
14 '-I $srcdir/crypto',
15 '-I $srcdir/crypto/aes',
16 '-I $srcdir/crypto/asn1',
17 '-I $srcdir/crypto/bio',
18 '-I $srcdir/crypto/bn',
19 '-I $srcdir/crypto/bytestring',
20 '-I $srcdir/crypto/conf',
21 '-I $srcdir/crypto/curve25519',
22 '-I $srcdir/crypto/dh',
23 '-I $srcdir/crypto/dsa',
24 '-I $srcdir/crypto/ec',
25 '-I $srcdir/crypto/ecdsa',
26 '-I $srcdir/crypto/err',
27 '-I $srcdir/crypto/evp',
28 '-I $srcdir/crypto/hmac',
29 '-I $srcdir/crypto/modes',
30 '-I $srcdir/crypto/ocsp',
31 '-I $srcdir/crypto/pkcs12',
32 '-I $srcdir/crypto/rsa',
33 '-I $srcdir/crypto/sha',
34 '-I $srcdir/crypto/stack',
35 '-I $srcdir/crypto/x509',
36 '-I $basedir/pkg/openbsd/include',
37 '-idirafter $srcdir/include/compat',
38}
39
40pkg.hdrs = {
41 copy('$outdir/include/openssl', '$srcdir/include/openssl', {
42 'aes.h',
43 'asn1.h',
44 'asn1t.h',
45 'posix_time.h',
46 'blowfish.h',
47 'bio.h',
48 'bn.h',
49 'buffer.h',
50 'camellia.h',
51 'cast.h',
52 'chacha.h',
53 'cmac.h',
54 'cms.h',
55 'comp.h',
56 'conf.h',
57 'crypto.h',
58 'ct.h',
59 'curve25519.h',
60 'des.h',
61 'dh.h',
62 'dsa.h',
63 'ec.h',
64 'ecdh.h',
65 'ecdsa.h',
66 'engine.h',
67 'err.h',
68 'evp.h',
69 'hmac.h',
70 'idea.h',
71 'kdf.h',
72 'lhash.h',
73 'md4.h',
74 'md5.h',
75 'mlkem.h',
76 'modes.h',
77 'objects.h',
78 'ocsp.h',
79 'opensslconf.h',
80 'opensslfeatures.h',
81 'opensslv.h',
82 'ossl_typ.h',
83 'pem.h',
84 'pkcs12.h',
85 'pkcs7.h',
86 'poly1305.h',
87 'rand.h',
88 'rc2.h',
89 'rc4.h',
90 'ripemd.h',
91 'rsa.h',
92 'sha.h',
93 'sm3.h',
94 'sm4.h',
95 'safestack.h',
96 'stack.h',
97 'ts.h',
98 'txt_db.h',
99 'ui.h',
100 'x509.h',
101 'x509_vfy.h',
102 'x509v3.h',
103
104 'obj_mac.h',
105
106 'dtls1.h',
107 'srtp.h',
108 'ssl.h',
109 'ssl3.h',
110 'tls1.h',
111 }),
112 install=true,
113}
114
115-- src/crypto/Makefile.am
116lib('libcrypto.a', [[crypto/(
117 crypto_err.c
118 crypto_ex_data.c
119 crypto_init.c
120 crypto_legacy.c
121 crypto_lock.c
122 crypto_memory.c
123 aes/(
124 aes.c
125 aes_core.c
126 )
127 asn1/(
128 a_bitstr.c
129 a_enum.c
130 a_int.c
131 a_mbstr.c
132 a_object.c
133 a_octet.c
134 a_pkey.c
135 a_print.c
136 a_pubkey.c
137 a_strex.c
138 a_string.c
139 a_strnid.c
140 a_time.c
141 a_time_posix.c
142 a_time_tm.c
143 a_type.c
144 a_utf8.c
145 asn1_err.c
146 asn1_gen.c
147 asn1_item.c
148 asn1_lib.c
149 asn1_old.c
150 asn1_old_lib.c
151 asn1_par.c
152 asn1_types.c
153 asn_mime.c
154 asn_moid.c
155 bio_asn1.c
156 bio_ndef.c
157 p5_pbe.c
158 p5_pbev2.c
159 p8_pkey.c
160 t_crl.c
161 t_req.c
162 t_spki.c
163 t_x509.c
164 t_x509a.c
165 tasn_dec.c
166 tasn_enc.c
167 tasn_fre.c
168 tasn_new.c
169 tasn_prn.c
170 tasn_typ.c
171 tasn_utl.c
172 x_algor.c
173 x_attrib.c
174 x_bignum.c
175 x_crl.c
176 x_exten.c
177 x_long.c
178 x_name.c
179 x_pubkey.c
180 x_req.c
181 x_sig.c
182 x_spki.c
183 x_val.c
184 x_x509.c
185 x_x509a.c
186 )
187 bf/blowfish.c
188 bio/(
189 b_dump.c
190 b_posix.c
191 b_print.c
192 b_sock.c
193 bf_buff.c
194 bf_nbio.c
195 bf_null.c
196 bio_cb.c
197 bio_err.c
198 bio_lib.c
199 bio_meth.c
200 bss_acpt.c
201 bss_bio.c
202 bss_conn.c
203 bss_dgram.c
204 bss_fd.c
205 bss_file.c
206 bss_mem.c
207 bss_null.c
208 bss_sock.c
209 )
210 bn/(
211 bn_add.c
212 bn_add_sub.c
213 bn_bpsw.c
214 bn_const.c
215 bn_convert.c
216 bn_ctx.c
217 bn_div.c
218 bn_err.c
219 bn_exp.c
220 bn_gcd.c
221 bn_isqrt.c
222 bn_kron.c
223 bn_lib.c
224 bn_mod.c
225 bn_mod_sqrt.c
226 bn_mod_words.c
227 bn_mont.c
228 bn_mul.c
229 bn_prime.c
230 bn_primitives.c
231 bn_print.c
232 bn_rand.c
233 bn_recp.c
234 bn_shift.c
235 bn_small_primes.c
236 bn_sqr.c
237 bn_word.c
238 )
239 buffer/(buf_err.c buffer.c)
240 bytestring/(bs_ber.c bs_cbb.c bs_cbs.c)
241 camellia/camellia.c
242 cast/cast.c
243 chacha/chacha.c
244 cmac/(cm_ameth.c cm_pmeth.c cmac.c)
245 cms/(
246 cms_asn1.c
247 cms_att.c
248 cms_dd.c
249 cms_enc.c
250 cms_env.c
251 cms_err.c
252 cms_ess.c
253 cms_io.c
254 cms_kari.c
255 cms_lib.c
256 cms_pwri.c
257 cms_sd.c
258 cms_smime.c
259 )
260 conf/(
261 conf_api.c
262 conf_def.c
263 conf_err.c
264 conf_lib.c
265 conf_mod.c
266 conf_sap.c
267 )
268 ct/(
269 ct_b64.c
270 ct_err.c
271 ct_log.c
272 ct_oct.c
273 ct_policy.c
274 ct_prn.c
275 ct_sct.c
276 ct_sct_ctx.c
277 ct_vfy.c
278 ct_x509v3.c
279 )
280 curve25519/(curve25519-generic.c curve25519.c)
281 des/(
282 des.c
283 des_cksum.c
284 des_enc.c
285 des_fcrypt.c
286 des_key.c
287 )
288 dh/(
289 dh_ameth.c
290 dh_asn1.c
291 dh_check.c
292 dh_err.c
293 dh_gen.c
294 dh_key.c
295 dh_lib.c
296 dh_pmeth.c
297 )
298 dsa/(
299 dsa_ameth.c
300 dsa_asn1.c
301 dsa_err.c
302 dsa_gen.c
303 dsa_key.c
304 dsa_lib.c
305 dsa_meth.c
306 dsa_ossl.c
307 dsa_pmeth.c
308 dsa_prn.c
309 )
310 ec/(
311 ec_ameth.c
312 ec_asn1.c
313 ec_convert.c
314 ec_curve.c
315 ec_err.c
316 ec_field.c
317 ec_key.c
318 ec_lib.c
319 ec_mult.c
320 ec_pmeth.c
321 eck_prn.c
322 ecp_hp_methods.c
323 ecp_methods.c
324 ecx_methods.c
325 )
326 ecdh/ecdh.c
327 ecdsa/ecdsa.c
328 engine/engine_stubs.c
329 err/(err.c err_all.c err_prn.c)
330 evp/(
331 bio_b64.c
332 bio_enc.c
333 bio_md.c
334 e_aes.c
335 e_bf.c
336 e_camellia.c
337 e_cast.c
338 e_chacha.c
339 e_chacha20poly1305.c
340 e_des.c
341 e_des3.c
342 e_idea.c
343 e_null.c
344 e_rc2.c
345 e_rc4.c
346 e_sm4.c
347 e_xcbc_d.c
348 evp_aead.c
349 evp_cipher.c
350 evp_digest.c
351 evp_encode.c
352 evp_err.c
353 evp_key.c
354 evp_names.c
355 evp_pbe.c
356 evp_pkey.c
357 m_md4.c
358 m_md5.c
359 m_md5_sha1.c
360 m_null.c
361 m_ripemd.c
362 m_sha1.c
363 m_sha3.c
364 m_sigver.c
365 m_sm3.c
366 p_legacy.c
367 p_lib.c
368 p_sign.c
369 p_verify.c
370 pmeth_fn.c
371 pmeth_gn.c
372 pmeth_lib.c
373 )
374 hkdf/hkdf.c
375 hmac/(hm_ameth.c hm_pmeth.c hmac.c)
376 idea/idea.c
377 kdf/(hkdf_evp.c kdf_err.c tls1_prf.c)
378 lhash/lhash.c
379 md4/md4.c
380 md5/md5.c
381 mlkem/(mlkem.c mlkem_internal.c mlkem_key.c)
382 modes/(
383 cbc128.c
384 ccm128.c
385 cfb128.c
386 ctr128.c
387 gcm128.c
388 ofb128.c
389 xts128.c
390 )
391 objects/(
392 obj_dat.c
393 obj_err.c
394 obj_lib.c
395 obj_xref.c
396 )
397 ocsp/(
398 ocsp_asn.c
399 ocsp_cl.c
400 ocsp_err.c
401 ocsp_ext.c
402 ocsp_ht.c
403 ocsp_lib.c
404 ocsp_prn.c
405 ocsp_srv.c
406 ocsp_vfy.c
407 )
408 pem/(
409 pem_all.c
410 pem_err.c
411 pem_info.c
412 pem_lib.c
413 pem_oth.c
414 pem_pk8.c
415 pem_pkey.c
416 pem_sign.c
417 pem_x509.c
418 pem_xaux.c
419 pvkfmt.c
420 )
421 pkcs12/(
422 p12_add.c
423 p12_asn.c
424 p12_attr.c
425 p12_crt.c
426 p12_decr.c
427 p12_init.c
428 p12_key.c
429 p12_kiss.c
430 p12_mutl.c
431 p12_npas.c
432 p12_p8d.c
433 p12_p8e.c
434 p12_sbag.c
435 p12_utl.c
436 pk12err.c
437 )
438 pkcs7/(
439 pk7_asn1.c
440 pk7_attr.c
441 pk7_doit.c
442 pk7_lib.c
443 pk7_mime.c
444 pk7_smime.c
445 pkcs7err.c
446 )
447 poly1305/poly1305.c
448 rand/(rand_err.c rand_lib.c randfile.c)
449 rc2/rc2.c
450 rc4/rc4.c
451 ripemd/ripemd.c
452 rsa/(
453 rsa_ameth.c
454 rsa_asn1.c
455 rsa_blinding.c
456 rsa_chk.c
457 rsa_eay.c
458 rsa_err.c
459 rsa_gen.c
460 rsa_lib.c
461 rsa_meth.c
462 rsa_none.c
463 rsa_oaep.c
464 rsa_pk1.c
465 rsa_pmeth.c
466 rsa_prn.c
467 rsa_pss.c
468 rsa_saos.c
469 rsa_sign.c
470 rsa_x931.c
471 )
472 sha/(sha1.c sha256.c sha3.c sha512.c)
473 sm3/sm3.c
474 sm4/sm4.c
475 stack/stack.c
476 ts/(
477 ts_asn1.c
478 ts_conf.c
479 ts_err.c
480 ts_lib.c
481 ts_req_print.c
482 ts_req_utils.c
483 ts_rsp_print.c
484 ts_rsp_sign.c
485 ts_rsp_utils.c
486 ts_rsp_verify.c
487 ts_verify_ctx.c
488 )
489 txt_db/txt_db.c
490 ui/(ui_err.c ui_lib.c ui_null.c ui_openssl.c)
491 x509/(
492 by_dir.c
493 by_file.c
494 by_mem.c
495 x509_addr.c
496 x509_akey.c
497 x509_akeya.c
498 x509_alt.c
499 x509_asid.c
500 x509_att.c
501 x509_bcons.c
502 x509_bitst.c
503 x509_cmp.c
504 x509_conf.c
505 x509_constraints.c
506 x509_cpols.c
507 x509_crld.c
508 x509_d2.c
509 x509_def.c
510 x509_err.c
511 x509_ext.c
512 x509_extku.c
513 x509_genn.c
514 x509_ia5.c
515 x509_info.c
516 x509_int.c
517 x509_issuer_cache.c
518 x509_lib.c
519 x509_lu.c
520 x509_ncons.c
521 x509_obj.c
522 x509_ocsp.c
523 x509_pcons.c
524 x509_pku.c
525 x509_pmaps.c
526 x509_policy.c
527 x509_prn.c
528 x509_purp.c
529 x509_r2x.c
530 x509_req.c
531 x509_set.c
532 x509_siginfo.c
533 x509_skey.c
534 x509_trs.c
535 x509_txt.c
536 x509_utl.c
537 x509_v3.c
538 x509_verify.c
539 x509_vfy.c
540 x509_vpm.c
541 x509cset.c
542 x509name.c
543 x509rset.c
544 x509spki.c
545 x509type.c
546 x_all.c
547 )
548) $builddir/pkg/openbsd/libbsd.a.d]])
549file('lib/libcrypto.a', '644', '$outdir/libcrypto.a')
550
551-- src/ssl/Makefile.am
552lib('libssl.a', [[ssl/(
553 bio_ssl.c
554 bs_ber.c
555 bs_cbb.c
556 bs_cbs.c
557 d1_both.c
558 d1_lib.c
559 d1_pkt.c
560 d1_srtp.c
561 pqueue.c
562 s3_cbc.c
563 s3_lib.c
564 ssl_asn1.c
565 ssl_both.c
566 ssl_cert.c
567 ssl_ciph.c
568 ssl_ciphers.c
569 ssl_clnt.c
570 ssl_err.c
571 ssl_init.c
572 ssl_kex.c
573 ssl_lib.c
574 ssl_methods.c
575 ssl_pkt.c
576 ssl_rsa.c
577 ssl_seclevel.c
578 ssl_sess.c
579 ssl_sigalgs.c
580 ssl_srvr.c
581 ssl_stat.c
582 ssl_tlsext.c
583 ssl_transcript.c
584 ssl_txt.c
585 ssl_versions.c
586 t1_enc.c
587 t1_lib.c
588 tls12_key_schedule.c
589 tls12_lib.c
590 tls12_record_layer.c
591 tls13_client.c
592 tls13_error.c
593 tls13_handshake.c
594 tls13_handshake_msg.c
595 tls13_key_schedule.c
596 tls13_legacy.c
597 tls13_lib.c
598 tls13_quic.c
599 tls13_record.c
600 tls13_record_layer.c
601 tls13_server.c
602 tls_buffer.c
603 tls_content.c
604 tls_key_share.c
605 tls_lib.c
606) libcrypto.a.d]])
607file('lib/libssl.a', '644', '$outdir/libssl.a')
608
609exe('openssl', [[apps/openssl/(
610 apps.c apps_posix.c asn1pars.c ca.c certhash.c ciphers.c cms.c crl.c
611 crl2p7.c dgst.c dh.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c
612 errstr.c gendh.c gendsa.c genpkey.c genrsa.c ocsp.c
613 openssl.c passwd.c pkcs12.c pkcs7.c pkcs8.c pkey.c pkeyparam.c
614 pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c s_cb.c s_client.c
615 s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c ts.c
616 verify.c version.c x509.c
617) libssl.a.d libcrypto.a.d]])
618file('bin/openssl', '755', '$outdir/openssl')
619man{'apps/openssl/openssl.1'}
620
621fetch 'curl'