aboutsummaryrefslogtreecommitdiff
path: root/secure/lib/libcrypto/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* openssl: add a simple smoke test for the legacy providerEnji Cooper2025-10-171-0/+3
| | | | | | | | | | | This change adds a simple smoke test for the legacy provider to ensure that the provider doesn't break in the future when performing updates. This is not a functional or system test; the OpenSSL test suite does a much better job at doing this than we can. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53045
* OpenSSL: update Makefiles to reflect 3.5.1 releaseEnji Cooper2025-09-181-19/+30
| | | | | | | | | | | | | | This is a targeted effort to update the INCS and SRCS entries for libcrypto, the legacy provider, and libssl to match what upstream (OpenSSL) builds in their respective libraries. The number of stylistic changes were kept at a minimum. Another incoming change will reformat this file to make future maintenance easier. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52554
* openssl: Disable KTLS in bootstrap librariesMark Johnston2025-09-041-1/+2
| | | | | | | | | We need to build OpenSSL when bootstrapping certctl. On MacOS ktls_enable() isn't defined anywhere, so without this the build fails. We don't need KTLS in the bootstrap library, so just disable it. Reviewed by: khorben, ngie Differential Revision: https://reviews.freebsd.org/D52341
* packages: Improve handling of -lib packagesLexi Winter2025-08-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some packages (OpenSSL, Kerberos) we want to ship runtime libraries in a separate package, e.g. openssl and openssl-lib. Currently this is done using PACKAGE=openssl-lib, but that creates packages with strange names like openssl-lib-lib32. Instead, add a new LIB_PACKAGE option to bsd.lib.mk that causes runtime libraries to be placed in a new -lib subpackage. This significantly improves the set of packages we create; for example, OpenSSL goes from: FreeBSD-openssl FreeBSD-openssl-dbg FreeBSD-openssl-lib FreeBSD-openssl-lib-dbg FreeBSD-openssl-lib-dbg-lib32 FreeBSD-openssl-lib-dev FreeBSD-openssl-lib-dev-lib32 FreeBSD-openssl-lib-lib32 FreeBSD-openssl-lib-man FreeBSD-openssl-man to: FreeBSD-openssl FreeBSD-openssl-dbg FreeBSD-openssl-dbg-lib32 FreeBSD-openssl-dev FreeBSD-openssl-dev-lib32 FreeBSD-openssl-lib FreeBSD-openssl-lib32 FreeBSD-openssl-man While here, move /usr/bin/krb5-config and /usr/bin/compile_et into the kerberos-dev package. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51925
* build: remove certctl requirement for host OpenSSL libs on macOSKyle Evans2025-08-191-1/+4
| | | | | | | | | | | | | | | | | | Some platforms, like macOS, do not expose headers for the system's libcrypto for public consumption. libcrypto is relatively heavy and needs to know, e.g., the host system's endianness, so we scope the build down to macOS where OpenSSL headers are known to not be present and we can be reasonably certain that most of the systems today that would be cross-building are little endian. We still don't bother if building WITHOUT_OPENSSL since the end result is expected to be used by OpenSSL, but perhaps we could revisit that independently in case one, e.g., brings their own implementation. Reported by: jrtc27 Reviewed by: jrtc27, ngie Fixes: c340ef28fd38 ("certctl: Reimplement in C") Differential Revision: https://reviews.freebsd.org/D51935
* openssl: Import version 3.5.1Pierre Pronchery2025-08-071-74/+143
| | | | | | | | | | Migrate to OpenSSL 3.5 in advance of FreeBSD 15.0. OpenSSL 3.0 will be EOL after 2026-09-07. Approved by: philip (mentor) Sponsored by: Alpha-Omega Beach Cleaning Project Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51613
* build: remove the last vestiges of lint supportBrooks Davis2025-06-051-1/+0
| | | | | | | | | Commit 1cbb58886a47 (shipped in 12.0.0) removed all lint infrastructure. A bunch of NO_LINT definitions remained (perhaps as a bootstrapping measture). Remove them. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50704
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* libcrypto: complete the support for the 0.9.8 APIPierre Pronchery2023-09-211-4/+4
| | | | | | | | | | | | | When importing OpenSSL 3 in base, some but not all source files implementing the deprecated 0.9.8 API were imported. With this change, it becomes possible again to compile software targeting this API. PR: 272220 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/851
* libcrypto: link engines and the legacy provider to libcryptoPierre Pronchery2023-09-161-0/+2
| | | | | | | | | | | | | | | | OpenSSL's legacy provider module and engines need to link to libcrypto.so, as it provides some of the actual implementations of legacy routines. This is a little tricky due to build order issues. Introduce a small hack (LIBCRYPTO_WITHOUT_SUBDIRS) that builds libcrypto.so in its usual early phase without any OpenSSL provider modules or engines. This is intended to restore the test suite; a future change should remove the hack and replace it with a better approach. PR: 254853, 273528 Discussed with: Folks at EuroBSDCon in Coimbra Sponsored by: The FreeBSD Foundation
* libcrypto: Switch back to the generated assembly in sys/crypto/opensslJohn Baldwin2023-08-291-2/+2
| | | | | Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41569
* libcrypto: Add buildasm and cleanasm targetsJohn Baldwin2023-08-291-0/+7
| | | | | | | These targets generate all the assembly files in sys/crypto/openssl. Reviewed by: markj, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D41590
* libcrypto: Update assembly build glue for x86 for OpenSSL 3.0.John Baldwin2023-08-221-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notably, define AES_ASM which is required for any AES acceleration (OpenSSL 1.0 gated all AES acceleration on OPENSSL_CPUID_OBJ instead). Enabling this exposed that new assembly files added in OpenSSL 3.0 needed to be included in the build (aes-x86-64.S and aes-586.S). Both of these files supplant both aes_core.c and aes_cbc.c. The last file had to be moved out of the MI SRCS line for aes and into each ASM_* for non-x86. As part of this I audited the generated configdata.pm for amd64, i386, and aarch64 and found the following additional discrepecancies that are fixed here as well: - Enabled BSAES_ASM on amd64 which requires bsase-x86_64.S - Enabled WHIRLPOOL_ASM on amd64 (asm sources already built) - Enabled CMLL_ASM on amd64 and i386 (asm sources already built) aarch64 had no discreprecancies in configdata.pm, and no *.pl asm generators were missing for aarch64 in Makefile.asm. I did not check powerpc or armv7, but for armv7 all of the asm generators seem to be present in Makefile.asm. Reported by: gallatin (AES-GCM using plain software on amd64) Reviewed by: gallatin, ngie, emaste Differential Revision: https://reviews.freebsd.org/D41539
* libcrypto: add rsa_depr.c to the buildEd Maste2023-08-181-1/+1
| | | | | | | | | It provides the RSA_generate_key function, which is deprecated as of 3.0 but is used by various ports. Reviewed by: kbowling Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41506
* libcrypto: add err_all_legacy.c to the buildEd Maste2023-08-181-1/+1
| | | | | | | | | | It provides the ERR_load_*_strings routines, which are deprecated as of 3.0 but are used by various ports. PR: 272580 Reviewed by: kbowling Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41505
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* pkgbase: reorganise caroot and openssl packagesDoug Rabson2023-08-051-1/+1
| | | | | | | | | This splits out the certctl utility into a new certctl package and the openssl libs into an openssl-lib package. PR: 272816 Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41321
* openssl: include d2i_KeyParams() and d2i_KeyParams_bio()Kristof Provost2023-07-091-2/+2
| | | | | | | | | | | | These functions are new, and some ports (e.g.opensc) expect to have them available. Add the file they're defined in to the build, and add them to Version.map. PR: 270076 Reviewed by: markj, emaste, pierre Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40914
* libcrypto: group definitions for libcrypto and fipsPierre Pronchery2023-07-051-10/+0
| | | | | | | | | | OpenSSL 3 supports a modular architecture, allowing different providers to bring specific implementations of cryptographical algorithms. This change makes sure the FIPS module matches build instructions used for libcrypto. Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/787
* libcrypto: build nistp* on all little-endian 64-bit targetsEd Maste2023-06-251-2/+4
| | | | | | | | | | | | | libcrypto intends to provide these routines on little-endian 64-bit targets. This was previously done by including them in the ASM_aarch64 and ASM_amd64 blocks in the Makefile, but this excluded powerpc64le and riscv64. Reported by: ci.freebsd.org Reviewed by: jrtc27 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40749
* Merge OpenSSL 3.0.9Pierre Pronchery2023-06-231-142/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate to OpenSSL 3.0 in advance of FreeBSD 14.0. OpenSSL 1.1.1 (the version we were previously using) will be EOL as of 2023-09-11. Most of the base system has already been updated for a seamless switch to OpenSSL 3.0. For many components we've added `-DOPENSSL_API_COMPAT=0x10100000L` to CFLAGS to specify the API version, which avoids deprecation warnings from OpenSSL 3.0. Changes have also been made to avoid OpenSSL APIs that were already deprecated in OpenSSL 1.1.1. The process of updating to contemporary APIs can continue after this merge. Additional changes are still required for libarchive and Kerberos- related libraries or tools; workarounds will immediately follow this commit. Fixes are in progress in the upstream projects and will be incorporated when those are next updated. There are some performance regressions in benchmarks (certain tests in `openssl speed`) and in some OpenSSL consumers in ports (e.g. haproxy). Investigation will continue for these. Netflix's testing showed no functional regression and a rather small, albeit statistically significant, increase in CPU consumption with OpenSSL 3.0. Thanks to ngie@ and des@ for updating base system components, to antoine@ and bofh@ for ports exp-runs and port fixes/workarounds, and to Netflix and everyone who tested prior to commit or contributed to this update in other ways. PR: 271615 PR: 271656 [exp-run] Relnotes: Yes Sponsored by: The FreeBSD Foundation
* OpenSSL: Merge OpenSSL 1.1.1uJung-uk Kim2023-05-301-1/+0
|
* OpenSSL: Merge OpenSSL 1.1.1tJung-uk Kim2023-02-071-0/+1
|
* openssl: install pc filesBaptiste Daroussin2022-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | most programs in ports are looking for .pc files in order to get the necessary information on how to compile and link against openssl. The ports now also has a way to hide or force a path for pkgconf. Providing .pc files along with openssl in base will allow (once all the supported version of FreeBSD has it) so improve the framework to deal with openssl in base vs openssl in ports (and libressl) This will also greatly reduce the number of patches necessary to workaround the build systems which only knows how to detect where openssl is installed via pkgconf. PR: 266051 MFC After: 3 weeks Reviewed by: jkim, delphij Exp-run by: antoine Differential Revision: https://reviews.freebsd.org/D36360
* libcrypto: Work around strict aliasing violations in bn_nist.cJessica Clarke2022-07-251-0/+5
| | | | | | | | | | | | | | | | | This file is full of strict aliasing violations. Previously it was only optimised in ways that broke the code by CHERI LLVM, but now it appears that the in-tree LLVM also breaks it for RISC-V, resulting in broken ECDSA signature validation with error messages like the following: root@unmatched:/usr/src # ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ecdsa_key is not a key file. root@unmatched:/usr/src # git fetch fatal: unable to access 'https://git.FreeBSD.org/src.git/': error:1012606B:elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on curve Reviewed by: dim, jkim Obtained from: CheriBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35885
* Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64lePiotr Kubaj2021-11-231-1/+49
| | | | | | | | | | | | Summary: 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60be8142e38b7c9cd382a needs to be merged for ELFv2 support on big-endian. 2. crypto/openssl/crypto/ppccap.c needs to be patched. Same reason as in https://github.com/openssl/openssl/pull/17082. Approved by: jkim, jhibbits MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33076
* pkgbase: Put openssl in its own packageEmmanuel Vadot2021-05-131-1/+1
| | | | | | | | This is useful for upgrade and also to make tiny jail so they won't depend on FreeBSD-utilities (where openssl was packaged before). MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30081
* OpenSSL: Support for kernel TLS offload (KTLS)John Baldwin2021-01-281-5/+13
| | | | | | | | | | | | | | | | | | | | This merges upstream patches from OpenSSL's master branch to add KTLS infrastructure for TLS 1.0-1.3 including both RX and TX offload and SSL_sendfile support on both Linux and FreeBSD. Note that TLS 1.3 only supports TX offload. A new WITH/WITHOUT_OPENSSL_KTLS determines if OpenSSL is built with KTLS support. It defaults to enabled on amd64 and disabled on all other architectures. Reviewed by: jkim (earlier version) Approved by: secteam Obtained from: OpenSSL (patches from master) MFC after: 1 week Relnotes: yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28273
* Move generated OpenSSL assembly routines into the kernel sources.John Baldwin2020-10-201-1/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=366898
* Install man5 and man7 for OpenSSL.Jung-uk Kim2020-01-221-4/+1
| | | | | | | | | | Note config.5 and crypto.7 are not installed because we have conflicts. Requested by: phk MFC after: 1 month Notes: svn path=/head/; revision=356963
* Merge OpenSSL 1.1.1d.Jung-uk Kim2019-09-101-7/+7
| | | | Notes: svn path=/head/; revision=352191
* pkgbase: Put a lot of binaries and lib in FreeBSD-runtimeEmmanuel Vadot2019-09-051-0/+1
| | | | | | | | | | | | All of them are needed to be able to boot to single user and be able to repair a existing FreeBSD installation so put them directly into FreeBSD-runtime. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21503 Notes: svn path=/head/; revision=351855
* Enable devcryptoeng for OpenSSL.Jung-uk Kim2018-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been deprecated in favor of this new engine. However, this engine is not throughly tested on FreeBSD because it was originally written for Linux. http://cryptodev-linux.org/ Also, the author actually meant to enable it by default on BSD platforms but he failed to do so because there was a bug in the Configure script. https://github.com/openssl/openssl/pull/7882 Now they found that it was more generic issue. https://github.com/openssl/openssl/pull/7885 Therefore, we need to enable this engine on head to give it more exposure. Notes: svn path=/head/; revision=342009
* Merge OpenSSL 1.1.1a.Jung-uk Kim2018-11-201-3/+3
| | | | Notes: svn path=/head/; revision=340703
* Bump base OpenSSL libraries versions to avoid conflict with port's libraries.Konstantin Belousov2018-10-251-1/+1
| | | | | | | | | | Reported by: many Reviewed by: gjb Sponsored by: The FreeBSD Foundation MFC after: 3 hours Notes: svn path=/head/; revision=339709
* libcrypto: have buildinf.h depend on MakefileEd Maste2018-10-051-1/+1
| | | | | | | | | | | So that it will be regenerated after Makefile changes affecting the file's content - specifically, the OpenSSL 1.1.1 update adds a DATE macro which did not exist previously. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/openssl111/; revision=339209
* Make it more meta mode friendly.Jung-uk Kim2018-09-251-3/+6
| | | | Notes: svn path=/projects/openssl111/; revision=338935
* Fix CLEANFILES.Jung-uk Kim2018-09-251-1/+1
| | | | Notes: svn path=/projects/openssl111/; revision=338934
* Connect an assembly file for aarch64 to build.Jung-uk Kim2018-09-221-1/+3
| | | | Notes: svn path=/projects/openssl111/; revision=338894
* Add missing ACFLAGS for aarch64.Jung-uk Kim2018-09-221-0/+3
| | | | Notes: svn path=/projects/openssl111/; revision=338884
* Add a missing source file for SHA.Jung-uk Kim2018-09-221-0/+2
| | | | Notes: svn path=/projects/openssl111/; revision=338882
* Add another include directory for aarch64 and arm.Jung-uk Kim2018-09-221-0/+1
| | | | Notes: svn path=/projects/openssl111/; revision=338880
* Connect assembly files for arm to build.Jung-uk Kim2018-09-221-1/+17
| | | | Notes: svn path=/projects/openssl111/; revision=338878
* Connect assembly files for aarch64 to build.Jung-uk Kim2018-09-221-7/+21
| | | | Notes: svn path=/projects/openssl111/; revision=338876
* Unify opensslconf.h templates.Jung-uk Kim2018-09-211-1/+1
| | | | | | | There is no MD macro in this file any more. Notes: svn path=/projects/openssl111/; revision=338870
* Sort assembly source files for i386.Jung-uk Kim2018-09-201-1/+1
| | | | Notes: svn path=/projects/openssl111/; revision=338845
* Connect i386 assembly files to build.Jung-uk Kim2018-09-201-11/+50
| | | | Notes: svn path=/projects/openssl111/; revision=338843
* Link libcrypto with pthread.Jung-uk Kim2018-09-201-0/+2
| | | | Notes: svn path=/projects/openssl111/; revision=338816
* Remove an obsolete compiler option.Jung-uk Kim2018-09-201-2/+0
| | | | Notes: svn path=/projects/openssl111/; revision=338815
* Build libcrypto for amd64.Jung-uk Kim2018-09-191-250/+211
| | | | Notes: svn path=/projects/openssl111/; revision=338764