]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
4 years agodtls-psk: use ping -6 to ping an ipv6 address
Nikos Mavrogiannopoulos [Thu, 19 Nov 2020 20:55:56 +0000 (21:55 +0100)]
dtls-psk: use ping -6 to ping an ipv6 address

This is necessary in centos7 images.

Resolves: #200

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agomain: avoid unnecessary memory copy (and leak)
Nikos Mavrogiannopoulos [Thu, 12 Nov 2020 14:45:35 +0000 (15:45 +0100)]
main: avoid unnecessary memory copy (and leak)

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years ago.gitlab-ci.yml: added address and undefined sanitizer runs
Nikos Mavrogiannopoulos [Thu, 12 Nov 2020 16:09:36 +0000 (17:09 +0100)]
.gitlab-ci.yml: added address and undefined sanitizer runs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years agoFree memory obtained from openconnect_get_peer_cert_DER
Nikos Mavrogiannopoulos [Thu, 12 Nov 2020 16:53:00 +0000 (17:53 +0100)]
Free memory obtained from openconnect_get_peer_cert_DER

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years agoMerge branch 'Windows_tuntap_fix_196' into 'master'
Nikos Mavrogiannopoulos [Mon, 16 Nov 2020 20:04:11 +0000 (20:04 +0000)]
Merge branch 'Windows_tuntap_fix_196' into 'master'

Windows tuntap driver: accept modified ComponentId ('root\tap0901' instead of just 'tap0901')

Closes #196

See merge request openconnect/openconnect!145

