]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
5 years agoGP auth: give challenge/2FA forms a constant auth_id/name of "_challenge"
Daniel Lenski [Thu, 9 Apr 2020 00:35:48 +0000 (17:35 -0700)]
GP auth: give challenge/2FA forms a constant auth_id/name of "_challenge"

Until now, we've been using the `inputStr` value (hex token that has to
accompany challenge form submission) as the `auth_id` for challenge forms,
but it appears these values aren't fixed from run-to-run, which makes it
impossible to use `--form-entry` to fill them out.

This patch makes all challenge forms have `auth_id=_challenge`, so they can
be filled with `--form-entry=_challenge:passwd=VALUE`. The `inputStr` value
will now be shoehorned into `form->action`.

Unless we find a GP VPN that uses multiple independent challenges (3FA?),
this should work better.

ping #112

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMore helpful error when Pulse server asks for TNCC
David Woodhouse [Wed, 8 Apr 2020 14:26:27 +0000 (15:26 +0100)]
More helpful error when Pulse server asks for TNCC

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix autocompletion a bit more, add tests
David Woodhouse [Wed, 8 Apr 2020 14:15:00 +0000 (15:15 +0100)]
Fix autocompletion a bit more, add tests

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd bash completion
David Woodhouse [Tue, 7 Apr 2020 13:12:27 +0000 (14:12 +0100)]
Add bash completion

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoTag version 8.08 v8.08
David Woodhouse [Mon, 6 Apr 2020 15:45:01 +0000 (16:45 +0100)]
Tag version 8.08

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoImport pending Fedora 31 updates to fix CI
David Woodhouse [Mon, 6 Apr 2020 13:26:32 +0000 (14:26 +0100)]
Import pending Fedora 31 updates to fix CI

The http-parser package broke its users again, and we need the fixed
GnuTLS.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoChangelog for OIDC NULL fix
David Woodhouse [Mon, 6 Apr 2020 13:17:34 +0000 (14:17 +0100)]
Changelog for OIDC NULL fix

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd tests for --servercert matching
David Woodhouse [Mon, 6 Apr 2020 13:15:38 +0000 (14:15 +0100)]
Add tests for --servercert matching

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix SEGV on empty OIDC token
David Woodhouse [Mon, 6 Apr 2020 12:49:34 +0000 (13:49 +0100)]
Fix SEGV on empty OIDC token

