Supply RSA limit params for BoringSSL/AWS-LC.

In commit 625475f, BoringSSL removed OPENSSL_RSA_SMALL_MODULUS_BITS and
OPENSSL_RSA_MAX_PUBEXP_BITS (previously having but not exporting them).
Check for them and if not found supply them, assuming they are no bigger
than when they were removed.  Fixes builds with BoringSSL and AWS-LC.
This commit is contained in:
Darren Tucker committed 2026-10-31 08:49:44 +11:00
1 parent 61ead74082
commit 1fbdcb4025
1 file changed
+11
+11
View File
@@ -3363,6 +3363,17 @@ if test "x$openssl" = "xyes" ; then
aws-lc|boringssl)
# Brainpool does not work with AWC-LS or BoringSSL.
unsupported_algorithms="$unsupported_algorithms mlkem768brainpoolp256r1-sha256"
# BoringSSL removed these in exports in commit 625475f
# Assume they are no larger than they were when removed.
AC_CHECK_DECL([OPENSSL_RSA_SMALL_MODULUS_BITS], [],
AC_DEFINE([OPENSSL_RSA_SMALL_MODULUS_BITS], [3072],
[BoringSSL/AWS-LC does not provide this]),
[[#include <openssl/rsa.h>]])
AC_CHECK_DECL([OPENSSL_RSA_MAX_PUBEXP_BITS], [],
AC_DEFINE([OPENSSL_RSA_MAX_PUBEXP_BITS], [64],
[BoringSSL/AWS-LC does not provide this]),
[[#include <openssl/rsa.h>]])
;;
*)
AC_CHECK_DECL([NID_brainpoolP256r1],