vibe-d/vibe.d

vibe-d:tls: OpenSSL 3.0 support

dd86k opened this issue · 5 comments

dd86k commented

When compiling vibe-d 0.9.4 on Ubuntu 22.04 LTS where (libssl-dev) OpenSSL is at version 3.0.2, I'm getting a good amount of linker errors, such as:

  • .dub/packages/openssl-1.1.6_1.0.1g/openssl/deimos/openssl/safestack.d:142: undefined reference to 'sk_value'
  • .dub/packages/vibe-d-0.9.4/vibe-d/tls/vibe/stream/openssl.d:1380: undefined reference to 'ERR_put_error'
  • .dub/packages/vibe-d-0.9.4/vibe-d/tls/vibe/stream/openssl.d:626: undefined reference to 'SSLv23_client_method'

OpenSSL 3 docs does confirm that, for example, SSLv23_client_method no longer exists, it was renamed to TLS_method:

SSLv23_method(), SSLv23_server_method() and SSLv23_client_method() were deprecated and the preferred TLS_method()

Trying to set the dependency to notls is not a working workaround.

dd86k commented

Only this config stops attempting to link openssl:

dependency "vibe-d:tls" version="*"
subConfigurations "vibe-d:tls" "notls"
# Despite this version is said removed in the vibe-d docs, it is required
versions "VibeNoSSL"

The issue would probably be better suited to Deimos: D-Programming-Deimos/openssl#65
However, as it is likely other people encountering this issue will end up here, I'll leave it open.

dd86k commented

I saw #2646 and ad96dfe come by, so I'm hopeful. I'll personally be willing to do tests for 18.04 LTS, 20.04 LTS, and 22.04 LTS.

dd86k commented

#2650 was merged. I will close this on the next release of vibe-d.

People are still having trouble with this. Is there a valid way to select openssl 3 using a configuration? I don't see it here: https://github.com/vibe-d/vibe.d/blob/master/tls/dub.sdl

For reference: https://forum.dlang.org/post/sxgbuqzwnitcvvxzigwz@forum.dlang.org