Compare 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, and its linker does not extract them into libcrypto (checked with --why-extract): nothing in libcrypto references them.
libssl:
- Fix the "SRSC" typo that left out ssl3_cbc.c and tls_pad.c, and 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 later change removes those exports.
crypto/openssl:
- crypto/bio/bio_sock2.c: remove the local ktls_enable() call in BIO_socket(). ktls_enable() does nothing on FreeBSD. The file is now identical to upstream.
- Remove the empty file "patch", committed by mistake in f775385affef.
Tested on arm64: libcrypto, libssl, the engines, the legacy provider
and openssl(1) build, and load with LD_BIND_NOW=1. libssl no longer
imports any libcrypto internals. The libcrypto and libssl export lists
do not change. For the other architectures, the source lists were
compared with upstream's configuration for each one, but nothing was
built.