Skip to content

PS-10970 fix oracle8 compilation#30

Open
lukin-oleksiy wants to merge 1 commit into
Percona-Lab:masterfrom
lukin-oleksiy:PS-10970-fix-oracle8-compilation
Open

PS-10970 fix oracle8 compilation#30
lukin-oleksiy wants to merge 1 commit into
Percona-Lab:masterfrom
lukin-oleksiy:PS-10970-fix-oracle8-compilation

Conversation

@lukin-oleksiy
Copy link
Copy Markdown
Contributor

https://perconadev.atlassian.net/browse/PS-10970
kmipclient: fix OpenSSL version compatibility for Oracle Linux 8

Oracle Linux 8 ships OpenSSL 1.1.1 which lacks two APIs added in later versions:

  • TLS_method() was introduced in OpenSSL 1.1.0 (ssLv23_method() is the compatible alias for older builds, but also works on 1.1.x)
  • SSL_get0_peer_certificate() was introduced in OpenSSL 3.0 only; OpenSSL 1.1.x still uses SSL_get_peer_certificate() which bumps the X509 reference count and requires a matching X509_free()

Add version-guarded helper functions get_tls_client_method() and get_peer_certificate() that select the correct API at compile time based on OPENSSL_VERSION_NUMBER, and update ensure_tls_peer_verified() and connect() to use them.

https://perconadev.atlassian.net/browse/PS-10970
kmipclient: fix OpenSSL version compatibility for Oracle Linux 8

Oracle Linux 8 ships OpenSSL 1.1.1 which lacks two APIs added in later
versions:

- TLS_method() was introduced in OpenSSL 1.1.0 (ssLv23_method() is the
  compatible alias for older builds, but also works on 1.1.x)
- SSL_get0_peer_certificate() was introduced in OpenSSL 3.0 only;
  OpenSSL 1.1.x still uses SSL_get_peer_certificate() which bumps the
  X509 reference count and requires a matching X509_free()

Add version-guarded helper functions get_tls_client_method() and
get_peer_certificate() that select the correct API at compile time based
on OPENSSL_VERSION_NUMBER, and update ensure_tls_peer_verified() and
connect() to use them.
@lukin-oleksiy lukin-oleksiy force-pushed the PS-10970-fix-oracle8-compilation branch from 74f71ab to 27c5898 Compare May 18, 2026 13:26
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.

1 participant