[Openvpn-devel,v3] AWS-LC: Add missing return and cast in ssl_tls1_PRF

Message ID 20260313153034.31872-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v3] AWS-LC: Add missing return and cast in ssl_tls1_PRF | expand

Commit Message

Gert Doering March 13, 2026, 3:30 p.m. UTC
From: Arne Schwabe <arne@rfc2549.org>

Change-Id: I7843ff1422cc3b46870749b2daab1698646d43eb
Signed-off-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1567
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1567
This mail reflects revision 3 of this Change.

Signed-off-by line for the author was added as per our policy.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>

Comments

Gert Doering March 13, 2026, 5:41 p.m. UTC | #1
Obvious bugfix...

Your patch has been applied to the master and release/2.7 branch.

Release/2.6 does not have AWS-LC support yet.

commit 3541226a8b7767d87dfbec8724d7789966622004 (master)
commit 068598717a83a9576b82dbd65308d407ba5c7a0d (release/2.7)
Author: Arne Schwabe
Date:   Fri Mar 13 16:30:27 2026 +0100

     AWS-LC: Add missing return and cast in ssl_tls1_PRF

     Signed-off-by: Arne Schwabe <arne-openvpn@rfc2549.org>
     Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1567
     Message-Id: <20260313153034.31872-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36107.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index de3878d..b6e2106 100644
--- a/src/openvpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -1412,7 +1412,8 @@ 
 ssl_tls1_PRF(const uint8_t *label, size_t label_len, const uint8_t *sec, size_t slen, uint8_t *out1,
              size_t olen)
 {
-    CRYPTO_tls1_prf(EVP_md5_sha1(), out1, olen, sec, slen, label, label_len, NULL, 0, NULL, 0);
+    return CRYPTO_tls1_prf(EVP_md5_sha1(), out1, olen, sec, slen,
+                           (const char *)label, label_len, NULL, 0, NULL, 0);
 }
 #elif !defined(LIBRESSL_VERSION_NUMBER) && !defined(ENABLE_CRYPTO_WOLFSSL)
 #if defined(__GNUC__) || defined(__clang__)