4 years agoWindows tuntap driver: accept modified ComponentId ('root\tap0901' instead of just...
Daniel Lenski [Mon, 16 Nov 2020 17:00:03 +0000 (09:00 -0800)]
Windows tuntap driver: accept modified ComponentId ('root\tap0901' instead of just 'tap0901')

Closes #196

See https://patchwork.openvpn.net/patch/555/#1144 for the similar patch
applied by OpenVPN itself, and discussion thereof.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'coverity' into 'master'
Daniel Lenski [Mon, 16 Nov 2020 16:27:35 +0000 (16:27 +0000)]
Merge branch 'coverity' into 'master'

.gitlab-ci.yml: use centos8 build for coverity

See merge request openconnect/openconnect!142

4 years ago.gitlab-ci.yml: use centos8 build for coverity
Nikos Mavrogiannopoulos [Sat, 14 Nov 2020 21:10:52 +0000 (22:10 +0100)]
.gitlab-ci.yml: use centos8 build for coverity

This removes the need to keep a fedora31 image.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agoMerge branch 'vpninfo-port' into 'master'
Nikos Mavrogiannopoulos [Sat, 14 Nov 2020 19:51:59 +0000 (19:51 +0000)]
Merge branch 'vpninfo-port' into 'master'

setup default port 443 in openconnect_vpninfo_new

See merge request openconnect/openconnect!141

4 years agocheck that port is in valid range
Lukáš Karas [Sat, 14 Nov 2020 19:20:09 +0000 (20:20 +0100)]
check that port is in valid range

Signed-off-by: Lukas Karas <lukas.karas@centrum.cz>
4 years agoremove port setup in ssl connect
Lukáš Karas [Sat, 14 Nov 2020 19:15:40 +0000 (20:15 +0100)]
remove port setup in ssl connect

Signed-off-by: Lukas Karas <lukas.karas@centrum.cz>
4 years agosetup default port 443 in openconnect_vpninfo_new
Lukáš Karas [Sat, 14 Nov 2020 16:18:28 +0000 (17:18 +0100)]
setup default port 443 in openconnect_vpninfo_new

Signed-off-by: Lukas Karas <lukas.karas@centrum.cz>
4 years agoMerge branch 'bugfix_TUNDEV' into 'master'
Daniel Lenski [Thu, 12 Nov 2020 17:12:08 +0000 (17:12 +0000)]
Merge branch 'bugfix_TUNDEV' into 'master'

bugfix: ensure vpnc-script receives TUNDEV even without -i option

Closes #192

See merge request openconnect/openconnect!138

4 years agoMerge branch 'add_secure_cookie_protocol_field' into 'master'
Daniel Lenski [Thu, 12 Nov 2020 17:09:03 +0000 (17:09 +0000)]
Merge branch 'add_secure_cookie_protocol_field' into 'master'

add secure_cookie protocol field

See merge request openconnect/openconnect!137

4 years agobugfix: ensure vpnc-script receives TUNDEV even without -i option
Daniel Lenski [Wed, 11 Nov 2020 21:56:31 +0000 (13:56 -0800)]
bugfix: ensure vpnc-script receives TUNDEV even without -i option

Closes #192; corrects !122.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoadd secure_cookie protocol field to suppress other protocols' cookies from --dump...
Daniel Lenski [Fri, 15 May 2020 17:00:03 +0000 (10:00 -0700)]
add secure_cookie protocol field to suppress other protocols' cookies from --dump-http-traffic as well

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'tmp-use-presaved-images' into 'master'
Nikos Mavrogiannopoulos [Wed, 11 Nov 2020 20:56:14 +0000 (20:56 +0000)]
Merge branch 'tmp-use-presaved-images' into 'master'

.gitlab-ci.yml: use prebuilt images from project's registry

See merge request openconnect/openconnect!135

4 years agoMerge branch 'tmp-link-vpnc-script-gitlab' into 'master'
Nikos Mavrogiannopoulos [Wed, 11 Nov 2020 20:27:55 +0000 (20:27 +0000)]
Merge branch 'tmp-link-vpnc-script-gitlab' into 'master'

www: updated links to vpnc-script

See merge request openconnect/openconnect!136

4 years agowindows builds: run the right openconnect executable
Nikos Mavrogiannopoulos [Wed, 11 Nov 2020 13:10:24 +0000 (14:10 +0100)]
windows builds: run the right openconnect executable

Also disable certain tests which fail due to wine failing to
start.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years agowww: updated links to vpnc-script
Nikos Mavrogiannopoulos [Wed, 11 Nov 2020 13:37:45 +0000 (14:37 +0100)]
www: updated links to vpnc-script

These now point to gitlab.com.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years ago.gitlab-ci.yml: use prebuilt images from project's registry
Nikos Mavrogiannopoulos [Wed, 11 Nov 2020 11:37:04 +0000 (12:37 +0100)]
.gitlab-ci.yml: use prebuilt images from project's registry

This removes the dependency to dockerhub which imposed limits
and avoids the installation of packages during test time speeding
up the CI process.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
4 years agoMerge branch 'explicitly_allow_3DES-CBC_for_GnuTLS' into 'master'
Daniel Lenski [Wed, 4 Nov 2020 22:13:39 +0000 (22:13 +0000)]
Merge branch 'explicitly_allow_3DES-CBC_for_GnuTLS' into 'master'

add --allow-insecure-crypto, and tests so that we don't break on old crypto

Closes #145

See merge request openconnect/openconnect!114

4 years agoadd obsolete-server-crypto and pfs tests
Daniel Lenski [Mon, 18 May 2020 21:59:40 +0000 (14:59 -0700)]
add obsolete-server-crypto and pfs tests

These are designed to ensure that we don't inadvertently break compatibility
with legacy/obsolete server crypto, and also that we don't *inadvertently
connect* to less-secure crypto than requested.

Current checks:

- connect to a server whose only ciphers are 3DES and/or RC4 [if and only
  if] `--allow-insecure-crypto` is specified
- connect to a server whose only KX is RSA KX [if and only if] `--pfs` is
  [not specified]

Tricky parts:

- Override GnuTLS system crypto policy in obsolete-server-crypto test config,
  because this may be needed for newer versions of GnuTLS to obey it. (per nmav:
  https://gitlab.com/openconnect/openconnect/-/issues/145#note_346497960)
- OpenSSL 1.1.0+ removes 3DES and RC4 from the default build
  (https://www.openssl.org/blog/blog/2016/08/24/sweet32), so there is no way
  to re-enable without rebuilding from source.  Therefore, obsolete-server-crypto
  test is marked as XFAIL on all CI builds using it.
- Recent GnuTLS versions which support TLS1.3 implicitly allow non-RSA KX (due to
  VERS-TLS1.3 ciphersuites) even when -KX-ALL:+RSA is in the priority string; in
  order to actually test RSA-only KX, we need to ensure that TLS1.3 is disabled.
  See #149.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agomodify tests/common.sh so that launch_simple_sr_server() → test → cleanup() can be...
Daniel Lenski [Mon, 18 May 2020 22:57:00 +0000 (15:57 -0700)]
modify tests/common.sh so that launch_simple_sr_server() → test → cleanup() can be used repeatedly in a single script

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoadd --allow-insecure-crypto, and corresponding API functions, to explicitly enable...
Daniel Lenski [Mon, 18 May 2020 17:54:03 +0000 (10:54 -0700)]
add --allow-insecure-crypto, and corresponding API functions, to explicitly enable 3DES/RC4/SHA1

This closes #145, and adds tests intended to prevent similar situations from recurring.

Allowing the ancient, broken 3DES and RC4 ciphers is insecure; we do not
want to (re-)enable them by default.  (See discussion:
https://gitlab.com/openconnect/openconnect/-/issues/145#note_344687335)

However, some still-in-use VPN servers can't do any better. So instead, we
explicitly disable them, unless explicitly enabled with the
`--allow-insecure-crypto` option, or corresponding API functions.

Also attempts to future-proof --allow-obsolete-crypto a bit, by setting
`%VERIFY_ALLOW_SIGN_WITH_SHA1` (per nmav:
https://gitlab.com/openconnect/openconnect/-/merge_requests/114#note_346496796),
and explicitly enabling SHA1 (which was moved to GnuTLS “bad hashes list” in
1d75e116b1681d0e6b140d7530e7f0403088da88)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'token_input_in_second_password_in_Juniper_frmLogin' into 'master'
Daniel Lenski [Wed, 4 Nov 2020 21:41:41 +0000 (21:41 +0000)]
Merge branch 'token_input_in_second_password_in_Juniper_frmLogin' into 'master'

Token input in second password in Juniper frmLogin

See merge request openconnect/openconnect!121

4 years agostyle nitpicks, expand clarifying comment, changelog
Daniel Lenski [Wed, 24 Jun 2020 23:01:18 +0000 (16:01 -0700)]
style nitpicks, expand clarifying comment, changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoJuniper: support password and 2FA fields in the same form
Ash Holland [Wed, 24 Jun 2020 21:26:28 +0000 (22:26 +0100)]
Juniper: support password and 2FA fields in the same form

Juniper login forms typically ask for the password in the first form,
then put the 2FA field in a later form. However, some use a second
password field in the first form (usually frmLogin) for the 2FA token.
We now assume password fields after the first in a frmLogin to be 2FA
fields to cope with this case.

Signed-off-by: Ash Holland <ash@sorrel.sh>
4 years agoMerge branch 'Juniper_form_action_remediate.cgi_indicates_TNCC_failure' into 'master'
Daniel Lenski [Wed, 4 Nov 2020 20:35:16 +0000 (20:35 +0000)]
Merge branch 'Juniper_form_action_remediate.cgi_indicates_TNCC_failure' into 'master'

Juniper unknown forms with action remediate.cgi seem to indicate TNCC/Host Checker failure

See merge request openconnect/openconnect!130

4 years agoJuniper unknown forms with action remediate.cgi seem to indicate TNCC/Host Checker...
Daniel Lenski [Fri, 7 Aug 2020 18:34:34 +0000 (11:34 -0700)]
Juniper unknown forms with action remediate.cgi seem to indicate TNCC/Host Checker failure: log error about this

Suggested at https://gitlab.com/openconnect/openconnect/-/issues/175#note_392561212

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'bump_emulated_GlobalProtect_version_number' into 'master'
Daniel Lenski [Wed, 4 Nov 2020 20:27:38 +0000 (20:27 +0000)]
Merge branch 'bump_emulated_GlobalProtect_version_number' into 'master'

bump emulated GlobalProtect version number

See merge request openconnect/openconnect!131

4 years agochangelog
Daniel Lenski [Thu, 15 Oct 2020 01:21:15 +0000 (18:21 -0700)]
changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agobump emulated GlobalProtect version number
Daniel Lenski [Thu, 13 Aug 2020 17:00:58 +0000 (10:00 -0700)]
bump emulated GlobalProtect version number

Apparently some GlobalProtect servers complain about old versions of the client connecting to them, so we should periodically bump up the version number of the client that we emulate.

See https://gitlab.com/openconnect/openconnect/-/issues/176#note_395207613

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'master' into 'master'
Daniel Lenski [Wed, 4 Nov 2020 00:05:06 +0000 (00:05 +0000)]
Merge branch 'master' into 'master'

Make correct TUNDEV value available to vpnc-script during pre-init

See merge request openconnect/openconnect!122

4 years agoMerge branch 'coverity' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 23:56:14 +0000 (23:56 +0000)]
Merge branch 'coverity' into 'master'

.gitlab-ci.yml: run coverity weekly with a scheduled run

See merge request openconnect/openconnect!127

4 years ago.gitlab-ci.yml: run coverity weekly with a scheduled run
Nikos Mavrogiannopoulos [Thu, 30 Jul 2020 15:19:25 +0000 (17:19 +0200)]
.gitlab-ci.yml: run coverity weekly with a scheduled run

This also fixes the image for coverity to fedora31 to avoid
gcc compatibility issues. The reason for moving to scheduled
runs is that there is a limit to coverity runs per project.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agoMerge branch 'fix_duplicate_bitfield_constant' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 22:35:11 +0000 (22:35 +0000)]
Merge branch 'fix_duplicate_bitfield_constant' into 'master'

fix duplicate bitfield constant

See merge request openconnect/openconnect!115

4 years agofix duplicate bitfield constant
Daniel Lenski [Wed, 20 May 2020 00:47:30 +0000 (17:47 -0700)]
fix duplicate bitfield constant

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'hipreport' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 22:15:16 +0000 (22:15 +0000)]
Merge branch 'hipreport' into 'master'

hipreport.sh: Vary emulated report output by platform (Windows vs. Linux)

See merge request openconnect/openconnect!129

4 years agoAdded platform name to the HIP report script
Roberto Leinardi [Wed, 5 Aug 2020 08:31:25 +0000 (10:31 +0200)]
Added platform name to the HIP report script

It is now possible to send an optional platform to the script using the
parameter `--client-os` (defaults to `Windows` if parameter is missing).

We still don't know how the Mac XML looks like so, in case the platform
value is not `Linux`, it will be always defaulted to Windows.

Signed-off-by: Roberto Leinardi <leinardi@gmail.com>
4 years agoMerge branch 'fix_CI' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:59:21 +0000 (21:59 +0000)]
Merge branch 'fix_CI' into 'master'

fix CI and coverage

See merge request openconnect/openconnect!134

4 years agore-add socket_wrapper and softhsm support to CentOS8 CI
Daniel Lenski [Thu, 21 May 2020 17:52:11 +0000 (10:52 -0700)]
re-add socket_wrapper and softhsm support to CentOS8 CI

It appears that a separate Power Tools repository needs to be enabled for `{uid,socket}_wrapper` in CentOS8.
See https://centos.pkgs.org/8/centos-powertools-x86_64/uid_wrapper-1.2.4-4.el8.x86_64.rpm.html and https://serverfault.com/questions/997896/how-to-enable-powertools-repository-in-centos-8

For softhsm, this should work per nmav: https://gitlab.com/openconnect/openconnect/-/issues/145#note_347864560

The auth-nonascii test, and DSA cert tests, are now failing again, and needs to be disabled.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoGitlab has CI images for Ubuntu 18.04, so let's include those too.
Daniel Lenski [Fri, 22 May 2020 16:39:39 +0000 (09:39 -0700)]
Gitlab has CI images for Ubuntu 18.04, so let's include those too.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agofix CI
Daniel Lenski [Wed, 14 Oct 2020 23:27:20 +0000 (16:27 -0700)]
fix CI

- dtls-psk is frequently failing; add 1-second wait AFTER tunnel interface appears
- (already merged in !128) CentOS8 now has GnuTLS with client random bug fixed (remove XFAIL_TESTS="dtls-psk")
- (already merged in !128) Fedora 32 needs crypto-policies-scripts package for update-crypto-policies to work

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'enable_insecure_CSD_submission_for_ancient_cURL_versions' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:53:03 +0000 (21:53 +0000)]
Merge branch 'enable_insecure_CSD_submission_for_ancient_cURL_versions' into 'master'

