]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
5 years agoInterpret Pulse auth failure AVP
David Woodhouse [Sat, 15 Jun 2019 20:17:04 +0000 (21:17 +0100)]
Interpret Pulse auth failure AVP

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAcknowledge Pulse post-signin message
David Woodhouse [Sat, 15 Jun 2019 19:14:01 +0000 (20:14 +0100)]
Acknowledge Pulse post-signin message

The whole auth handling now wants cleaning up, and a pre-signin message can
appear with the login request too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd tokencode support for Pulse
David Woodhouse [Fri, 14 Jun 2019 22:48:11 +0000 (23:48 +0100)]
Add tokencode support for Pulse

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate CSTP for IPv6 DNS servers
Colin Petrie [Thu, 27 Jun 2019 16:24:51 +0000 (18:24 +0200)]
Update CSTP for IPv6 DNS servers

When the Cisco side is configured with IPv4 and IPv6 DNS resolver IPs,
it will send option X-CSTP-DNS-IP6
This patch captures the IPv6 addresses provided, and puts them in
INTERNAL_IP6_DNS variable for vpnc-scripts (which is already handled
there)

Signed-off-by: Colin Petrie <colin@spakka.net>
[dwmw2: Put them in $INTERNAL_IP4_DNS instead. They shouldn't be split.]
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd IPv6 DNS and split routing for Pulse.
David Woodhouse [Thu, 13 Jun 2019 20:17:28 +0000 (21:17 +0100)]
Add IPv6 DNS and split routing for Pulse.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoTurn off Extended Master Secret support (RFC7627) for resumed DTLS sessions
David Woodhouse [Wed, 12 Jun 2019 09:16:22 +0000 (10:16 +0100)]
Turn off Extended Master Secret support (RFC7627) for resumed DTLS sessions

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoTranslate strings in openconnect_get_supported_protocols()
David Woodhouse [Tue, 11 Jun 2019 12:30:41 +0000 (13:30 +0100)]
Translate strings in openconnect_get_supported_protocols()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoImprove Pulse ESP setup reliability.
David Woodhouse [Mon, 10 Jun 2019 21:55:25 +0000 (22:55 +0100)]
Improve Pulse ESP setup reliability.

Sometimes, the server is slow to process the ESP config so our first probes
don't elicit a response. Abuse the licensing information packet which comes
after the connection is set up, and send a second set of probes when it
arrives.

Perhaps we should actually send three probes, half a second apart.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoLook a lot more like the Windows client...
David Woodhouse [Mon, 10 Jun 2019 21:26:41 +0000 (22:26 +0100)]
Look a lot more like the Windows client...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoRevert "Set ESP Next Header field to 0x29 for IPv6 packets"
David Woodhouse [Mon, 10 Jun 2019 21:35:26 +0000 (22:35 +0100)]
Revert "Set ESP Next Header field to 0x29 for IPv6 packets"

This reverts commit 02ae906bb691c8b342d7ff0875e200ce55c18f2a. Turns out
Pulse doesn't *accept* ESP frames with the correct Next-Header field
for IPv6. You have to send 0x04 (IPIP). So I cleaned it up and removed
the duplication for nothing...

Might need to put this back when we work out how GPST does IPv6.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoSet IPv6 netmask vs. address fields correctly for Pulse
David Woodhouse [Mon, 10 Jun 2019 21:09:11 +0000 (22:09 +0100)]
Set IPv6 netmask vs. address fields correctly for Pulse

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate changelog
David Woodhouse [Mon, 10 Jun 2019 14:52:04 +0000 (15:52 +0100)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoImport translations from GNOME
David Woodhouse [Mon, 10 Jun 2019 13:23:13 +0000 (14:23 +0100)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agopulse: Handle multiple IF-T/TLS records in a single SSL record
David Woodhouse [Mon, 10 Jun 2019 12:53:14 +0000 (13:53 +0100)]
pulse: Handle multiple IF-T/TLS records in a single SSL record

We are still assuming that IT-F/TLS record won't be *split* between SSL
records. That turned out to be a false assumption for Network Connect,
but hopefully they're saner here. We should cleanly complain about that
if it does happen.

There may be better ways to do this; perhaps we should receive the whole SSL
record then handle each record separately. In the common case there's no
real reason for the incoming packet queue anyway. We could just call
os_write_tun() directly. And then only have to resort to memcpy to
split packets up in the very rare case that the tun isn't taking writes
anyway.

This will do for now. The TCP connection *shouldn't* be the fast path
anyway. Not that we've worked out how to make the Pulse server actually
send data in ESP; even with the Windows client it still sends in TCP...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix EAP-TTLS build for OpenSSL 1.0.2 and earlier
David Woodhouse [Mon, 10 Jun 2019 12:10:52 +0000 (13:10 +0100)]
Fix EAP-TTLS build for OpenSSL 1.0.2 and earlier

The BIO structures aren't opaque there, and the accessors don't exist.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoRefuse to use libp11 0.4.7 as it's broken
David Woodhouse [Mon, 10 Jun 2019 11:47:53 +0000 (12:47 +0100)]
Refuse to use libp11 0.4.7 as it's broken

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix pulse build without HAVE_ESP
David Woodhouse [Mon, 10 Jun 2019 11:35:33 +0000 (12:35 +0100)]
Fix pulse build without HAVE_ESP

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDisable encrypt-then-mac where possible with DTLS and OpenSSL
David Woodhouse [Mon, 10 Jun 2019 11:34:43 +0000 (12:34 +0100)]
Disable encrypt-then-mac where possible with DTLS and OpenSSL

There is pain here. Just don't bother.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix DTLS bug when lacking deprecated APIs
Rosen Penev [Mon, 10 Jun 2019 06:40:21 +0000 (23:40 -0700)]
Fix DTLS bug when lacking deprecated APIs

HAVE_DTLS12 is for DTLSv1_method. This causes dtls_method to be NULL and
crash.

[dwmw2: Rework it quite a bit more]

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix compilation without deprecated OpenSSL 1.1 APIs
Rosen Penev [Mon, 10 Jun 2019 06:36:53 +0000 (23:36 -0700)]
Fix compilation without deprecated OpenSSL 1.1 APIs

Initialization and deinitialization is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 years agofix GP MTU calculation
Daniel Lenski [Sun, 9 Jun 2019 21:58:25 +0000 (14:58 -0700)]
fix GP MTU calculation

1) Had been erroneously assuming 32-byte blocksize for AES-256 (it's only 16)
2) HMAC-SHA256 writes a 16-byte MAC

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoalso support sha256 with GlobalProtect ESP
Daniel Lenski [Sun, 9 Jun 2019 20:42:21 +0000 (13:42 -0700)]
also support sha256 with GlobalProtect ESP

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agogpst: Fix memory leak if udp_connect() fails.
raminfp [Wed, 29 May 2019 15:21:02 +0000 (15:21 +0000)]
gpst: Fix memory leak if udp_connect() fails.

Signed-off-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
5 years agoAdd hipreport-android.sh
Daniel Lenski [Sat, 1 Jun 2019 02:10:10 +0000 (19:10 -0700)]
Add hipreport-android.sh

The desktop version of the HIP report doesn't work on Android in part
because the here-doc appears to exceed the size of the read buffer in
Android's rather primitive /system/bin/sh.  This is a rather confusing bug
to identify and diagnose.

Include an alternate script with minimal contents (hipreport-minimal.sh)
which is suitable for use on Android.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoconsolidate GlobalProtect OS name translation
Daniel Lenski [Fri, 18 Jan 2019 03:15:33 +0000 (19:15 -0800)]
consolidate GlobalProtect OS name translation

Suggested by David Woohouse:
    https://gitlab.com/openconnect/openconnect/merge_requests/17#note_124400905

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agocomment about GlobalProtect HTTP user-agent value
Daniel Lenski [Fri, 18 Jan 2019 03:02:02 +0000 (19:02 -0800)]
comment about GlobalProtect HTTP user-agent value

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoClean up and simplify GP ESP keying
Daniel Lenski [Mon, 14 Jan 2019 01:59:26 +0000 (17:59 -0800)]
Clean up and simplify GP ESP keying

Also, check for buffer overflow and inconsistent sizes (number of bits in
key != number specified) in ESP keys.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoIncomplete, speculative IPv6 for GlobalProtect
Daniel Lenski [Fri, 12 Jan 2018 09:44:17 +0000 (01:44 -0800)]
Incomplete, speculative IPv6 for GlobalProtect

Client-side IPv6 support was added in v4.0:
https://live.paloaltonetworks.com/t5/Colossal-Event-Blog/New-GlobalProtect-4-0-announced-with-IPv6-support/ba-p/141593

Server-side IPv6 support was added in PanOS 8.0:
https://www.paloaltonetworks.com/documentation/80/pan-os/newfeaturesguide/globalprotect-features

I've been wanting to get IPv6 working for a while, but don't have access to
a GP VPN that supports IPv6, and haven't found anyone else who does.  I'm
adding incomplete, speculative IPv6 support here in the hopes that someone
will use it and report back on partial success/failure:

* Known from Windows client: `ipv6-support=yes` in `/ssl-vpn/login.esp`
  request, `preferred-ipv6` in `/ssl-vpn/getconfig.esp` request,
  `client-ipv6` in `/ssl-vpn/hipreport{,check}.esp` requests,
  `app-version=4.0.5-8`,
* Educated guess: 0x0800 in GPST packet header represents IPv4 ethertype,
  and will be replaced with 0x86DD for IPv6 packets.
* Unknown: IPv6 routing configuration tags to expect in
  `/ssl-vpn/getconfig.esp` response. This build prints a prominent
  error message if it encounters any unknown configuration tags
  containing the character '6', and requests feedback to the mailing
  list.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoReport GP session lifetime
Dan Lenski [Sat, 25 May 2019 05:41:19 +0000 (22:41 -0700)]
Report GP session lifetime

OpenConnect doesn't have a mechanism to immediately stop trying to reconnect
after the session expires.

Server-forced session expiration "takes care of itself" when OpenConnect
tries to reconnect repeatedly and fails, though it might be useful to save
the expected expiration time somewhere to be able to report it in a more
user-friendly fashion.

Signed-off-by: Dan Lenski <dlenski@gmail.com>
5 years agoBetter spoofed HIP report
Dan Lenski [Sat, 25 May 2019 04:54:40 +0000 (21:54 -0700)]
Better spoofed HIP report

Some GlobalProtect VPNs appear to actually check the contents of the HIP
report in some way, and require that anti-virus/anti-spyware software be
labeled as up-to-date.

Also, the --computer parameter is no longer needed (now that its value
is included in the "cookie")

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoSet ESP Next Header field to 0x29 for IPv6 packets
David Woodhouse [Sun, 9 Jun 2019 23:43:43 +0000 (00:43 +0100)]
Set ESP Next Header field to 0x29 for IPv6 packets

This didn't matter before as we didn't transport IPv6 in ESP — NC doesn't
support it and we haven't worked it out for GPST yet. But Pulse does.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoSplit out construct_esp_packet() to avoid duplication
David Woodhouse [Sun, 9 Jun 2019 23:39:27 +0000 (00:39 +0100)]
Split out construct_esp_packet() to avoid duplication

I want to make it set the next header field correctly, and that's the last
straw; I don't want multiple copies of it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd ESP support for Pulse
David Woodhouse [Sun, 9 Jun 2019 23:05:12 +0000 (00:05 +0100)]
Add ESP support for Pulse

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agopulse: Split out config packet handling and loop until end-of-config received
David Woodhouse [Sun, 9 Jun 2019 20:39:51 +0000 (21:39 +0100)]
pulse: Split out config packet handling and loop until end-of-config received

Dan did this. It seemed like a good idea.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd HMAC-SHA256-128 support for ESP
David Woodhouse [Sat, 8 Jun 2019 15:20:37 +0000 (16:20 +0100)]
Add HMAC-SHA256-128 support for ESP

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd Pulse Connect Secure support
David Woodhouse [Fri, 7 Jun 2019 19:32:07 +0000 (20:32 +0100)]
Add Pulse Connect Secure support

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoConvert dump_buf_hex() to use oc_text_buf instead of sprintf
David Woodhouse [Fri, 7 Jun 2019 16:04:41 +0000 (17:04 +0100)]
Convert dump_buf_hex() to use oc_text_buf instead of sprintf

I seem to recall the OpenBSD build will complain loudly about the use of
"bad" functions like sprintf. And even though this particular code does
seem to be perfectly correct, they do have a point in the general case.

Just use buf_append() for this, since that's what it was designed for.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agomake dump_buf_hex() show printable characters as well
Daniel Lenski [Tue, 4 Jun 2019 18:09:31 +0000 (11:09 -0700)]
make dump_buf_hex() show printable characters as well

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoFix peer_cert_hash memory leaks
David Woodhouse [Fri, 7 Jun 2019 18:36:49 +0000 (19:36 +0100)]
Fix peer_cert_hash memory leaks

Spotted while running Pulse code under Valgrind

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoRevamp MTU detection
David Woodhouse [Fri, 24 May 2019 15:53:05 +0000 (16:53 +0100)]
Revamp MTU detection

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 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>
5 years agoTag version 8.03 v8.03
David Woodhouse [Sat, 18 May 2019 17:54:18 +0000 (18:54 +0100)]
Tag version 8.03

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoResync translations with sources
David Woodhouse [Sat, 18 May 2019 17:49:22 +0000 (10:49 -0700)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME
David Woodhouse [Sat, 18 May 2019 17:47:37 +0000 (10:47 -0700)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate changelog
David Woodhouse [Sat, 18 May 2019 17:43:15 +0000 (10:43 -0700)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoInclude <errno.h> in gnutls_tpm2_ibm.c
David Woodhouse [Thu, 16 May 2019 18:18:30 +0000 (11:18 -0700)]
Include <errno.h> in gnutls_tpm2_ibm.c

Some environments don't pull it in implicitly; we should include it for
ourselves.

gnutls_tpm2_ibm.c: In function ‘install_tpm2_key’:
gnutls_tpm2_ibm.c:485:11: error: ‘EINVAL’ undeclared (first use in this function)
   return -EINVAL;
           ^~~~~~
gnutls_tpm2_ibm.c:485:11: note: each undeclared identifier is reported only once for each function it appears in
gnutls_tpm2_ibm.c:490:11: error: ‘ENOMEM’ undeclared (first use in this function)
   return -ENOMEM;
           ^~~~~~
gnutls_tpm2_ibm.c:528:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:1206: recipe for target 'libopenconnect_la-gnutls_tpm2_ibm.lo' failed

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoKill MAX_BUF_LEN
David Woodhouse [Sat, 11 May 2019 09:41:14 +0000 (10:41 +0100)]
Kill MAX_BUF_LEN

There's no real point in having a hard limit for struct oc_text_buf, the
whole point of which is that it is dynamically allocated. Just guard
against the int buf_len overflowing.

In process_http_response() the hard-coded buf[] array is only used for
headers one line at a time now, so 8KiB should suffice.

Fixes: #39
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'tmp-update-gui-link' of gitlab.com:nmav/openconnect
David Woodhouse [Fri, 10 May 2019 12:28:21 +0000 (13:28 +0100)]
Merge branch 'tmp-update-gui-link' of gitlab.com:nmav/openconnect

5 years agoReturn -EPERM when server changes IP address, not -EINVAL
David Woodhouse [Fri, 10 May 2019 11:06:19 +0000 (12:06 +0100)]
Return -EPERM when server changes IP address, not -EINVAL

This will be treated as an auth failure, and the ssl_reconnect() function
will give up instead of continuing to retry.

Fixes: #38
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'allow_routes_with_no_netmask' of gitlab.com:dlenski/openconnect
David Woodhouse [Fri, 10 May 2019 10:46:00 +0000 (11:46 +0100)]
Merge branch 'allow_routes_with_no_netmask' of gitlab.com:dlenski/openconnect

5 years agolinked to the right page for openconnect-gui and updated description
Nikos Mavrogiannopoulos [Sat, 4 May 2019 07:38:48 +0000 (09:38 +0200)]
linked to the right page for openconnect-gui and updated description

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoAllow script_setenv() to truncate values
David Woodhouse [Thu, 25 Apr 2019 11:57:31 +0000 (13:57 +0200)]
Allow script_setenv() to truncate values

This means we don't have to do nasty things to const strings in
process_split_xxclude().

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoClean up memset_s() detection a bit more.
David Woodhouse [Thu, 25 Apr 2019 11:01:02 +0000 (13:01 +0200)]
Clean up memset_s() detection a bit more.

Definining __STDC_WANT_LIB_EXT1__ to get memset_s() is required by the C11
standard, not a Solaris-ism. It's no use just to check for its presence
in the library with AC_CHECK_FUNC() if it isn't going to compile, so make
sure we check for it with AC_LINK_IFELSE() *and* with the warning flags
that might include -Werror-implicit-function-declarations.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoInclude <netinet/in_systm.h> before <netinet/ip_icmp.h> for Solaris
David Woodhouse [Wed, 24 Apr 2019 16:12:54 +0000 (18:12 +0200)]
Include <netinet/in_systm.h> before <netinet/ip_icmp.h> for Solaris

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix Solaris 11.4 compilation by making memset_s() visible
David Woodhouse [Wed, 24 Apr 2019 16:10:40 +0000 (18:10 +0200)]
Fix Solaris 11.4 compilation by making memset_s() visible

Reported-by: Thomas Hildebrandt <thomas.hildebrandt@oracle.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoFix wrong long option is used in the help messages
Yoshimasa Niwa [Thu, 11 Apr 2019 10:11:31 +0000 (03:11 -0700)]
Fix wrong long option is used in the help messages

`-F` has long option `--form-entry` and man page and many places are
all using `--form-entry`, however, help messages are using
`--form-field`.

Signed-off-by: Yoshimasa Niwa <niw@niw.at>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6 years agoAllow routes with no netmask (equivalent to /32 for IPv4 or /128 for IPv6)
Daniel Lenski [Sat, 20 Apr 2019 19:13:30 +0000 (15:13 -0400)]
Allow routes with no netmask (equivalent to /32 for IPv4 or /128 for IPv6)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
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>