Skip to contentSkip to conversation

Fix build with mbedtls w/o SSL renegotiation support

PATCH Antonio Quartulli 3 participants 5 messages Apr 12, 2021 – Jun 15, 2021 1 message not in the archive

lore
Share & tools
lore

Antonio Quartulli

author Acked-by
#1 lore raw
In reply to a message not in the archive

Hi,

Quoted 10 lines · Max Fillinger

In mbedtls, support for SSL renegotiation can be disabled at compile-time. However, OpenVPN cannot be built with such a library because it calls mbedtls_ssl_conf_renegotiation() to disable this feature at runtime. This function doesn't exist when mbedtls was built without support for SSL renegotiation.

This commit fixes the build by ifdef'ing out the function call when mbedtls was built without support for SSL renegotiation.

Compile tested against mbedtls with and without this feature defined. Could see the error and it gets fixed when this patch is applied.

By having a look at the mbedtls git history I could see this define exists since the library was under the polarssl namespace. Which means it is old enough for us to not worry about.

Signature · 1 line
Antonio Quartulli
#2 lore raw
In reply to a message not in the archive

Your patch has been applied to the master branch.

commit e4bd17c86e01aaf6f809d9ea355419c86c4defdc

Author: Max Fillinger
Date:   Mon Apr 12 19:46:17 2021 +0200
     Fix build with mbedtls w/o SSL renegotiation support

     Signed-off-by: Max Fillinger <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/search?l=mid&[email protected]...
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#3 lore raw

Hi,

Quoted 11 lines · Gert Doering

Your patch has been applied to the master branch.

commit e4bd17c86e01aaf6f809d9ea355419c86c4defdc

Author: Max Fillinger
Date:   Mon Apr 12 19:46:17 2021 +0200
     Fix build with mbedtls w/o SSL renegotiation support

     Signed-off-by: Max Fillinger <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>

As a side note - because we had this with Steffan occasionally in the past. I'm not sure if Mails "from foxcrypto" come with proper Message-IDs, because it seems that the Sourceforge list server felt the need to create one (or create a new one).

Unfortunately, that "feature" in SF seems to be quite broken, because mails to different receipients end up having *different* message-IDs - the "9n@" is what I saw here, but patchwork saw something with "8S@", and mail-archive saw something yet again (so the URL search failed).

Worth investigating on the next patch... what did "git send-email" put in there, what ended up on the list, where was it massacred.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#4 lore raw
In reply to Gert Doering
Quoted 7 lines · Gert Doering

Your patch has been applied to the master branch.

commit e4bd17c86e01aaf6f809d9ea355419c86c4defdc

Author: Max Fillinger
Date:   Mon Apr 12 19:46:17 2021 +0200

Fix build with mbedtls w/o SSL renegotiation support

Please backport this to release/2.5 as well. 2.5.2 is affected by this and does not compile with an mbed TLS library built in this manner.

Regards,
Magnus Kroken

#5 lore raw

Hi,

Quoted 11 lines · Magnus Kroken
Quoted 7 lines · Gert Doering

Your patch has been applied to the master branch.

commit e4bd17c86e01aaf6f809d9ea355419c86c4defdc

Author: Max Fillinger
Date:   Mon Apr 12 19:46:17 2021 +0200

Fix build with mbedtls w/o SSL renegotiation support

Please backport this to release/2.5 as well. 2.5.2 is affected by this and does not compile with an mbed TLS library built in this manner.

Took me a while, but here we go...

commit ad4f8e37617f3f020154bd224f9b693714c6370a (release/2.5)

Author: Max Fillinger <[email protected]...>
Date:   Mon Apr 12 19:46:17 2021 +0200
    Fix build with mbedtls w/o SSL renegotiation support

    Signed-off-by: Gert Doering <[email protected]...>
    (cherry picked from commit e4bd17c86e01aaf6f809d9ea355419c86c4defdc)

and yes, this obviously makes sense as 2.5 has the offending mbedtls_ssl_conf_renegotiation() call...

I do think that mbedTLS is being fairly unfriendly here - they should always provide the function, and just return an error if the application requests to *enable* SSL_RENEGOTIATION, but it wasn't compiled in... *disabling* is a no-op in that case, so shouldn't require conditional code in the caller. But this is not a fairy tale, so I get to live with the #ifdef...

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...