Enable insecure CSD submission for ancient cURL versions

See merge request openconnect/openconnect!125

4 years agothe -s/--silent option to cURL isn't related to cert validation; remove it from the...
Daniel Lenski [Tue, 28 Jul 2020 21:40:14 +0000 (14:40 -0700)]
the -s/--silent option to cURL isn't related to cert validation; remove it from the PINNEDPUBKEY variable

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoenable csd-wrapper.sh/csd-post.sh to run insecurely (no cert validation) for compatib...
Daniel Lenski [Tue, 28 Jul 2020 21:38:31 +0000 (14:38 -0700)]
enable csd-wrapper.sh/csd-post.sh to run insecurely (no cert validation) for compatibility with ancient cURL

cURL <7.39 doesn't have `--pinnedpubkey` option.  Falling back to insecure connection to CSD server (as we did until
4385272562d8e01166f31207938a08bec0a6fc4f) is the easiest band-aid.

CentOS 7 is affected, as described in https://lists.infradead.org/pipermail/openconnect-devel/2020-July/004886.html

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'check_address_sanity' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:33:34 +0000 (21:33 +0000)]
Merge branch 'check_address_sanity' into 'master'

Common code for check_address_sanity()

See merge request openconnect/openconnect!116

4 years agoopenconnect_make_cstp_connection should always set ssl_times.last_tx on successful...
Daniel Lenski [Fri, 26 Apr 2019 01:32:43 +0000 (20:32 -0500)]
openconnect_make_cstp_connection should always set ssl_times.last_tx on successful connection

