/pidgin/main: a8b55b63ecbb: Print TLS versions as hex, because t...

Mark Doliner mark at kingant.net
Fri Sep 12 14:09:46 EDT 2014


Changeset: a8b55b63ecbbd550d73302ed209d066b30de3545
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2014-09-12 11:09 -0700
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/a8b55b63ecbb

Description:

Print TLS versions as hex, because that's how they're defined and
they're more human-readable this way.

diffstat:

 libpurple/plugins/ssl/ssl-nss.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (28 lines):

diff --git a/libpurple/plugins/ssl/ssl-nss.c b/libpurple/plugins/ssl/ssl-nss.c
--- a/libpurple/plugins/ssl/ssl-nss.c
+++ b/libpurple/plugins/ssl/ssl-nss.c
@@ -156,9 +156,9 @@ ssl_nss_init_nss(void)
 	if ((SSL_VersionRangeGetSupported(ssl_variant_stream, &supported) == SECSuccess) &&
 			(SSL_VersionRangeGetDefault(ssl_variant_stream, &enabled) == SECSuccess)) {
 		purple_debug_info("nss", "TLS supported versions: "
-				"%d through %d\n", supported.min, supported.max);
+				"0x%04hx through 0x%04hx\n", supported.min, supported.max);
 		purple_debug_info("nss", "TLS versions allowed by default: "
-				"%d through %d\n", enabled.min, enabled.max);
+				"0x%04hx through 0x%04hx\n", enabled.min, enabled.max);
 
 		/* Make sure all versions of TLS supported by the local library are
 		   enabled. (For some reason NSS doesn't enable newer versions of TLS
@@ -167,10 +167,10 @@ ssl_nss_init_nss(void)
 			enabled.max = supported.max;
 			if (SSL_VersionRangeSetDefault(ssl_variant_stream, &enabled) == SECSuccess) {
 				purple_debug_info("nss", "Changed allowed TLS versions to "
-						"%d through %d\n", enabled.min, enabled.max);
+						"0x%04hx through 0x%04hx\n", enabled.min, enabled.max);
 			} else {
 				purple_debug_error("nss", "Error setting allowed TLS versions to "
-						"%d through %d\n", enabled.min, enabled.max);
+						"0x%04hx through 0x%04hx\n", enabled.min, enabled.max);
 			}
 		}
 	}



More information about the Commits mailing list