]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
6 years agoFurther optimise aesni_encrypt_esp_packet() hacks2
David Woodhouse [Mon, 15 Apr 2019 19:51:57 +0000 (20:51 +0100)]
Further optimise aesni_encrypt_esp_packet()

Do the HMAC and SHA1 stuff inline using the tail of the packet,
to avoid copying data around.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agotest: reuse packets instead of free/malloc
David Woodhouse [Tue, 9 Apr 2019 15:44:22 +0000 (18:44 +0300)]
test: reuse packets instead of free/malloc

Some MTU-related issues to work out here... this gives me about 1%
additional performance.

6 years agoAdd AES-NI ESP implementation
David Woodhouse [Mon, 15 Apr 2019 15:53:59 +0000 (16:53 +0100)]
Add AES-NI ESP implementation

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoImport CRYPTOGAMS ASM code (from OpenSSL master for now)
David Woodhouse [Thu, 11 Apr 2019 21:44:48 +0000 (00:44 +0300)]
Import CRYPTOGAMS ASM code (from OpenSSL master for now)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd esptest microbenchmark for ESP encryption
David Woodhouse [Thu, 11 Apr 2019 20:01:51 +0000 (23:01 +0300)]
Add esptest microbenchmark for ESP encryption

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAllow ESP functions to be overridden
David Woodhouse [Mon, 15 Apr 2019 13:19:38 +0000 (14:19 +0100)]
Allow ESP functions to be overridden

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoConsolidate common parts of setup_esp_keys()
David Woodhouse [Mon, 15 Apr 2019 12:43:06 +0000 (13:43 +0100)]
Consolidate common parts of setup_esp_keys()

There was a fair amount of redundancy between the OpenSSL and GnuTLS
variants. Create a new common function for that instead.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'more_careful_gpst_esp_catch_probe' of gitlab.com:dlenski/openconnect
David Woodhouse [Mon, 15 Apr 2019 17:11:55 +0000 (18:11 +0100)]
Merge branch 'more_careful_gpst_esp_catch_probe' of gitlab.com:dlenski/openconnect

6 years agoGenerate ESP IV from previous packet for GnuTLS too.
David Woodhouse [Thu, 11 Apr 2019 20:33:45 +0000 (23:33 +0300)]
Generate ESP IV from previous packet for GnuTLS too.

Less dramatic speedup here (only 4%) as we were already using
GNUTLS_RND_NONCE but still worth having.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoGenerate ESP IV from previous packet instead of using RAND_bytes()
David Woodhouse [Thu, 11 Apr 2019 20:18:39 +0000 (23:18 +0300)]
Generate ESP IV from previous packet instead of using RAND_bytes()

This takes the esptest benchmark from ~1445Mb/s to ~1983Mb/s, which is
about a 37% speedup.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoReuse OpenSSL HMAC_CTX for ESP packets
David Woodhouse [Thu, 11 Apr 2019 19:54:57 +0000 (22:54 +0300)]
Reuse OpenSSL HMAC_CTX for ESP packets

We gain about 3% by reusing the HMAC_CTX instead of copying it each time.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoDon't read from non-readable fds
David Woodhouse [Tue, 9 Apr 2019 15:45:33 +0000 (18:45 +0300)]
Don't read from non-readable fds

By removing the unneeded reads from file descriptors that we know aren't
readable, ESP TX performance goes from 1700Mb/s to 1760Mb/s on my current
test setup.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'tmp-remove-fedora-bug' of gitlab.com:nmav/openconnect
David Woodhouse [Mon, 15 Apr 2019 11:03:22 +0000 (12:03 +0100)]
Merge branch 'tmp-remove-fedora-bug' of gitlab.com:nmav/openconnect

6 years agomore careful gpst_esp_catch_probe()
Daniel Lenski [Wed, 10 Apr 2019 14:42:43 +0000 (17:42 +0300)]
more careful gpst_esp_catch_probe()

Previous version of gpst_esp_catch_probe would catch/filter *any* ping reply sent over the tunnel
from the "magical" ESP "gateway" address. (Heavy-handed scare quotes intentional.)