As suggested by David Woodhouse (https://gitlab.com/openconnect/openconnect/merge_requests/35#note_163190180)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoadd comment on openconnect__inet_aton(), which is not 100% compatible with "real...
Daniel Lenski [Thu, 25 Apr 2019 16:29:06 +0000 (11:29 -0500)]
add comment on openconnect__inet_aton(), which is not 100% compatible with "real" inet_aton()

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agofactor out check_address_sanity() from gpst.c and cstp.c, and use it in oncp.c and...
Daniel Lenski [Wed, 22 May 2019 20:14:03 +0000 (13:14 -0700)]
factor out check_address_sanity() from gpst.c and cstp.c, and use it in oncp.c and pulse.c as well

Suggested by David Woodhouse: https://gitlab.com/openconnect/openconnect/merge_requests/35#note_169620281

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agogpst.c should also return -EPERM when server changes IP address, not -EINVAL
Daniel Lenski [Wed, 22 May 2019 18:55:59 +0000 (11:55 -0700)]
gpst.c should also return -EPERM when server changes IP address, not -EINVAL

(see previous commit by David Woodhouse, 24df3311ab42f062dbf1aeb7f3432dd45426e9cf, which did this for cstp.c)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoProtocols should try explicitly request the same IP addresses on reconnect, since...
Daniel Lenski [Thu, 21 Dec 2017 06:56:58 +0000 (22:56 -0800)]
Protocols should try explicitly request the same IP addresses on reconnect, since they will abort if new addresses are sent by the server.

* GlobalProtect:
  - Supported and used by official clients (POST /ssl-vpn/getconfig.esp with preferred-ip form field).
  - GlobalProtect servers often give different IP addresses on reconnect if this mechanism is *not* used,
    so this mechanism is necessary.
  - Same mechanism appears to exist for IPv6 (preferred-ipv6) and was added to OpenConnect in
    d6db0ec03394234d41fbec7ffc794ceeb486a8f0, even though IPv6 support is not yet complete.
* AnyConnect:
  - Not (yet) supported by ocserv
  - It appears that *some* AnyConnect server will try to provide the IP address provided in the X-CSTP-Address
    *request* header along with the CONNECT request, but other servers appear not to
  - This patch reproduces the behavior of GPST: attempt to request same IPv4 and IPv6 addresses on reconnect,
    via CONNECT headers.
* Juniper:
  - There does not appear to be any way to provide this using the Juniper NC protocol.
  - No known reports of Juniper servers giving out different IP address on reconnect.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'consistent_handling_of_initial_connection_errors' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:27:12 +0000 (21:27 +0000)]
