]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Support --version.
authorSimon Josefsson <simon@josefsson.org>
Sun, 6 Aug 2006 15:20:08 +0000 (15:20 +0000)
committerSimon Josefsson <simon@josefsson.org>
Sun, 6 Aug 2006 15:20:08 +0000 (15:20 +0000)
src/tls_test.c
src/tls_test.gaa

index 29fb1ba6ec9ad57736dc1a429cd44c31138cb99c..7c2d53d73a86c1ea8e0c81cfe32b85b5f8249385 100644 (file)
@@ -334,3 +334,13 @@ gaa_parser (int argc, char **argv)
   verbose = info.more_info;
 
 }
+
+void
+tls_test_version (void)
+{
+  const char *v = gnutls_check_version (NULL);
+
+  printf ("gnutls-cli-debug (GnuTLS) %s\n", LIBGNUTLS_VERSION);
+  if (strcmp (v, LIBGNUTLS_VERSION) != 0)
+    printf ("libgnutls %s\n", v);
+}
index b72febd900c6ea2d6399ced10df86182e78ca898..1d26464f8f202ddd3f0c0d6fbd243c2f42c5ccf9 100644 (file)
@@ -7,6 +7,8 @@
 # include <io.h>
 #endif
 
+void tls_test_version(void);
+
 #}
 
 helpnode "GNU TLS debug client\nUsage: gnutls-cli-debug [options] hostname\n\n"
@@ -20,6 +22,7 @@ option (d, debug) INT "integer" { $debug = $1 } "Enable debugging"
 #int more_info;
 option (v, verbose) { $more_info += 1 } "More verbose output"
 
+option (v, version) { tls_test_version(); exit(0); } "prints the program's version number"
 option (h, help) { gaa_help(); exit(0); } "prints this help"