Repository navigation
Fix compatibility for OpenSSL < 3.0 and Almalinux version mismatch for daily tests - #3303
Conversation
SSL_get0_peer_certificate() was introduced in OpenSSL 3.0. The recent commit 7e110ae (Support TLS authentication using SAN URI) used it in tlsGetPeerUser() without a version guard, breaking builds against OpenSSL 1.1.x. Use SSL_get_peer_certificate() on OpenSSL < 3.0 with the corresponding X509_free() since the older API increments the reference count. Fixes build failure: implicit declaration of function 'SSL_get0_peer_certificate' [-Werror=implicit-function-declaration] Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
d8bc778 to
4996dc9
Compare
|
@valkey-io/core-team PTAL |
|
I originally used |
Yes I realized that I was the one who suggested it, but I didn't realize that is would fail in this case I don't think we should remove So I think in fact we should change all the occurrences of |
SSL_get0_peer_certificate compatibility for OpenSSL < 3.0All test-almalinux9-* jobs were using container: almalinux:8 instead of almalinux:9 since they were introduced in PR valkey-io#543 (May 2024). This meant the AlmaLinux 9 jobs were actually testing AlmaLinux 8. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
Also fixes a pre-existing memory leak: SSL_get_peer_certificate() increments the refcount but X509_free() was never called. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
48b62a1 to
e7e6a7e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3303 +/- ##
================================
================================
🚀 New features to boost your workflow:
|
…r daily tests (valkey-io#3303) `SSL_get0_peer_certificate()` was introduced in OpenSSL 3.0. The recent commit 7e110ae (Support TLS authentication using SAN URI) used it in `tlsGetPeerUser()` without a version guard, breaking builds against `OpenSSL 1.1.x.` Use `SSL_get_peer_certificate()` on OpenSSL < 3.0 with the corresponding `X509_free()` since the older API increments the reference count. Fixes build failure: implicit declaration of function `SSL_get0_peer_certificate [-Werror=implicit-function-declaration]` Also fixes the version mismatch for almalinux 9 daily tests. Closes valkey-io#3304. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
…r daily tests (valkey-io#3303) `SSL_get0_peer_certificate()` was introduced in OpenSSL 3.0. The recent commit 7e110ae (Support TLS authentication using SAN URI) used it in `tlsGetPeerUser()` without a version guard, breaking builds against `OpenSSL 1.1.x.` Use `SSL_get_peer_certificate()` on OpenSSL < 3.0 with the corresponding `X509_free()` since the older API increments the reference count. Fixes build failure: implicit declaration of function `SSL_get0_peer_certificate [-Werror=implicit-function-declaration]` Also fixes the version mismatch for almalinux 9 daily tests. Closes valkey-io#3304. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com> Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
SSL_get0_peer_certificate()was introduced in OpenSSL 3.0. The recent commit 7e110ae (Support TLS authentication using SAN URI) used it intlsGetPeerUser()without a version guard, breaking builds againstOpenSSL 1.1.x.Use
SSL_get_peer_certificate()on OpenSSL < 3.0 with the correspondingX509_free()since the older API increments the reference count.Fixes build failure: implicit declaration of function
SSL_get0_peer_certificate [-Werror=implicit-function-declaration]https://github.com/valkey-io/valkey/actions/runs/22648954538/job/65643630947
Test run for this change: https://github.com/roshkhatri/valkey/actions/runs/22655187385


Also fixes the version mismatch for almalinux 9 daily tests: #3304