Merge branch 'consistent_handling_of_initial_connection_errors' into 'master'

Consistent handling of initial connection errors

See merge request openconnect/openconnect!133

4 years agodon't switch to syslog logger until we're ready to background/daemonize
Daniel Lenski [Tue, 13 Oct 2020 02:31:38 +0000 (19:31 -0700)]
don't switch to syslog logger until we're ready to background/daemonize

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agohandle errors on initial TLS connection identically to subsequent reconnection
Daniel Lenski [Tue, 13 Oct 2020 02:26:10 +0000 (19:26 -0700)]
handle errors on initial TLS connection identically to subsequent reconnection

In order to write OpenConnect wrapper scripts that decouple the
authentication phase and tunnel phase, while caching authentication cookies,
we need to be able to reliably distinguish errors from invalid/expired
cookies from other errors. This makes that possible.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'fix_tncc_emulate.py_with_Python_3.7' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:17:42 +0000 (21:17 +0000)]
Merge branch 'fix_tncc_emulate.py_with_Python_3.7' into 'master'

fix tncc_emulate.py with Python 3.7+

Closes #152

See merge request openconnect/openconnect!120

4 years agobugfix string/binary handling
Daniel Lenski [Mon, 8 Jun 2020 16:44:51 +0000 (09:44 -0700)]
bugfix string/binary handling

