clients: add a helper function to get required openconnect VPN secrets
authorJiří Klimeš <jklimes@redhat.com>
Fri, 11 Dec 2015 20:47:27 +0000 (21:47 +0100)
committerJiří Klimeš <jklimes@redhat.com>
Sat, 12 Dec 2015 16:37:30 +0000 (17:37 +0100)
commitea54b7f2c0228dff422ce05200a46fcf77f67810
tree710bf1d8ca2d65bce09f8ea08951353462d6edd3
parent8dfafac17c1870119330d5e42a4df3a6e8ac3bc8
clients: add a helper function to get required openconnect VPN secrets

OpenConnect needs three secrets - COOKIE, HOST and FINGERPRINT. They can be
obtained by authenticating to the server. This can be performed by running
"openconnect --authenticate <host>" and the three values are printed to stdout.

Note that the function may (probably will) interactively ask user for
his credentials.

Alternatively, it would be possible to dlopen() libopenconnect and call its
functions. However, as that would be more complicated and would also require
implementing functionality that openconnect simply does for free for us, it is
not worth it, I think.
clients/common/nm-vpn-helpers.c
clients/common/nm-vpn-helpers.h