Skip to content

Commit a2c7dc3

Browse files
committed
shim: guard SSL_trace usage with OPENSSL_NO_SSL_TRACE check
Fixes build with OpenSSL v1 where SSL_trace is not available. Closes #18
1 parent b540cbf commit a2c7dc3

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1414

1515
### Fixed
1616

17+
- Guard `SSL_trace` usage with `OPENSSL_NO_SSL_TRACE` check to fix build on
18+
OpenSSL configurations without SSL trace support.
19+
1720
## [v1.2.1] - 2025-01-27
1821

1922
The release fixes tests on Tarantool Cluster Manager.

shim.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,15 @@ int X_SSL_verify_cb(int ok, X509_STORE_CTX* store) {
444444
}
445445

446446
void X_SSL_toggle_tracing(SSL* ssl, FILE* output, short enable) {
447+
#ifndef OPENSSL_NO_SSL_TRACE
447448
if (enable) {
448449
SSL_set_msg_callback(ssl, SSL_trace);
449450
SSL_set_msg_callback_arg(ssl, BIO_new_fp(output, BIO_NOCLOSE));
450451
} else {
451452
SSL_set_msg_callback(ssl, NULL);
452453
SSL_set_msg_callback_arg(ssl, NULL);
453454
}
455+
#endif
454456
}
455457

456458
const SSL_METHOD *X_SSLv23_method() {

0 commit comments

Comments
 (0)