See https://gitlab.com/openconnect/openconnect/-/merge_requests/120#note_356905574

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agofix tncc_emulate.py with Python 3.7
Daniel Lenski [Fri, 5 Jun 2020 19:14:53 +0000 (12:14 -0700)]
fix tncc_emulate.py with Python 3.7

Fingerprint-checking monkey-patch for SSLSocket needs to be refined to work with Python 3.7+

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'explain_why_form_entry_should_not_be_used_for_passwords' into 'master'
Daniel Lenski [Tue, 3 Nov 2020 21:04:06 +0000 (21:04 +0000)]
Merge branch 'explain_why_form_entry_should_not_be_used_for_passwords' into 'master'

explain why --form-entry shouldn't be used for passwords

See merge request openconnect/openconnect!123

4 years agoexplain why --form-entry shouldn't be used for passwords
Daniel Lenski [Wed, 22 Jul 2020 17:15:29 +0000 (10:15 -0700)]
explain why --form-entry shouldn't be used for passwords

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoMerge branch 'tmp-fix-tests' into 'master'
Nikos Mavrogiannopoulos [Tue, 3 Nov 2020 20:53:27 +0000 (20:53 +0000)]
Merge branch 'tmp-fix-tests' into 'master'

.gitlab-ci.yml: fixed failing tests and update to fedora 33

Closes #189

See merge request openconnect/openconnect!128

4 years ago.gitlab-ci.yml: updated to fedora33
Nikos Mavrogiannopoulos [Sat, 31 Oct 2020 12:01:47 +0000 (13:01 +0100)]
.gitlab-ci.yml: updated to fedora33

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agognutls: try multiple hashes when checking for pub/priv key match
Nikos Mavrogiannopoulos [Sat, 31 Oct 2020 11:58:55 +0000 (12:58 +0100)]
gnutls: try multiple hashes when checking for pub/priv key match

This also ensures that we don't take into account the state of the
algorithm (e.g., marked as insecure), because it does matter for
checking whether the keys match.

Resolves: #189

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years ago.gitlab-ci.yml: fix on fedora32
Nikos Mavrogiannopoulos [Thu, 30 Jul 2020 19:25:07 +0000 (21:25 +0200)]
.gitlab-ci.yml: fix on fedora32

Previously a change in Fedora release would result to several weeks or
months of broken CI. Fix on a specific version so that the CI is stable,
even if that comes at the cost of a manual update of the fedora CI.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years ago.mailmap: set gmail as primary email of Nikos
Nikos Mavrogiannopoulos [Thu, 30 Jul 2020 19:22:14 +0000 (21:22 +0200)]
.mailmap: set gmail as primary email of Nikos

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agoFixed failing tests
Nikos Mavrogiannopoulos [Thu, 30 Jul 2020 19:21:04 +0000 (21:21 +0200)]
Fixed failing tests

This removes dtls-psk from XFAIL in centos8 as it is no longer applicable,
adds crypto policies script from missing targets, and checks for both
devices prior to adding routes in dtls-psk.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
4 years agoMake correct TUNDEV value available to vpnc-script during pre-init
Steven Luo [Mon, 15 Jun 2020 06:28:23 +0000 (23:28 -0700)]
Make correct TUNDEV value available to vpnc-script during pre-init

This makes it possible for a privileged vpnc-script pre-init hook to
create the tun device before an unprivileged openconnect process tries
to use it.

Signed-off-by: Steven Luo <steven@steven676.net>
4 years agoFix Signed-off-by CI check
David Woodhouse [Mon, 18 May 2020 18:18:30 +0000 (19:18 +0100)]
Fix Signed-off-by CI check

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoMerge branch 'add_set_cookie' of gitlab.com:randymoss/openconnect
David Woodhouse [Fri, 15 May 2020 16:06:31 +0000 (17:06 +0100)]
Merge branch 'add_set_cookie' of gitlab.com:randymoss/openconnect

