Skip to content

Commit 5053c7f

Browse files
committed
Do not support tls_ctx_set_cert_profile on AWS-LC
SSL_CTX_set_security_level does nothing on AWS-LC and gives a deprecated warning on compile. It is better to give the user a warning than to effectively silently ignore it as well. Change-Id: I74841d3611c62d3c59fc839bc73a0c83ce025262 Signed-off-by: Arne Schwabe <arne@rfc2549.org>
1 parent b840ad2 commit 5053c7f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/openvpn/ssl_openssl.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,9 @@ tls_ctx_restrict_ciphers_tls13(struct tls_root_ctx *ctx, const char *ciphers)
518518
void
519519
tls_ctx_set_cert_profile(struct tls_root_ctx *ctx, const char *profile)
520520
{
521-
#if OPENSSL_VERSION_NUMBER > 0x10100000L \
522-
&& (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER > 0x3060000fL)
521+
#if OPENSSL_VERSION_NUMBER > 0x10100000L \
522+
&& (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER > 0x3060000fL) \
523+
&& !defined(OPENSSL_IS_AWSLC)
523524
/* OpenSSL does not have certificate profiles, but a complex set of
524525
* callbacks that we could try to implement to achieve something similar.
525526
* For now, use OpenSSL's security levels to achieve similar (but not equal)
@@ -549,7 +550,7 @@ tls_ctx_set_cert_profile(struct tls_root_ctx *ctx, const char *profile)
549550
if (profile)
550551
{
551552
msg(M_WARN,
552-
"WARNING: OpenSSL 1.1.0 and LibreSSL do not support "
553+
"WARNING: OpenSSL 1.1.0, aws-lc and LibreSSL do not support "
553554
"--tls-cert-profile, ignoring user-set profile: '%s'",
554555
profile);
555556
}

0 commit comments

Comments
 (0)