Use `tor_compress_supports_method()` before printing library versions.
commitc2d1d949dec1db9fb413a02be422dfede3bb53aa
authorAlexander Færøy <ahf@torproject.org>
Thu, 20 Apr 2017 14:23:06 +0000 (20 16:23 +0200)
committerNick Mathewson <nickm@torproject.org>
Tue, 25 Apr 2017 12:10:10 +0000 (25 08:10 -0400)
tree4ad2a4926952afe396fa8aaef516e4d3c29de7dc
parent6b905b38bb850d0530ba6f6d02c10b1fb19aef9a
Use `tor_compress_supports_method()` before printing library versions.

This patch ensures that Tor checks if a given compression method is
supported before printing the version string when calling `tor
--library-versions`.

Additionally, we use the `tor_compress_supports_method()` to check if a
given version is supported for Tor's start-up version string, but here
we print "N/A" if a given compression method is unavailable.

See: https://bugs.torproject.org/21662
src/or/config.c
src/or/main.c