4 years agoAdd `openconnect_set_cookie` function to library and jni
Randy Moss [Fri, 15 May 2020 16:04:53 +0000 (16:04 +0000)]
Add `openconnect_set_cookie` function to library and jni
Signed-off-by: Randy Moss <kasaxet794@homedepinst.com>
4 years agoAdd missing files to tarball for win32 build
Justin Kendrick [Thu, 14 May 2020 21:56:25 +0000 (16:56 -0500)]
Add missing files to tarball for win32 build

Fixes building from distribution tarball on win32/mingw.

Makefile.am: Include win32-ipicmp.h and openconnect.ico in tarball

Signed-off-by: Justin Kendrick <justin@kendrick.tech>
4 years agoCheck for Signed-off-by: in CI
David Woodhouse [Fri, 15 May 2020 13:00:39 +0000 (14:00 +0100)]
Check for Signed-off-by: in CI

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoRun Coverity only in openconnect/openconnect repo
David Woodhouse [Fri, 15 May 2020 12:33:56 +0000 (13:33 +0100)]
Run Coverity only in openconnect/openconnect repo

It won't work in someone else's master branch if they've forked the repo.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoUpdate packages documentation
David Woodhouse [Fri, 15 May 2020 10:32:14 +0000 (11:32 +0100)]
Update packages documentation

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoRemove Fedora updates-testing packages now pushed to stable
David Woodhouse [Fri, 15 May 2020 09:34:31 +0000 (10:34 +0100)]
Remove Fedora updates-testing packages now pushed to stable

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoWork around SoftHSM lockup in CI
David Woodhouse [Fri, 15 May 2020 09:31:27 +0000 (10:31 +0100)]
Work around SoftHSM lockup in CI

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoFix COPR release builds for mingw-openconnect
David Woodhouse [Thu, 14 May 2020 18:51:07 +0000 (19:51 +0100)]
Fix COPR release builds for mingw-openconnect

For release builds, the tarball contents still don't have the default
name; we need to explicitly state that it's openconnect-%{version}

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoTag version 8.10 v8.10
David Woodhouse [Thu, 14 May 2020 15:46:24 +0000 (16:46 +0100)]
Tag version 8.10

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoUpdate changelog
David Woodhouse [Thu, 14 May 2020 15:27:43 +0000 (16:27 +0100)]
Update changelog

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoMerge branch 'bug721570' of gitlab.com:floppym/openconnect
David Woodhouse [Thu, 14 May 2020 15:09:14 +0000 (16:09 +0100)]
Merge branch 'bug721570' of gitlab.com:floppym/openconnect

4 years agoBump Android API level to 23 to allow it to run on Android 10
David Woodhouse [Thu, 14 May 2020 13:28:21 +0000 (14:28 +0100)]
Bump Android API level to 23 to allow it to run on Android 10

Nobody cares about older API versions, which would only be needed
to support Android versions older than 6.0.

cf. https://gitlab.com/openconnect/openconnect/-/merge_requests/92

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoUpdate Android dependencies
David Woodhouse [Thu, 14 May 2020 11:56:46 +0000 (12:56 +0100)]
Update Android dependencies

Update GnuTLS, libxml2, nettle, gmp and lz4

Based on a patch from Severus <huynhok.uit@gmail.com>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoMerge branch 'Juniper_frmNextToken_submit_button' of gitlab.com:openconnect/openconnect
David Woodhouse [Thu, 14 May 2020 11:18:41 +0000 (12:18 +0100)]
Merge branch 'Juniper_frmNextToken_submit_button' of gitlab.com:openconnect/openconnect

4 years agoMerge branch 'GP_stop_asking_to_report_unexpected_arg19=4' of gitlab.com:openconnect...
David Woodhouse [Thu, 14 May 2020 11:09:31 +0000 (12:09 +0100)]
Merge branch 'GP_stop_asking_to_report_unexpected_arg19=4' of gitlab.com:openconnect/openconnect

4 years agoMerge branch 'do_not_strip_newlines_in_CSD_response' of gitlab.com:dlenski/openconnect
David Woodhouse [Thu, 14 May 2020 10:50:07 +0000 (11:50 +0100)]
Merge branch 'do_not_strip_newlines_in_CSD_response' of gitlab.com:dlenski/openconnect

4 years agoget rid of a bunch of casts
Daniel Lenski [Wed, 13 May 2020 05:20:24 +0000 (22:20 -0700)]
get rid of a bunch of casts

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agostop asking users to report unexpected GP login argument arg[20]="unknown"
Daniel Lenski [Fri, 1 May 2020 18:49:25 +0000 (11:49 -0700)]
stop asking users to report unexpected GP login argument arg[20]="unknown"

