Don't attempt to parse empty response from server

I couldn't trigger this until I hacked up stuff elsewhere to return
artificial failures, but still...

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Handle redirects in attempting simple auth GET too

If the XML POST fails and we try a GET, we need to handle redirects for
that too. So re-use the same loop. Except the bit about not allowing local
redirects. Why do we do that for the XML POST case anyway?

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Destroy vpninfo->https_cred on failing to create it

If something like certificate setup went wrong, we'd return failure but
*not* destroy the gnutls_certificate_credentials_t that we were
attempting to set up. So a subsequent retry would see that it already
exists, assume it's *fine* and just go ahead and use it. Don't do that.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http: Don't leak the webvpn cookie in XML POST mode

XML POST mode introduces a new header in the <auth> response.  Squash it
so that people don't inadvertently post logs containing webvpn cookies.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Update translations from GNOME

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Use OPENSSL_CFLAGS when testing OpenSSL features too

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Make it easier to avoid the broken OpenSSL DTLS check

Now you just have to define NO_BROKEN_DTLS_CHECK instead of editing the
source code to remove the check.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Remove unused variable 'ofs' in Android keystore_fetch()

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Revamp Android build infrastructure

The existing setup would only build as part of a full AOSP build, not as
a standalone application with the NDK. Fix that...

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Attempt to build GnuTLS for Android

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Use GNUTLS_CFLAGS when testing GnuTLS features too

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Avoid warning about verify_signed_data being unused

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Stop using deprecated gnutls_x509_crt type

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Android: Build GnuTLS from git

This is fairly icky; I don't know how we're supposed to get the pkgconfig
Libs.private in our build, so I'm overriding $(GNUTLS_LIBS) manually.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Fix CSD trojan download

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Add missing newlines

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
add oath totp support