This may result in confusing behavior in some testing/debugging scenarios, as described in this thread:

    http://lists.infradead.org/pipermail/openconnect-devel/2019-April/005294.html

This patch modifies gpst_esp_catch_probe() to only catch ping replies if they also contain the
appropriate magic payload.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoMerge branch 'bugfix_OTP_challenge_form_handling' of gitlab.com:dlenski/openconnect
David Woodhouse [Wed, 3 Apr 2019 15:56:31 +0000 (16:56 +0100)]
Merge branch 'bugfix_OTP_challenge_form_handling' of gitlab.com:dlenski/openconnect

6 years agobugfix for OTP "challenge" form handling
Daniel Lenski [Wed, 3 Apr 2019 14:22:08 +0000 (17:22 +0300)]
bugfix for OTP "challenge" form handling

In the patch entitled 'Recognise auth forms named "challenge" as token
requests' (commit 51f8feb6, released in v8.00) the condition for using an
OTP token in an AnyConnect login form was changed from:

  (field is named `secondary_password`)

… to:

  (field is named `secondary_password`) AND (form is named `challenge`)

This was almost certainly a mistake, and should have been as follows:

  (field is named `secondary_password`) OR (form is named `challenge`)

This patch rewrites the condition to do just that, in a clearer form, and
should fix GitLab issue #24 (https://gitlab.com/openconnect/openconnect/issues/24#note_157035052).

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoFix retry when ESP socket send() fails EAGAIN
David Woodhouse [Tue, 26 Mar 2019 10:31:00 +0000 (10:31 +0000)]
Fix retry when ESP socket send() fails EAGAIN

Don't drop packets; requeue them until the socket becomes writeable again.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agodownload.xml: remove reference about fedora bug
Nikos Mavrogiannopoulos [Wed, 13 Mar 2019 13:11:10 +0000 (14:11 +0100)]
download.xml: remove reference about fedora bug

This issue should have been resolved already.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoUpdate translatons from GNOME
David Woodhouse [Thu, 28 Feb 2019 14:01:46 +0000 (14:01 +0000)]
Update translatons from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix typo in help
Patrick Lühne [Tue, 19 Feb 2019 22:36:49 +0000 (23:36 +0100)]
Fix typo in help

This help string missed a closing parenthesis. This commits corrects
the typo across all localizations.

Signed-off-by: Patrick Lühne <patrick@luehne.de>
6 years agoAdd +SHA256 to re-enable AES-CBC-HMAC-SHA256
David Woodhouse [Fri, 1 Feb 2019 16:14:53 +0000 (16:14 +0000)]
Add +SHA256 to re-enable AES-CBC-HMAC-SHA256

Fixes: #21
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoauth-juniper.c: ignore non-empty lines from TNCC after DSPREAUTH cookie
Marc St-Amand [Tue, 5 Feb 2019 13:35:22 +0000 (08:35 -0500)]
auth-juniper.c: ignore non-empty lines from TNCC after DSPREAUTH cookie

This skips over a seemingly harmless DSPREAUTH failure:

   Unexpected non-empty line from TNCC after DSPREAUTH cookie: '0'
   Failed to read response from TNCC
   Failed to obtain WebVPN cookie

After the unexpected '0', TNCC sends an empty line response and the
authentication sequence can proceed normally. In case other TNCC
variants send more chatter, the function ignores and logs up to 10
non-empty lines before giving up.

Signed-off-by: Marc St-Amand <pedalling.philosopher@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoRemove some redundant gtls_ver() checks
David Woodhouse [Fri, 1 Feb 2019 12:33:39 +0000 (12:33 +0000)]
Remove some redundant gtls_ver() checks

We don't build with GnuTLS older then 3.2.10 now anyway.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix html.py to work with Python 3.x
David Woodhouse [Fri, 1 Feb 2019 11:09:21 +0000 (11:09 +0000)]
Fix html.py to work with Python 3.x