We don't know what this one means, but newer GP servers always send it and it's basically uninteresting.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agognutls: prevent buffer overflow in get_cert_name
Sergei Trofimovich [Fri, 8 May 2020 14:39:41 +0000 (10:39 -0400)]
gnutls: prevent buffer overflow in get_cert_name

The test suite for ocserv calls openconnect with a certificate that has
a name that is 84 bytes in length. The buffer passed to get_cert_name is
currently 80 bytes.

The gnutls_x509_crt_get_dn_by_oid function will update the buffer size
parameter if the buffer is too small.

http://man7.org/linux/man-pages/man3/gnutls_x509_crt_get_dn_by_oid.3.html

RETURNS
       GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long
       enough, and in that case the  buf_size will be updated with the
       required size. GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if there are no
       data in the current index. On success 0 is returned.

Use a temporary variable to avoid clobbering the namelen variable that is
passed to get_cert_name.

Bug: https://bugs.gentoo.org/721570
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
4 years agoJuniper frmNextToken: recognize secidactionEnter as submit button
Daniel Lenski [Thu, 7 May 2020 16:12:09 +0000 (09:12 -0700)]
Juniper frmNextToken: recognize secidactionEnter as submit button

ping #137

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoDisable OpenSSL RDRAND in COPR tests to work around SoftHSM deadlock
David Woodhouse [Thu, 7 May 2020 14:17:37 +0000 (15:17 +0100)]
Disable OpenSSL RDRAND in COPR tests to work around SoftHSM deadlock

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoFix name of tpm2-tss-engine
David Woodhouse [Thu, 7 May 2020 09:42:57 +0000 (10:42 +0100)]
Fix name of tpm2-tss-engine

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoAlso disable cURL's use of HTTP/1.1 expect logic
Daniel Lenski [Wed, 6 May 2020 22:05:00 +0000 (15:05 -0700)]
Also disable cURL's use of HTTP/1.1 expect logic

This is only a useful optimization for large payloads, and seems to confuse some Cisco ASAs or middleboxes.

See https://gms.tf/when-curl-sends-100-continue.html#disabling-expect-logic

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agosome ASAs are confused by stripping newlines from CSD response
Daniel Lenski [Wed, 6 May 2020 19:15:42 +0000 (12:15 -0700)]
some ASAs are confused by stripping newlines from CSD response

See #139 for report of this.

Using `curl --data-binary` instead of `--data` should avoid this issue.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
4 years agoFix up COPR specfiles for bash-completion script location
David Woodhouse [Mon, 4 May 2020 15:27:46 +0000 (16:27 +0100)]
Fix up COPR specfiles for bash-completion script location

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoMerge branch 'bash-completion' of gitlab.com:bluca/openconnect
David Woodhouse [Mon, 4 May 2020 12:50:38 +0000 (13:50 +0100)]
Merge branch 'bash-completion' of gitlab.com:bluca/openconnect

4 years agoUse shorter pathname for COPR RPM build
David Woodhouse [Mon, 4 May 2020 10:56:36 +0000 (11:56 +0100)]
Use shorter pathname for COPR RPM build

If the path of SOCKET_WRAPPER_DIR is too long, it doesn't fit in the
sun_path field of the sockaddr_un, and libsocket_wrapper gets very
unhappy, reporting 'Too many unix sockets'. Despite actually only ever
trying *one* path over and over again 1024 times due to truncation.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoInstall tncc-emulate.py too
Luca Boccassi [Sat, 2 May 2020 10:58:05 +0000 (11:58 +0100)]
Install tncc-emulate.py too

Signed-off-by: Luca Boccassi <bluca@debian.org>
4 years agoFix typo in autocomplete test log message
Luca Boccassi [Sat, 2 May 2020 10:57:14 +0000 (11:57 +0100)]
Fix typo in autocomplete test log message

Signed-off-by: Luca Boccassi <bluca@debian.org>
4 years agoBash completion: install as /usr/share/bash-completion/completions/openconnect
Luca Boccassi [Sat, 2 May 2020 10:53:37 +0000 (11:53 +0100)]
Bash completion: install as /usr/share/bash-completion/completions/openconnect

This is the common default installation pattern for quite some time

Signed-off-by: Luca Boccassi <bluca@debian.org>