Skip to content

Commit

Permalink
Add openconnect_has_system_key_support()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Nov 27, 2014
1 parent 1c27a1e commit e7a4cd7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions libopenconnect.map.in
Expand Up @@ -18,6 +18,7 @@ OPENCONNECT_5.0 {
openconnect_has_oath_support;
openconnect_has_pkcs11_support;
openconnect_has_stoken_support;
openconnect_has_system_key_support;
openconnect_has_tss_blob_support;
openconnect_has_yubioath_support;
openconnect_init_ssl;
Expand Down
9 changes: 9 additions & 0 deletions library.c
Expand Up @@ -562,6 +562,15 @@ int openconnect_has_yubioath_support(void)
#endif
}

int openconnect_has_system_key_support(void)
{
#ifdef HAVE_GNUTLS_SYSTEM_KEYS
return 1;
#else
return 0;
#endif
}

int openconnect_set_token_callbacks(struct openconnect_info *vpninfo,
void *tokdata,
openconnect_lock_token_vfn lock,
Expand Down
4 changes: 4 additions & 0 deletions main.c
Expand Up @@ -581,6 +581,10 @@ static void print_build_opts(void)
printf("%sYubikey OATH", sep);
sep = comma;
}
if (openconnect_has_system_key_support()) {
printf("%sSystem keys", sep);
sep = comma;
}

#ifdef HAVE_DTLS
printf("%sDTLS", sep);
Expand Down
2 changes: 2 additions & 0 deletions openconnect.h
Expand Up @@ -38,6 +38,7 @@
* - Add openconnect_check_peer_cert_hash().
* - Remove openconnect_set_server_cert_sha1().
* - Add openconnect_has_yubioath_support() and OC_TOKEN_MODE_YUBIOATH.
* - Add openconnect_has_system_key_support().
*
* API version 4.1:
* - Add openconnect_get_cstp_cipher(), openconnect_get_dtls_cipher(),
Expand Down Expand Up @@ -550,5 +551,6 @@ int openconnect_has_tss_blob_support(void);
int openconnect_has_stoken_support(void);
int openconnect_has_oath_support(void);
int openconnect_has_yubioath_support(void);
int openconnect_has_system_key_support(void);

#endif /* __OPENCONNECT_H__ */

0 comments on commit e7a4cd7

Please sign in to comment.