Files
Gordon Tetlow 020adbc68c openssl: build libcrypto and libssl from upstream's source set
Compared the bmake source lists of libcrypto and libssl with upstream's
own build of 3.5.8 (configured with the options in
crypto/openssl/BSDmakefile), and fix the differences that are not
intentional.

libcrypto:
- aarch64: build bsaes-armv8.S and md5-aarch64.S, and define BSAES_ASM
  and MD5_ASM, as upstream does.  Both files have been generated into
  sys/crypto/openssl/aarch64 since the 3.5.1 import, but were never
  compiled.
- Stop compiling der_digests_gen.c, der_dsa_key.c and der_ec_key.c.
  Upstream keeps them in libcommon.a, but the linker does not extract
  them into libcrypto (checked with --why-extract) as nothing in
  libcrypto references them.

libssl:
- Fix the "SRSC" typo that left out ssl3_cbc.c and tls_pad.c.
- Build libssl's own copy of crypto/thread/arch*.c, as upstream does.
  Before this change, libssl got these functions from libcrypto, which
  exports them only for this purpose.  A planned later change removes
  those exports.

crypto/openssl:
- crypto/bio/bio_sock2.c: remove the local ktls_enable() call in
  BIO_socket() it does nothing on FreeBSD.  The file is now identical
  to upstream.
- Remove the empty file "patch", committed by mistake in f775385aff.

With this change, libssl no longer imports any libcrypto internals.

Reviewed by:	ngie, markj
Differential Revision:	https://reviews.freebsd.org/D60395

(cherry picked from commit ba9a5169d1)
2026-10-23 15:34:54 -07:00
..
2026-10-05 09:47:51 -04:00
…

This directory is for the EXACT same use as src/contrib, except it
holds crypto sources.  In other words, this holds raw sources obtained
from various third party vendors, with FreeBSD patches applied.  No
compilation is done from this directory, it is all done from the
src/secure directory.  The separation between src/contrib and src/crypto
is the result of an old USA law, which made these sources export
controlled, so they had to be kept separate.