aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 3549a1d608..a73f397073 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -70,9 +70,6 @@
#include "circuitmux_ewma.h"
#include "circuitstats.h"
#include "compress.h"
-#include "compress_lzma.h"
-#include "compress_zlib.h"
-#include "compress_zstd.h"
#include "config.h"
#include "connection.h"
#include "connection_edge.h"
@@ -4952,15 +4949,21 @@ options_init_from_torrc(int argc, char **argv)
printf("OpenSSL \t\t%-15s\t\t%s\n",
crypto_openssl_get_header_version_str(),
crypto_openssl_get_version_str());
- printf("Zlib \t\t%-15s\t\t%s\n",
- tor_zlib_get_header_version_str(),
- tor_zlib_get_version_str());
- printf("Liblzma \t\t%-15s\t\t%s\n",
- tor_lzma_get_header_version_str(),
- tor_lzma_get_version_str());
- printf("Libzstd \t\t%-15s\t\t%s\n",
- tor_zstd_get_header_version_str(),
- tor_zstd_get_version_str());
+ if (tor_compress_supports_method(ZLIB_METHOD)) {
+ printf("Zlib \t\t%-15s\t\t%s\n",
+ tor_compress_version_str(ZLIB_METHOD),
+ tor_compress_header_version_str(ZLIB_METHOD));
+ }
+ if (tor_compress_supports_method(LZMA_METHOD)) {
+ printf("Liblzma \t\t%-15s\t\t%s\n",
+ tor_compress_version_str(LZMA_METHOD),
+ tor_compress_header_version_str(LZMA_METHOD));
+ }
+ if (tor_compress_supports_method(ZSTD_METHOD)) {
+ printf("Libzstd \t\t%-15s\t\t%s\n",
+ tor_compress_version_str(ZSTD_METHOD),
+ tor_compress_header_version_str(ZSTD_METHOD));
+ }
//TODO: Hex versions?
exit(0);
}