Fix up running in non-UTF-8 environments too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate translations from GNOME
David Woodhouse [Wed, 30 Jan 2019 14:43:20 +0000 (14:43 +0000)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate changelog
David Woodhouse [Wed, 30 Jan 2019 14:42:08 +0000 (14:42 +0000)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix test for if_utun.h to include <sys/types.h> first
David Woodhouse [Tue, 29 Jan 2019 08:23:18 +0000 (08:23 +0000)]
Fix test for if_utun.h to include <sys/types.h> first

In some versions it doesn't build without that.

Fixes: #18
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agos/GitHub/GitLab/
David Woodhouse [Mon, 28 Jan 2019 18:14:06 +0000 (18:14 +0000)]
s/GitHub/GitLab/

Doh.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agognutls-dtls: fixed initialization of AES256-GCM-SHA384
Nikos Mavrogiannopoulos [Sat, 19 Jan 2019 17:19:42 +0000 (18:19 +0100)]
gnutls-dtls: fixed initialization of AES256-GCM-SHA384

Without this fix when AES256-GCM-SHA384 the openconnect client
will fail to initialize the DTLS connection.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoTag version 8.02 v8.02
David Woodhouse [Wed, 16 Jan 2019 09:26:58 +0000 (11:26 +0200)]
Tag version 8.02

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoResync translations with sources
David Woodhouse [Wed, 16 Jan 2019 09:25:03 +0000 (11:25 +0200)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate translations from GNOME
David Woodhouse [Wed, 16 Jan 2019 09:24:00 +0000 (11:24 +0200)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'hurd' of gitlab.com:mtmiller/openconnect
David Woodhouse [Wed, 16 Jan 2019 08:40:02 +0000 (10:40 +0200)]
Merge branch 'hurd' of gitlab.com:mtmiller/openconnect

6 years agoAdd 'attempt-reconnect' vpnc-script reason
David Woodhouse [Tue, 15 Jan 2019 15:16:08 +0000 (17:16 +0200)]
Add 'attempt-reconnect' vpnc-script reason

In https://gitlab.com/openconnect/openconnect/issues/17 we think we need
to give the vpnc-script a chance to reinstate the host route to the VPN
server before we can reconnect.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAlso define IPV6_TCLASS for older versions of OS X
Mike Miller [Mon, 14 Jan 2019 20:15:07 +0000 (12:15 -0800)]
Also define IPV6_TCLASS for older versions of OS X

Signed-off-by: Mike Miller <mtmiller@debian.org>
6 years agoDefine IPV6_TCLASS when it isn't defined on Hurd
Mike Miller [Sat, 12 Jan 2019 01:04:09 +0000 (17:04 -0800)]
Define IPV6_TCLASS when it isn't defined on Hurd

Per https://bugs.debian.org/738646, Hurd uses the *BSD definition for
the socket option IPV6_TCLASS, but it is not yet provided in any system
header files.

Signed-off-by: Mike Miller <mtmiller@debian.org>
6 years agoUpdate changelog
David Woodhouse [Fri, 11 Jan 2019 00:02:16 +0000 (00:02 +0000)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd vpnc-script locations for FreeBSD and OpenBSD packages
David Woodhouse [Thu, 10 Jan 2019 23:41:03 +0000 (23:41 +0000)]
Add vpnc-script locations for FreeBSD and OpenBSD packages

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix build failure on systems missing IPV6_TCLASS
Mike Miller [Thu, 10 Jan 2019 20:14:58 +0000 (12:14 -0800)]
Fix build failure on systems missing IPV6_TCLASS

Some operating systems such as GNU/Hurd support IPv6 but do not define
the IPV6_TCLASS socket option.

Signed-off-by: Mike Miller <mtmiller@debian.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'test-installed-openconnect' of gitlab.com:mtmiller/openconnect
David Woodhouse [Thu, 10 Jan 2019 22:58:32 +0000 (22:58 +0000)]
Merge branch 'test-installed-openconnect' of gitlab.com:mtmiller/openconnect

6 years agoMerge branch 'GP_split_excludes' of gitlab.com:dlenski/openconnect
David Woodhouse [Thu, 10 Jan 2019 22:54:48 +0000 (22:54 +0000)]
Merge branch 'GP_split_excludes' of gitlab.com:dlenski/openconnect

6 years agoAutogenerate AUTHORS file
David Woodhouse [Thu, 10 Jan 2019 22:47:27 +0000 (22:47 +0000)]
Autogenerate AUTHORS file

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoprocess split-excludes for GlobalProtect
Daniel Lenski [Fri, 12 Jan 2018 09:44:17 +0000 (01:44 -0800)]
process split-excludes for GlobalProtect

Server-side split-excludes were added in PanOS 8.0:
https://www.paloaltonetworks.com/documentation/80/pan-os/newfeaturesguide/globalprotect-features

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoAllow running test suite on installed openconnect
Mike Miller [Thu, 10 Jan 2019 20:09:36 +0000 (12:09 -0800)]
Allow running test suite on installed openconnect

Support 'make check OPENCONNECT=/usr/sbin/openconnect' to run the test
suite as a CI test against the already-installed copy of openconnect.

Signed-off-by: Mike Miller <mtmiller@debian.org>
6 years agoMake tmp-distdir and build there, as part of CI
David Woodhouse [Thu, 10 Jan 2019 16:12:17 +0000 (16:12 +0000)]
Make tmp-distdir and build there, as part of CI

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoRemove stray pass-CP852 file from EXTRA_DIST
David Woodhouse [Thu, 10 Jan 2019 16:11:11 +0000 (16:11 +0000)]
Remove stray pass-CP852 file from EXTRA_DIST

This never existed in the git repo and was never part of a working test.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd tmp-distdir make target for CI
David Woodhouse [Thu, 10 Jan 2019 14:07:09 +0000 (14:07 +0000)]
Add tmp-distdir make target for CI

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd --dtls12-ciphers option
David Woodhouse [Thu, 10 Jan 2019 14:01:49 +0000 (14:01 +0000)]
Add --dtls12-ciphers option

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate translations from GNOME
David Woodhouse [Thu, 10 Jan 2019 13:23:55 +0000 (13:23 +0000)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMake TODO file refer to contribute.html web page
David Woodhouse [Thu, 10 Jan 2019 13:21:23 +0000 (13:21 +0000)]
Make TODO file refer to contribute.html web page

We can't just remove it as autohate wants it, but we can at least stop
having horridly out-of-date content in it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoRemove obsolete README.DTLS file
David Woodhouse [Thu, 10 Jan 2019 13:19:58 +0000 (13:19 +0000)]
Remove obsolete README.DTLS file

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'single_probe_for_keepalive' of gitlab.com:dlenski/openconnect
David Woodhouse [Thu, 10 Jan 2019 12:47:18 +0000 (12:47 +0000)]
Merge branch 'single_probe_for_keepalive' of gitlab.com:dlenski/openconnect

6 years agoMerge branch 'remove_unneeded_headers' of gitlab.com:dlenski/openconnect
David Woodhouse [Thu, 10 Jan 2019 12:46:54 +0000 (12:46 +0000)]
Merge branch 'remove_unneeded_headers' of gitlab.com:dlenski/openconnect

6 years agoAdd GitLab reference to mail/help page
David Woodhouse [Thu, 10 Jan 2019 12:44:43 +0000 (12:44 +0000)]
Add GitLab reference to mail/help page

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate contribute page with project ideas
David Woodhouse [Thu, 10 Jan 2019 12:40:16 +0000 (12:40 +0000)]
Update contribute page with project ideas

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agono need to send multiple probe packets as an ESP keepalive
Daniel Lenski [Sun, 6 Jan 2019 10:07:51 +0000 (02:07 -0800)]
no need to send multiple probe packets as an ESP keepalive

Both Juniper and GlobalProtect ESP send special probe packets to initiate the ESP connection, and as keepalives.
Multiple packets are sent to initiate the connection, because a lack of response will cause a total fallback to TLS.

However, one probe packet (per keepalive interval) is enough for the keepalive packets. GlobalProtect ESP already
did this, but Juniper did not.

This patch is motivated by me having access to the highest-latency Juniper VPN server in the known universe.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agodecruft esp.c: these headers are only needed for GP's probe-sending/catching (which...
Daniel Lenski [Sun, 6 Jan 2019 10:06:18 +0000 (02:06 -0800)]
decruft esp.c: these headers are only needed for GP's probe-sending/catching (which are in gpst.c now)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoClean up DTLS cipher selection for OpenSSL >= 1.1.0
David Woodhouse [Wed, 9 Jan 2019 16:27:10 +0000 (16:27 +0000)]
Clean up DTLS cipher selection for OpenSSL >= 1.1.0

Where we have SSL_get1_supported_ciphers(), use it to generate the list we
advertise to the server in the first place. This stops us from advertising
DES support when we're not really going to do it, for example.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate changelog
David Woodhouse [Wed, 9 Jan 2019 13:04:58 +0000 (13:04 +0000)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd Cisco DTLSv1.2 support for GnuTLS build
David Woodhouse [Wed, 9 Jan 2019 12:50:31 +0000 (12:50 +0000)]
Add Cisco DTLSv1.2 support for GnuTLS build

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAdd Cisco DTLSv1.2 support for OpenSSL build
David Woodhouse [Wed, 9 Jan 2019 12:41:28 +0000 (12:41 +0000)]
Add Cisco DTLSv1.2 support for OpenSSL build

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoProcess X-DTLS12-CipherSuite: header from server
David Woodhouse [Wed, 9 Jan 2019 12:36:05 +0000 (12:36 +0000)]
Process X-DTLS12-CipherSuite: header from server

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoClean up X-DTLS-CipherSuite header generation to allow for DTLSv1.2
David Woodhouse [Mon, 7 Jan 2019 11:51:34 +0000 (11:51 +0000)]
Clean up X-DTLS-CipherSuite header generation to allow for DTLSv1.2

Allow crypto code to provide the values for both DTLS and DTLSv1.2
headers separately.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoOpenSSL: Loop over DTLS ciphersuites looking for the one we asked for.
David Woodhouse [Wed, 9 Jan 2019 12:02:57 +0000 (12:02 +0000)]
OpenSSL: Loop over DTLS ciphersuites looking for the one we asked for.

As of OpenSSL 1.1.1, the trick of using SSL_CTX_set_cipher_list() and then
expecting only the one ciphersuite to be present in what we get back from
SSL_get_ciphers(), is no longer working. It now always returns the TLSv1.3
ciphers, even though we don't have DTLSv1.3 yet.

Reported as https://github.com/openssl/openssl/issues/8004 but probably
not going to change; the most likely outcome there is that I'm told that
I'm Doing It Wrong™ and a different approach is suggested.

In the meantime, just loop over the results and pick the one that we
actually asked for.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix up building against local static OpenSSL
David Woodhouse [Wed, 9 Jan 2019 11:40:45 +0000 (11:40 +0000)]
Fix up building against local static OpenSSL

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'libtasn1_fix_for_Android' of gitlab.com:dlenski/openconnect
David Woodhouse [Mon, 7 Jan 2019 10:15:09 +0000 (10:15 +0000)]
Merge branch 'libtasn1_fix_for_Android' of gitlab.com:dlenski/openconnect

6 years agodon't double-include libtasn1.h (breaks Android cross-build)
Daniel Lenski [Sun, 6 Jan 2019 06:52:50 +0000 (22:52 -0800)]
don't double-include libtasn1.h (breaks Android cross-build)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoFix Mageia TSS2_ESYS build
David GEIGER [Sat, 5 Jan 2019 22:27:24 +0000 (22:27 +0000)]
Fix Mageia TSS2_ESYS build

On Mageia Cauldron latest openconnect 8.00 and 8.01 fais to build with
TSS2_ESYS support due to a missing header in gnutls_tpm2_esys.c file, so
adding #include <errno.h> in gnutls_tpm2_esys.c fixes build.

Signed-off-by: David Geiger (Mageia Linux Team Packager) <geiger.david68210@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoTag version 8.01 v8.01
David Woodhouse [Sat, 5 Jan 2019 10:44:38 +0000 (10:44 +0000)]
Tag version 8.01

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate changelog
David Woodhouse [Sat, 5 Jan 2019 10:42:01 +0000 (10:42 +0000)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix memset_s arguments harder.
David Woodhouse [Sat, 5 Jan 2019 10:40:13 +0000 (10:40 +0000)]
Fix memset_s arguments harder.

Doh.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'extra_headers_for_IP_packet_munging_on_BSDs' of gitlab.com:dlenski...
David Woodhouse [Sat, 5 Jan 2019 10:37:06 +0000 (10:37 +0000)]
Merge branch 'extra_headers_for_IP_packet_munging_on_BSDs' of gitlab.com:dlenski/openconnect

6 years agoGP ESP: extra headers must be explicitly included for IP packet munging on *BSD
Daniel Lenski [Sat, 5 Jan 2019 00:19:46 +0000 (16:19 -0800)]
GP ESP: extra headers must be explicitly included for IP packet munging on *BSD

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoTag version 8.00 v8.00
David Woodhouse [Sat, 5 Jan 2019 00:01:33 +0000 (00:01 +0000)]
Tag version 8.00

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoResync translations with sources
David Woodhouse [Sat, 5 Jan 2019 00:00:10 +0000 (00:00 +0000)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoExplicitly reference python2 in shebang for tncc-wrapper.py
David Woodhouse [Fri, 4 Jan 2019 23:51:47 +0000 (23:51 +0000)]
Explicitly reference python2 in shebang for tncc-wrapper.py

The RPM build complains:
BUILDSTDERR: *** ERROR: ambiguous python shebang in /usr/libexec/openconnect/tncc-wrapper.py: #!/usr/bin/python. Change it to python3 (or python2) explicitly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoInstall trojan scripts to $(pkglibexecdir)
David Woodhouse [Fri, 4 Jan 2019 23:19:27 +0000 (23:19 +0000)]
Install trojan scripts to $(pkglibexecdir)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'CLOEXEC_for_GP_HIP' of gitlab.com:dlenski/openconnect
David Woodhouse [Fri, 4 Jan 2019 20:25:17 +0000 (20:25 +0000)]
Merge branch 'CLOEXEC_for_GP_HIP' of gitlab.com:dlenski/openconnect

6 years agoFix memset_s() parameters.
David Woodhouse [Fri, 4 Jan 2019 20:23:30 +0000 (20:23 +0000)]
Fix memset_s() parameters.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoset CLOEXEC for GP's HIP pipes as well
Daniel Lenski [Fri, 4 Jan 2019 18:11:13 +0000 (10:11 -0800)]
set CLOEXEC for GP's HIP pipes as well

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoClean up TNCC error handling
David Woodhouse [Fri, 4 Jan 2019 14:37:14 +0000 (14:37 +0000)]
Clean up TNCC error handling

As suggested by Daniel Lenski, create the oc_text_buf for the request
only once the TNCC wrapper has been spawned, to make the error handling
a bit saner. And remember to close the socketpair if fork() fails, too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix order of dup2 args in spawning TNCC, and add comments
David Woodhouse [Fri, 4 Jan 2019 14:31:30 +0000 (14:31 +0000)]
Fix order of dup2 args in spawning TNCC, and add comments

Reported-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUse cancellable_gets() for TNCC communication
David Woodhouse [Fri, 4 Jan 2019 12:44:33 +0000 (12:44 +0000)]
Use cancellable_gets() for TNCC communication

Just keep things simple. This avoids SOCK_SEQPACKET which doesn't work on
OSX, and stops assuming that TNCC will send the whole response in a single
send() call.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoSplit out cancellable recv/send/gets functions from proxy code
David Woodhouse [Fri, 4 Jan 2019 12:24:04 +0000 (12:24 +0000)]
Split out cancellable recv/send/gets functions from proxy code

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoTNCC periodic host checking fix
Nick Parrin [Wed, 12 Dec 2018 17:19:06 +0000 (18:19 +0100)]
TNCC periodic host checking fix

Fix periodic host checking in check_cookie_success() by passing
dspreauth to TNCC instead of dsid

Signed-off-by: Nick Parrin <spam@coreworks.be>
6 years agoInclude all keys in dist
David Woodhouse [Thu, 3 Jan 2019 23:17:25 +0000 (23:17 +0000)]
Include all keys in dist

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUpdate translations from GNOME
David Woodhouse [Thu, 3 Jan 2019 22:52:51 +0000 (22:52 +0000)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'oh_what_fun_it_is_to_spoof' of gitlab.com:dlenski/openconnect
David Woodhouse [Thu, 3 Jan 2019 22:41:20 +0000 (22:41 +0000)]
Merge branch 'oh_what_fun_it_is_to_spoof' of gitlab.com:dlenski/openconnect

6 years agomake csd-post.sh continue with a warning without xmlstarlet (using Poor Man's vary...
Daniel Lenski [Mon, 17 Dec 2018 00:49:58 +0000 (16:49 -0800)]
make csd-post.sh continue with a warning without xmlstarlet (using Poor Man's vary speshul XML parsing)

6 years agomove trojans (csd-post.sh, csd-wrapper.sh, hipreport.sh, tncc-wrapper.py) to trojans...
Daniel Lenski [Mon, 17 Dec 2018 00:38:40 +0000 (16:38 -0800)]
move trojans (csd-post.sh, csd-wrapper.sh, hipreport.sh, tncc-wrapper.py) to trojans/ subdirectory and expand and clarify their documentation

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
6 years agoEncrypt digests being signed with IBM TSS2.
David Woodhouse [Thu, 3 Jan 2019 21:39:08 +0000 (21:39 +0000)]
Encrypt digests being signed with IBM TSS2.

The digest itself will end up on the wire. But the computed hash including
the secrets should probably be obsecured. For the TPM that's an input
parameter, which it must decrypt. Hence TPMA_SESSION_DECRYPT.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoDisable TLSv1.3 when hardware RSA keys can't support PSS
David Woodhouse [Thu, 3 Jan 2019 15:16:38 +0000 (15:16 +0000)]
Disable TLSv1.3 when hardware RSA keys can't support PSS

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMerge branch 'fix_asprintf' into 'master'
David Woodhouse [Sat, 29 Dec 2018 08:42:41 +0000 (08:42 +0000)]
Merge branch 'fix_asprintf' into 'master'

asprintf() returns -1 on error

See merge request openconnect/openconnect!22

6 years agoasprintf() returns -1 on error
Daniel Lenski [Thu, 27 Dec 2018 23:13:32 +0000 (15:13 -0800)]
asprintf() returns -1 on error

Fixes the bugs reported on the mailing list and Ubuntu tracker…

- http://lists.infradead.org/pipermail/openconnect-devel/2018-December/005164.html "Failed to obtain WebVPN cookie introduced by f08767d9644029bd3ac0e83bf160a7bf03a5c8de"
- https://bugs.launchpad.net/bugs/1809839 "[Bug 1809839] [NEW] Daily build 2667 broken for protocol=GP"

6 years agoClear TCG TSS2 auth passwords on free
David Woodhouse [Fri, 21 Dec 2018 22:03:48 +0000 (22:03 +0000)]
Clear TCG TSS2 auth passwords on free

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoMore free_pass() for TPMv1 passwords
David Woodhouse [Fri, 21 Dec 2018 16:29:18 +0000 (16:29 +0000)]
More free_pass() for TPMv1 passwords

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUse free_pass() in openconnect_vpninfo_free()
David Woodhouse [Fri, 21 Dec 2018 16:25:02 +0000 (16:25 +0000)]
Use free_pass() in openconnect_vpninfo_free()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUse free_pass() for TCG TSS2
David Woodhouse [Fri, 21 Dec 2018 16:21:51 +0000 (16:21 +0000)]
Use free_pass() for TCG TSS2

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUse free_pass() for freeing certificate passwords
David Woodhouse [Fri, 21 Dec 2018 16:19:35 +0000 (16:19 +0000)]
Use free_pass() for freeing certificate passwords

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoUse free_pass() for yubikey PIN
David Woodhouse [Fri, 21 Dec 2018 16:14:11 +0000 (16:14 +0000)]
Use free_pass() for yubikey PIN

Signed-off-by: David Woodhouse <dwmw2@infradead.org>