Spotted by Coverity. And then very obvious in retrospect.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoCheck for failure opening /dev/null
David Woodhouse [Mon, 6 Apr 2020 12:25:20 +0000 (13:25 +0100)]
Check for failure opening /dev/null

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME
David Woodhouse [Mon, 6 Apr 2020 11:36:42 +0000 (12:36 +0100)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix matching of pin-sha256: public key hashes to be case-sensitive
David Woodhouse [Mon, 6 Apr 2020 11:30:19 +0000 (12:30 +0100)]
Fix matching of pin-sha256: public key hashes to be case-sensitive

Fixes: #116
Reported-by: Dave Padden
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoOpen /dev/null instead of passing non-functional stderr to CSD trojans
David Woodhouse [Mon, 6 Apr 2020 10:20:06 +0000 (11:20 +0100)]
Open /dev/null instead of passing non-functional stderr to CSD trojans

When the auth-dialog is invoked from gnome-shell, it *closes* the other
end of our stderr. Detect this with ferror(stderr), and open /dev/null
instead. This prevents CSD scripts from taking SIGPIPE when writing to
stderr (which we also dup to be their stdout) and aborting.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMake csd-post.sh cope with not being able to write to stdout
David Woodhouse [Sat, 4 Apr 2020 21:27:12 +0000 (22:27 +0100)]
Make csd-post.sh cope with not being able to write to stdout

When invoked from gnome-shell for NetworkManager, curl takes a SIGPIPE
when writing the result of the final POST to stdout. It then exits with
result code 23, causing OpenConnect to whine about an error.

Make it return zero.

Also stop the pidof results making it to stdout when checking for a
process.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDisable GnuTLS version check for CI builds
David Woodhouse [Sat, 4 Apr 2020 20:43:32 +0000 (21:43 +0100)]
Disable GnuTLS version check for CI builds

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDisable GnuTLS version check for COPR build
David Woodhouse [Sat, 4 Apr 2020 20:39:28 +0000 (21:39 +0100)]
Disable GnuTLS version check for COPR build

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoTag version 8.07 v8.07
David Woodhouse [Sat, 4 Apr 2020 20:28:26 +0000 (21:28 +0100)]
Tag version 8.07

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME
David Woodhouse [Sat, 4 Apr 2020 20:25:58 +0000 (21:25 +0100)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'passtos_for_ESP_too' of gitlab.com:dlenski/openconnect
David Woodhouse [Sat, 4 Apr 2020 20:14:53 +0000 (21:14 +0100)]
Merge branch 'passtos_for_ESP_too' of gitlab.com:dlenski/openconnect

5 years agoDon't abort if CSD wrapper returns non-zero
David Woodhouse [Sat, 4 Apr 2020 20:06:19 +0000 (21:06 +0100)]
Don't abort if CSD wrapper returns non-zero

Some of them do. Give people a grace period to fix them.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix compilation on GnuTLS prior to 3.5.0
Daniel Lenski [Sat, 4 Apr 2020 16:45:32 +0000 (09:45 -0700)]
Fix compilation on GnuTLS prior to 3.5.0

The macro gnutls_check_version_numeric, used in
b974ed3c5bcccf7045af7ead4b711d0c6dcd5de9, wasn't added until GnuTLS 3.5.0
(and was in fact based on the gtls_ver macro from openconnect)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoChangelog entry
Daniel Lenski [Thu, 2 Apr 2020 03:49:47 +0000 (20:49 -0700)]
Changelog entry

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoadd Java wrapper function for setPassTOS()
Daniel Lenski [Thu, 2 Apr 2020 00:27:51 +0000 (17:27 -0700)]
add Java wrapper function for setPassTOS()

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoupdate the manual and `--help` to explain `--passtos` a little more
Daniel Lenski [Thu, 2 Apr 2020 00:25:01 +0000 (17:25 -0700)]
update the manual and `--help` to explain `--passtos` a little more

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agomake --passtos work with ESP as well as DTLS
Daniel Lenski [Thu, 2 Apr 2020 00:24:13 +0000 (17:24 -0700)]
make --passtos work with ESP as well as DTLS

Tested with both AnyConnect (DTLS) and GlobalProtect (ESP).

Also, update the manual and `--help` to explain `--passtos` a little more.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoDTLS: check at runtime whether GnuTLS is giving us a zero'ed ClientHello
Luca Boccassi [Wed, 1 Apr 2020 12:56:32 +0000 (13:56 +0100)]
DTLS: check at runtime whether GnuTLS is giving us a zero'ed ClientHello

Use a handshake hook, and abort the handshake if it fails.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'ignore-empty-select-tag' of gitlab.com:klyr/openconnect
David Woodhouse [Wed, 1 Apr 2020 15:36:56 +0000 (16:36 +0100)]
Merge branch 'ignore-empty-select-tag' of gitlab.com:klyr/openconnect

5 years agoReduce duplication in start_dtls_handshake()
David Woodhouse [Wed, 1 Apr 2020 15:27:05 +0000 (16:27 +0100)]
Reduce duplication in start_dtls_handshake()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'fix-gnutls-check' of gitlab.com:mrueg/openconnect
David Woodhouse [Wed, 1 Apr 2020 14:52:55 +0000 (15:52 +0100)]
Merge branch 'fix-gnutls-check' of gitlab.com:mrueg/openconnect

5 years agoDo not process <select/> nodes with no children
Julien Barbot [Wed, 1 Apr 2020 14:31:53 +0000 (16:31 +0200)]
Do not process <select/> nodes with no children

Signed-off-by: Julien Barbot <julien@barbot.org>
5 years agoconfigure.ac: Fix gnutls version check
Manuel Rüger [Wed, 1 Apr 2020 12:57:06 +0000 (14:57 +0200)]
configure.ac: Fix gnutls version check

This version number is hexadecimal

See gnutls/gnutls.h

 #define GNUTLS_VERSION "3.6.13"
 #define GNUTLS_VERSION_MAJOR 3
 #define GNUTLS_VERSION_MINOR 6
 #define GNUTLS_VERSION_PATCH 13
 #define GNUTLS_VERSION_NUMBER 0x03060d

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
5 years agoFix up Dan's aversion to writing changelog entries...
David Woodhouse [Wed, 1 Apr 2020 11:47:00 +0000 (12:47 +0100)]
Fix up Dan's aversion to writing changelog entries...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDon't abort Pulse connection for bad cert MD5
David Woodhouse [Wed, 1 Apr 2020 11:43:50 +0000 (12:43 +0100)]
Don't abort Pulse connection for bad cert MD5

This happens in the wild and the official clients seem not to care. It's
a pointless check anyway. It's too late, and it's only MD5.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agofix off-by-one error in GnuTLS version check (v3.6.12 is known-bad), and also warn...
Daniel Lenski [Tue, 31 Mar 2020 00:32:32 +0000 (17:32 -0700)]
fix off-by-one error in GnuTLS version check (v3.6.12 is known-bad), and also warn at compile time

Not-signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoTag version 8.06 v8.06
David Woodhouse [Mon, 30 Mar 2020 23:32:07 +0000 (00:32 +0100)]
Tag version 8.06

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoResync translations with sources
David Woodhouse [Mon, 30 Mar 2020 23:27:37 +0000 (00:27 +0100)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDisable DTLS for GnuTLS 3.6.3 - 3.6.12
David Woodhouse [Mon, 30 Mar 2020 23:20:33 +0000 (00:20 +0100)]
Disable DTLS for GnuTLS 3.6.3 - 3.6.12

Upgrade to 3.6.13.
https://gitlab.com/gnutls/gnutls/-/issues/960

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAdd changelog for RFC6750 bearer token support
David Woodhouse [Mon, 30 Mar 2020 23:18:53 +0000 (00:18 +0100)]
Add changelog for RFC6750 bearer token support

Not utterly convinced I like treating it like a soft token; I wonder if
it should have a dedicated callback to the UI, or be handled through
the webview support that we're working on. But there's a release imminent
and this gets people something functional.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'issue99' of gitlab.com:Alan_Jowett/openconnect
David Woodhouse [Mon, 30 Mar 2020 23:16:34 +0000 (00:16 +0100)]
Merge branch 'issue99' of gitlab.com:Alan_Jowett/openconnect

5 years agoFix merge request references in changelog
David Woodhouse [Mon, 30 Mar 2020 22:41:11 +0000 (23:41 +0100)]
Fix merge request references in changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'periodic_Trojan_touch_up'
Daniel Lenski [Mon, 30 Mar 2020 16:04:00 +0000 (09:04 -0700)]
Merge branch 'periodic_Trojan_touch_up'

https://gitlab.com/openconnect/openconnect/-/merge_requests/79

5 years agoadd OC_PROTO_PERIODIC_TROJAN feature flag
Daniel Lenski [Mon, 30 Mar 2020 15:38:12 +0000 (08:38 -0700)]
add OC_PROTO_PERIODIC_TROJAN feature flag

Follow-up to !56.  The API is now there for cross-protocol operation, and
oNCP is known to use this too, but only GP protocol currently has support in
OpenConnect.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoadd Java wrapper function for setTrojanInterval()
Daniel Lenski [Mon, 30 Mar 2020 15:38:12 +0000 (08:38 -0700)]
add Java wrapper function for setTrojanInterval()

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoUpdate changelog.xml
Daniel Lenski [Mon, 30 Mar 2020 16:14:56 +0000 (09:14 -0700)]
Update changelog.xml

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoRun Cisco CSD script as child, not daemonized grandchild
Daniel Lenski [Tue, 17 Mar 2020 17:15:29 +0000 (10:15 -0700)]
Run Cisco CSD script as child, not daemonized grandchild

This allows us to capture a failure in the CSD script/binary much more
quickly, rather than spinning endlessly (see #108 for one of many examples
where this confuses users).

Tested with both “real” CSD trojan binaries and wrapper script, as well as
`trojans/csd-post.sh`.

GP already does this for the HIP script, and it works fine, including with
NM and Android clients based on libopenconnect.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoString fixes
David Woodhouse [Mon, 30 Mar 2020 11:02:10 +0000 (12:02 +0100)]
String fixes

A couple of cosmetic fixes suggested by "scootergrisen" in
https://gitlab.com/openconnect/openconnect/-/merge_requests/72
https://gitlab.com/openconnect/openconnect/-/merge_requests/73/

Also fix up translations so that they don't get lost and need to
be re-translated.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME
David Woodhouse [Mon, 30 Mar 2020 09:03:19 +0000 (10:03 +0100)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoDon't split translated strings with #ifdefs
David Woodhouse [Mon, 30 Mar 2020 08:59:21 +0000 (09:59 +0100)]
Don't split translated strings with #ifdefs

It makes the translators hunt you down and hurt you. And while they're
hurting you, they shout at you in multiple languages that you don't
understand.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoMerge branch 'upstream/master'
Daniel Lenski [Mon, 30 Mar 2020 01:56:47 +0000 (18:56 -0700)]
Merge branch 'upstream/master'

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoremove README.TESTS from Makefile.am
Daniel Lenski [Mon, 30 Mar 2020 01:55:47 +0000 (18:55 -0700)]
remove README.TESTS from Makefile.am

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'origin/explain_server_0x08'
Daniel Lenski [Mon, 30 Mar 2020 01:49:10 +0000 (18:49 -0700)]
Merge branch 'origin/explain_server_0x08'

https://gitlab.com/openconnect/openconnect/-/merge_requests/48

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoadd some clarifications about Pulse vs. NC to the documentation
Daniel Lenski [Mon, 26 Aug 2019 22:36:15 +0000 (15:36 -0700)]
add some clarifications about Pulse vs. NC to the documentation

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agooNCP: explain likely meaning of long-puzzling 'error 0x08'
Daniel Lenski [Sun, 2 Jun 2019 23:38:58 +0000 (16:38 -0700)]
oNCP: explain likely meaning of long-puzzling 'error 0x08'

It appears that the 'error 0x08' returned by some Juniper servers in
response to attempted initiation of the oNCP tunnel means that the server
doesn't support, or has disabled, the older oNCP protocol and only supports
the newer Junos Pulse protocol

This conclusion was based on the investigations of
https://gitlab.com/openconnect/openconnect/issues/42.
See also http://lists.infradead.org/pipermail/openconnect-devel/2018-August/005041.html
for a list of past reports of this error.

OpenConnect previously did not support the Pulse protocol at all (see
http://lists.infradead.org/pipermail/openconnect-devel/2019-April/005334.html),
but now has experimental support as of v8.04 (see
https://lists.infradead.org/pipermail/openconnect-devel/2019-August/005396.html).

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agomissing defines (IPPROTO_ICMP and ICMP_ECHOREPLY) for Windows
Daniel Lenski [Mon, 30 Mar 2020 01:25:19 +0000 (18:25 -0700)]
missing defines (IPPROTO_ICMP and ICMP_ECHOREPLY) for Windows

I missed these in 89c40812d0b9fedf344551f8bb1deeb57fd4f8fd and don't want to rebuild this whole branch right now just to trigger coverity

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'gnutls_priority_override_option'
Daniel Lenski [Mon, 30 Mar 2020 01:03:37 +0000 (18:03 -0700)]
Merge branch 'gnutls_priority_override_option'

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'windows_read_stdin_line_ending'
Daniel Lenski [Mon, 30 Mar 2020 00:56:35 +0000 (17:56 -0700)]
Merge branch 'windows_read_stdin_line_ending'

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agowindows read_stdin should strip either "\r\n" or "\n" as line ending (#113)
Daniel Lenski [Mon, 30 Mar 2020 00:52:58 +0000 (17:52 -0700)]
windows read_stdin should strip either "\r\n" or "\n" as line ending (#113)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agouse run-time version numbers (per dwmw)
Daniel Lenski [Fri, 27 Mar 2020 06:57:46 +0000 (23:57 -0700)]
use run-time version numbers (per dwmw)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'github_PR_164'
Daniel Lenski [Mon, 30 Mar 2020 00:40:31 +0000 (17:40 -0700)]
Merge branch 'github_PR_164'

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoDon't prevent compilation on GnuTLS <3.5.0, and add comment on OpenSSL/GnuTLS difference
Daniel Lenski [Fri, 20 Mar 2020 21:42:40 +0000 (14:42 -0700)]
Don't prevent compilation on GnuTLS <3.5.0, and add comment on OpenSSL/GnuTLS difference

Discussion of OpenSSL/GnuTLS difference with client cert issuer mistmatch:

https: //github.com/curl/curl/issues/1411
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoAlways send client cert
jethrogb [Thu, 20 Feb 2020 17:43:00 +0000 (18:43 +0100)]
Always send client cert

TLS servers may request a certificate from the client. This request includes a list of 0 or more acceptable issuer DNs. The client may use this list to determine which certificate to send. GnuTLS's default behavior is to not send a client certificate if there is no match. However, we generally always have a specific certificate specified, so we just want to send that regardless.

Originally submitted as PR on GitHub: https://github.com/dlenski/openconnect/pull/164
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'origin/ignore_missing_CSD_stub_if_wrapper_specified'
Daniel Lenski [Mon, 30 Mar 2020 00:36:53 +0000 (17:36 -0700)]
Merge branch 'origin/ignore_missing_CSD_stub_if_wrapper_specified'

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoignore failure in downloading CSD stub if CSD wrapper is specified
Daniel Lenski [Fri, 27 Mar 2020 03:20:30 +0000 (20:20 -0700)]
ignore failure in downloading CSD stub if CSD wrapper is specified

Resolves the issue reported here:
https://lists.infradead.org/pipermail/openconnect-devel/2020-March/005554.html

Basically, what's happened here is that the Cisco VPN admins have
misconfigured things so that they require running CSD on all platforms, but
the CSD “stub” script specified for Linux _doesn't actually exist_.  (They
probably only tested with Mac, Windows, and Android… and never considered
Linux clients.)

That said, the absence of the CSD stub *doesn't even matter* for those who
are running a recent version of `csd-post.sh`, which entirely sidesteps
running the server provided stub and binaries.

Long story short: This patch makes OpenConnect not fail if the CSD stub
can't be downloaded… as long as a CSD wrapper script was specified.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agomention test suite in Getting Started / Building docs
Daniel Lenski [Fri, 27 Mar 2020 08:27:18 +0000 (01:27 -0700)]
mention test suite in Getting Started / Building docs

also tweak language about default vpnc-script

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoadd comments on confusing TLS/DTLS cipher description fields
Daniel Lenski [Fri, 6 Mar 2020 03:32:32 +0000 (19:32 -0800)]
add comments on confusing TLS/DTLS cipher description fields

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agodon't try to describe "DTLS" cipher if protocol's "DTLS" is actually ESP
Daniel Lenski [Fri, 6 Mar 2020 02:34:45 +0000 (18:34 -0800)]
don't try to describe "DTLS" cipher if protocol's "DTLS" is actually ESP

(or any other future, hypothetical UDP-based protocol that's not DTLS)

Also, handle OpenSSL and GnuTLS consistently in `openconnect_get_dtls_cipher`.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoRemove checks for no-longer supported GnuTLS versions
Daniel Lenski [Fri, 6 Mar 2020 02:14:53 +0000 (18:14 -0800)]
Remove checks for no-longer supported GnuTLS versions

Per 3235855966f2c3ce7f528f04964796bcaa1e0b5a, "We don't build with GnuTLS older then 3.2.10 now anyway."

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoinclude negotiated [D]TLS version in ciphersuite string for OpenSSL (GnuTLS already...
Daniel Lenski [Fri, 6 Mar 2020 02:37:37 +0000 (18:37 -0800)]
include negotiated [D]TLS version in ciphersuite string for OpenSSL (GnuTLS already does this)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agolog ciphersuite on every new HTTPS connection, not just AnyConnect protocol
Daniel Lenski [Thu, 5 Mar 2020 04:28:59 +0000 (20:28 -0800)]
log ciphersuite on every new HTTPS connection, not just AnyConnect protocol

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoallow cipher list overrides with OpenSSL as well
Daniel Lenski [Thu, 5 Mar 2020 02:26:53 +0000 (18:26 -0800)]
allow cipher list overrides with OpenSSL as well

This adds an undocumented `--openssl-ciphers` option.

Both `--openssl-ciphers` and `--gnutls-priority` options now manipulate the same
`vpninfo->ciphersuite_config`, but they should be kept with separate names
to avoid confusion, given that their contents are incompatible.

For reference:

* OpenSSL cipher list documentation: https://www.openssl.org/docs/man1.0.2/man1/ciphers.html
* GnuTLS priority string documentation: https://gnutls.org/manual/html_node/Priority-Strings.html
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoshow exact GnuTLS/OpenSSL version in --version/--help text
Daniel Lenski [Wed, 4 Mar 2020 21:06:50 +0000 (13:06 -0800)]
show exact GnuTLS/OpenSSL version in --version/--help text

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agocouple other touch-ups to the docs
Daniel Lenski [Thu, 19 Mar 2020 04:02:11 +0000 (21:02 -0700)]
couple other touch-ups to the docs

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoadd long-sought README.md
Daniel Lenski [Thu, 19 Mar 2020 03:58:42 +0000 (20:58 -0700)]
add long-sought README.md

ping #55, !57

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge 'gitlab/pass_IDLE_TIMEOUT_to_script'
Daniel Lenski [Tue, 17 Mar 2020 04:07:35 +0000 (21:07 -0700)]
Merge 'gitlab/pass_IDLE_TIMEOUT_to_script'

https: //gitlab.com/openconnect/openconnect/-/merge_requests/67
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'less_confusing_GP_SAML_output'
Daniel Lenski [Tue, 17 Mar 2020 04:06:44 +0000 (21:06 -0700)]
Merge branch 'less_confusing_GP_SAML_output'

https: //gitlab.com/openconnect/openconnect/-/merge_requests/69
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'gitlab/more_careful_highlighting_of_unknown_GP_login_return_values'
Daniel Lenski [Tue, 17 Mar 2020 04:05:12 +0000 (21:05 -0700)]
Merge branch 'gitlab/more_careful_highlighting_of_unknown_GP_login_return_values'

https: //gitlab.com/openconnect/openconnect/-/merge_requests/66
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoMerge branch 'improve_HIP_check'
Daniel Lenski [Tue, 17 Mar 2020 04:02:54 +0000 (21:02 -0700)]
Merge branch 'improve_HIP_check'

https: //gitlab.com/openconnect/openconnect/-/merge_requests/56
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agofail if GP portal config contains no gateways (rather than simply attempting to conti...
Daniel Lenski [Mon, 16 Mar 2020 00:05:05 +0000 (17:05 -0700)]
fail if GP portal config contains no gateways (rather than simply attempting to continue with same server)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoAdd support to OpenConnect client to use RFC6750 style Bearer tokens to authenticate...
Alan Jowett [Mon, 27 Jan 2020 16:22:27 +0000 (09:22 -0700)]
Add support to OpenConnect client to use RFC6750 style Bearer tokens to authenticate to the server.

Resolves: #99

Signed-off-by: Alan TG Jowett <alan.jowett@microsoft.com>
5 years agoAdd undocumented --gnutls-priority command line option
Daniel Lenski [Wed, 4 Mar 2020 20:58:43 +0000 (12:58 -0800)]
Add undocumented --gnutls-priority command line option

Rationale: https://gitlab.com/openconnect/openconnect/issues/21#note_299083798
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoAdd some basic hostscan support to csd-post.sh
David Woodhouse [Wed, 26 Feb 2020 11:29:31 +0000 (11:29 +0000)]
Add some basic hostscan support to csd-post.sh

Fetch the data.xml, handle File and Process data requests.

This should save a little bit of manual work in crafting acceptable
responses for some users/configurations.

There's still a bunch of random crap that the real hostscan trojan can
do that we aren't attempting; some of which we probably never still.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoFix double colon in DTLS12 ciphersuite list
David Woodhouse [Mon, 24 Feb 2020 18:04:10 +0000 (18:04 +0000)]
Fix double colon in DTLS12 ciphersuite list

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoAlways openconnect_close_https() before intermittent HIP check
Daniel Lenski [Mon, 3 Feb 2020 17:07:34 +0000 (09:07 -0800)]
Always openconnect_close_https() before intermittent HIP check

Even when tunnel is using ESP, attempting to reuse the stale HTTPS
connection from the last round can cause problems (half-open TCP sockets).

See this comment:
https: //gitlab.com/dlenski/openconnect/commit/a8dc68ae3ff9a9d492a839a385cc481d0c4bca73#note_281131962
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agofewer hardcoded constants, fewer problems
Daniel Lenski [Mon, 27 Jan 2020 06:27:35 +0000 (22:27 -0800)]
fewer hardcoded constants, fewer problems

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agocleanup parse_portal_xml()
Daniel Lenski [Mon, 27 Jan 2020 05:57:24 +0000 (21:57 -0800)]
cleanup parse_portal_xml()

This thing is getting bigger and messier, and the structure of its parsing and nested variable reuse is, ermmm… not exactly confidence-inducing

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agodon't tell Windows/Java users to use --csd-wrapper since it doesn't work yet
Daniel Lenski [Mon, 27 Jan 2020 04:41:23 +0000 (20:41 -0800)]
don't tell Windows/Java users to use --csd-wrapper since it doesn't work yet

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agonitpick docs: --force-trojan option placement and description
Daniel Lenski [Mon, 27 Jan 2020 04:29:26 +0000 (20:29 -0800)]
nitpick docs: --force-trojan option placement and description

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoHIP timing nitpicks
Daniel Lenski [Mon, 27 Jan 2020 03:53:12 +0000 (19:53 -0800)]
HIP timing nitpicks

* If no HIP script was provided, we should only check HIP *once*, to warn
  the user. Either the VPN won't work without HIP, or it will… because lots
  of GP VPNs lie or don't enforce it.

  There's no point in repeatedly checking it and warning about it, though.

* Set last_trojan and trojan_interval in gpst_setup(), not in gpst_parse_config_xml()

  The gateway config doesn't actually specify anything about the HIP/trojan
  requirements; those come from the portal config.

  The HIP check and submission do need to run after connecting to the gateway,
  though, because we need to know the client's assigned IP address(es) in
  order for HIP submission to succeed.

GlobalProtect is dumb.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agomove dtls_state checks into gpst_connect() itself, to avoid repetition
Daniel Lenski [Mon, 27 Jan 2020 01:20:28 +0000 (17:20 -0800)]
move dtls_state checks into gpst_connect() itself, to avoid repetition

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agosimplify
Daniel Lenski [Mon, 27 Jan 2020 01:38:04 +0000 (17:38 -0800)]
simplify

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoperiodic HIP checking works fine with HTTPS tunnel as long as we pause-and-reconnect...
Daniel Lenski [Mon, 27 Jan 2020 00:55:38 +0000 (16:55 -0800)]
periodic HIP checking works fine with HTTPS tunnel as long as we pause-and-reconnect the tunnel

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agomore possible login.esp arguments
Daniel Lenski [Fri, 24 Jan 2020 08:06:21 +0000 (00:06 -0800)]
more possible login.esp arguments

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agoDon't show SAML details in banner, and don't show SAML “path” when it's actually...
Daniel Lenski [Thu, 16 Jan 2020 19:59:17 +0000 (11:59 -0800)]
Don't show SAML details in banner, and don't show SAML “path” when it's actually a complete HTML page

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agolog message should distinguish when SAML authentication is needed, vs. SAML authentic...
Daniel Lenski [Thu, 16 Jan 2020 19:44:58 +0000 (11:44 -0800)]
log message should distinguish when SAML authentication is needed, vs. SAML authentication complete

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agodon't show SAML login details in banner when alt-secret was specified (implying SAML...
Daniel Lenski [Thu, 16 Jan 2020 19:41:14 +0000 (11:41 -0800)]
don't show SAML login details in banner when alt-secret was specified (implying SAML login already done)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
5 years agopulse: Fix another error-path leak in pulse_eap_ttls_recv()
David Woodhouse [Wed, 15 Jan 2020 13:56:36 +0000 (14:56 +0100)]
pulse: Fix another error-path leak in pulse_eap_ttls_recv()

Spotted by Coverity. We need to return buf_free(frag) not jut buf_error().

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agopulse: Fix memory leaks in pulse_eap_ttls_send()
David Woodhouse [Wed, 15 Jan 2020 13:44:09 +0000 (14:44 +0100)]
pulse: Fix memory leaks in pulse_eap_ttls_send()

A couple of leaks spotted by Coverity, and a couple more I spotted while
staring at it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agohttp: Retry request (once) on error receiving response
David Woodhouse [Wed, 15 Jan 2020 13:11:58 +0000 (14:11 +0100)]
http: Retry request (once) on error receiving response

A Juniper server has been encountered in the wild which sends an initial
302 redirect without Connection:close, but then just closes the connection
when it receives the next request.

This happens only for the first redirect to /dana-na/auth/… and not for
subsequent redirects through cookie-check and realm stuff. So instead of
a preemptive hack to avoid connection reuse for *all* redirects in NC,
just cope with it when it happens.

Since rq_retry is only set when the connection is already open, it won't
get set again the second time round, thus avoiding endless retries.

Fixes: #96
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME
David Woodhouse [Tue, 14 Jan 2020 12:27:20 +0000 (13:27 +0100)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
5 years agoUpdate translations from GNOME, prioritising GNOME translations
David Woodhouse [Mon, 30 Dec 2019 00:36:15 +0000 (00:36 +0000)]
Update translations from GNOME, prioritising GNOME translations

Previously, translations from NetworkManager-openconnect have only been
pulled in if there was no existing translation in OpenConnect. Since the
GNOME translations are maintained and corrected, it's better to let them
overide the ones in OpenConnect.

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