Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx: QUIC: Fix SSL 3.0 deprecated function #24005

Merged
merged 1 commit into from
May 6, 2024

Conversation

qosmio
Copy link
Contributor

@qosmio qosmio commented Apr 24, 2024

EVP_CIPHER_CTX_cipher() function was deprecated in OpenSSL 3.0. As per OpenSSL's recommendation (https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_get0_cipher.html) switch to using EVP_CIPHER_CTX_get0_cipher() instead.

This would remedy the following:

  -L/data/code/openwrt/ipq/staging_dir/target-aarch64_cortex-a53_musl/usr/lib -L/data/code/openwrt/ipq/staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/usr/lib -L/data/code/openwr  t/ipq/staging_dir/toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/lib -fuse-ld=mold -Wl,--gc-sections -flto=auto -fuse-linker-plugin -zrelro \
  -shared
  mold: error: undefined symbol: EVP_CIPHER_CTX_cipher
  >>> referenced by <artificial>
  >>>               /data/code/openwrt/ipq/tmp/ccBL6cZK.ltrans24.ltrans.o:(ngx_quic_crypto_common.isra.0)>>> referenced by <artificial>
  >>>               /data/code/openwrt/ipq/tmp/ccBL6cZK.ltrans24.ltrans.o:(ngx_quic_crypto_common.isra.0)
  collect2: error: ld returned 1 exit status
  make[4]: *** [objs/Makefile:325: objs/nginx] Error 1

With this change and recent commit to nginx-util #23935. We should now be able to build nginx + modules with fully compliant calls to OpenSSL 3.0+, with legacy features disabled.

Run tested: aarch64, Dynalink DL-WRX36, Master Branch
Maintainer: Thomas Heil heil@terminal-consulting.de, Christian Marangi ansuelsmth@gmail.com

@Ansuel
Copy link
Member

Ansuel commented Apr 26, 2024

@qosmio did we check if nginx already doesn't have this fix in some dev branch? Also can we think of proposing this fix to nginx mailing list?

@Ansuel Ansuel self-assigned this Apr 26, 2024
@qosmio
Copy link
Contributor Author

qosmio commented Apr 26, 2024

That's actually a good idea. I haven't submitted patches upstream, mostly due to NGINX team using Mercurial and patchbomb, neither of which I'm too familiar.

I'll take a stab at it though.

@Ansuel
Copy link
Member

Ansuel commented Apr 26, 2024

@qosmio keep me informed... i also remember sending a patch but i lost track of it.

@Ansuel
Copy link
Member

Ansuel commented Apr 27, 2024

@qosmio I checked how to send patch and it's not that hard...

the command i had to follow
sudo apt install mercurial
Follow https://wiki.mercurial-scm.org/QuickStart to fill the .hgrc

hg clone http://hg.nginx.org/nginx
cd nginx

make changes

hg commit
(same format of git commit... first line title... white line and then description... no SoB)

Follow https://wiki.mercurial-scm.org/PatchbombExtension for patchbomb (yes it's correct adding the
empty entry for patchbomb)

hg email -o 

Send the mail to yourself first to make sure everything is OK.

@Ansuel Ansuel force-pushed the nginx-quic-ssl-3.0-deprecation branch from 9ec1a42 to 2908532 Compare May 6, 2024 11:17
Ansuel pushed a commit to qosmio/packages that referenced this pull request May 6, 2024
`EVP_CIPHER_CTX_cipher()` function was deprecated in OpenSSL 3.0.
As per OpenSSL's recommendation (https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_get0_cipher.html)
switch to using `EVP_CIPHER_CTX_get0_cipher()` instead.

With this change and recent commit to nginx-util openwrt#23935. We should now
be able to build nginx + modules with fully compliant calls to OpenSSL
3.0+ with legacy features disabled.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: openwrt#24005
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
@Ansuel
Copy link
Member

Ansuel commented May 6, 2024

@qosmio can you refresh patch and also bump the nginx package?

@qosmio
Copy link
Contributor Author

qosmio commented May 6, 2024 via email

@qosmio qosmio force-pushed the nginx-quic-ssl-3.0-deprecation branch from 2908532 to 3008de1 Compare May 6, 2024 20:53
`EVP_CIPHER_CTX_cipher()` function was deprecated in OpenSSL 3.0.
As per OpenSSL's recommendation (https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_get0_cipher.html)
switch to using `EVP_CIPHER_CTX_get0_cipher()` instead.

With this change and recent commit to nginx-util openwrt#23935. We should now
be able to build nginx + modules with fully compliant calls to OpenSSL
3.0+ with legacy features disabled.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: openwrt#24005
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
@Ansuel Ansuel force-pushed the nginx-quic-ssl-3.0-deprecation branch from 3008de1 to 97082f1 Compare May 6, 2024 21:52
@Ansuel Ansuel merged commit 97082f1 into openwrt:master May 6, 2024
2 of 12 checks passed
hnyyghk pushed a commit to hnyyghk/OpenWrt_Nginx-QUIC that referenced this pull request Oct 22, 2024
`EVP_CIPHER_CTX_cipher()` function was deprecated in OpenSSL 3.0.
As per OpenSSL's recommendation (https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_get0_cipher.html)
switch to using `EVP_CIPHER_CTX_get0_cipher()` instead.

With this change and recent commit to nginx-util #23935. We should now
be able to build nginx + modules with fully compliant calls to OpenSSL
3.0+ with legacy features disabled.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: openwrt/packages#24005
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 97082f12a6de70625e21bc22fe2d0c1f65797f52)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants