Skip to content
Permalink
Browse files
Print SSL build options on --version or usage()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 11, 2012
1 parent f89a643 commit f92cf193bf7ef63cda435cf6901b0aa614d4023a
Showing with 26 additions and 0 deletions.
  1. +26 −0 main.c
26 main.c
@@ -176,10 +176,35 @@ static void helpmessage(void)
" http://www.infradead.org/openconnect/mail.html\n"));
}

static void print_build_opts(void)
{
#if defined (OPENCONNECT_OPENSSL) && defined (HAVE_ENGINE)
printf("Using OpenSSL with TPM ENGINE support\n");
#elif defined (OPENCONNECT_OPENSSL)
printf("Using OpenSSL without TPM ENGINE support\n");
#elif defined (OPENCONNECT_GNUTLS) && defined (HAVE_P11KIT)
printf("Using GnuTLS with PKCS#11 token support\n");
#elif defined (OPENCONNECT_GNUTLS)
printf("Using GnuTLS without PKCS#11 token support\n");
#else
#error wtf
#endif
#ifndef HAVE_DTLS
printf("No DTLS support in this binary\n");
#elif defined (DTLS_OPENSSL)
printf("Using OpenSSL for DTLS support\n");
#elif defined (DTLS_GNUTLS)
printf("Using GnuTLS for DTLS support\n");
#else
#error wtf
#endif
}

static void usage(void)
{
printf(_("Usage: openconnect [options] <server>\n"));
printf(_("Open client for Cisco AnyConnect VPN, version %s\n\n"), openconnect_version_str);
print_build_opts();
printf(" --config=CONFIGFILE %s\n", _("Read options from config file"));
printf(" -b, --background %s\n", _("Continue in background after startup"));
printf(" --pid-file=PIDFILE %s\n", _("Write the daemons pid to this file"));
@@ -639,6 +664,7 @@ int main(int argc, char **argv)
break;
case 'V':
printf(_("OpenConnect version %s\n"), openconnect_version_str);
print_build_opts();
exit(0);
case 'x':
vpninfo->xmlconfig = keep_config_arg();

0 comments on commit f92cf19

Please sign in to comment.