]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
3 years agoTag version 9.01 v9.01
David Woodhouse [Fri, 29 Apr 2022 21:19:46 +0000 (22:19 +0100)]
Tag version 9.01

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoChangelog for API minor fix
David Woodhouse [Fri, 29 Apr 2022 21:18:44 +0000 (22:18 +0100)]
Changelog for API minor fix

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoBump OPENCONNECT_API_VERSION_MINOR
David Woodhouse [Fri, 29 Apr 2022 16:32:12 +0000 (17:32 +0100)]
Bump OPENCONNECT_API_VERSION_MINOR

Oops, I thought that was all automated...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoTag version 9.00 v9.00
David Woodhouse [Fri, 29 Apr 2022 15:43:16 +0000 (16:43 +0100)]
Tag version 9.00

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAdd changelog entry for SAML/SSO
David Woodhouse [Fri, 29 Apr 2022 15:42:22 +0000 (16:42 +0100)]
Add changelog entry for SAML/SSO

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'autoconf' into 'master'
David Woodhouse [Fri, 29 Apr 2022 12:13:40 +0000 (12:13 +0000)]
Merge branch 'autoconf' into 'master'

AC_PROG_CC_C99 / AC_TRY_COMPILE are obsolete starting with autoconf 2.70

Closes #413

See merge request openconnect/openconnect!369

3 years agoImplement a function openconnect_set_useragent
Ambroise Rosset [Fri, 29 Apr 2022 11:14:32 +0000 (13:14 +0200)]
Implement a function openconnect_set_useragent

Implement a function openconnect_set_useragent to allow external
programme that use libopenconnect to start a VPN (like NetworkManager)
to tune the Useragent of the connection like the option --useragent do.

If they only tune the useragent agent name by the variable passed
through the opeconnect_vpninfo_new function, the version number of
openconnect is automatically added after the string choosed.

Signed-off-by: Ambroise Rosset <earendil@toleressea.fr>
3 years agoAdd missing host-cpu-c-abi.m4
Dimitri Papadopoulos [Thu, 28 Apr 2022 12:20:45 +0000 (14:20 +0200)]
Add missing host-cpu-c-abi.m4

This M4 file is a dependency of lib-prefix.m4.

Fixes this Autoconf warning:
warning: gl_HOST_CPU_C_ABI_32BIT is m4_require'd but not m4_defun'd

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoAC_TRY_COMPILE is obsolete starting with autoconf 2.70
Dimitri Papadopoulos [Thu, 28 Apr 2022 12:04:08 +0000 (14:04 +0200)]
AC_TRY_COMPILE is obsolete starting with autoconf 2.70

AC_COMPILE_IFELSE has been around since autoconf 2.50 at least,
according to "18.6.5 AC_ACT_IFELSE vs. AC_TRY_ACT":
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/html_node/AC_005fACT_005fIFELSE-vs-AC_005fTRY_005fACT.html#AC_005fFOO_005fIFELSE-vs-AC_005fTRY_005fFOO

Since Autoconf 2.50, internal codes uses
AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and AC_RUN_IFELSE
on one hand and
AC_LANG_SOURCE, and AC_LANG_PROGRAM
on the other hand instead of the deprecated
AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK, and AC_TRY_RUN.

Fixes this Autoconf warning:
warning: The macro `AC_TRY_COMPILE' is obsolete.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoUpdate m4 files
Dimitri Papadopoulos [Thu, 28 Apr 2022 08:03:04 +0000 (10:03 +0200)]
Update m4 files

m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
  the latest versions from gnulib

acinclude.m4 → m4/ax_jni_include_dir.m4
  the latest release 2022.02.11 from the Autoconf Archive

acinclude.m4 → as-compiler-flag.m4
  copied as is because the origin of this file is unclear
  it is different from the latest version in the Autostar Sandbox

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoArguments should be enclosed within ‘[’ and ‘]’
Dimitri Papadopoulos [Wed, 27 Apr 2022 18:45:24 +0000 (20:45 +0200)]
Arguments should be enclosed within ‘[’ and ‘]’

As enforced by autopudate, see 3.1.2 The Autoconf Language:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/html_node/Autoconf-Language.html

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoAC_PROG_CC_C99 is obsolete starting with autoconf 2.70
Dimitri Papadopoulos [Wed, 27 Apr 2022 18:39:46 +0000 (20:39 +0200)]
AC_PROG_CC_C99 is obsolete starting with autoconf 2.70

Fixes this Autoconf warning:
warning: The macro `AC_PROG_CC_C99' is obsolete.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoNo need to support RHEL 5
Dimitri Papadopoulos [Fri, 29 Apr 2022 09:10:50 +0000 (11:10 +0200)]
No need to support RHEL 5

It is EOL'ed and we don't build on it.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoDo not ignore 0.0.0.0/0 specified as a "split"-{in,ex}clude route for oNCP
Daniel Lenski [Thu, 20 May 2021 00:01:01 +0000 (00:01 +0000)]
Do not ignore 0.0.0.0/0 specified as a "split"-{in,ex}clude route for oNCP

This addresses https://gitlab.com/openconnect/openconnect/-/issues/245. In the case
presented there, the oNCP server sends a Legacy IP netmask ("default route") of
255.255.255.255, and a "split"-include route of 0.0.0.0/0.0.0.0:

> Received split include route 0.0.0.0/0.0.0.0
> Received netmask 255.255.255.255

We also should not ignore 0.0.0.0/0 if specified as a "split"-exclude route, though
the purpose of such a route is unclear and we have never seen one in the wild.

Next, we should handle this case in the same way that we do for GlobalProtect,
as of https://gitlab.com/openconnect/openconnect/-/merge_requests/118; namely,
by replacing the 255.255.255.255 netmask with the 0.0.0.0/0 send as a "split"-include,
and removing the latter from the list of split-includes.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
3 years agoobs: add a strict versioned dependency from openconnect to libopenconnect5
Luca Boccassi [Thu, 28 Apr 2022 21:38:47 +0000 (22:38 +0100)]
obs: add a strict versioned dependency from openconnect to libopenconnect5

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoMerge branch 'fortinet_split_excludes' of gitlab.com:openconnect/openconnect
David Woodhouse [Thu, 28 Apr 2022 21:14:50 +0000 (22:14 +0100)]
Merge branch 'fortinet_split_excludes' of gitlab.com:openconnect/openconnect

3 years agoAdd missing export-strings.sh
David Woodhouse [Thu, 28 Apr 2022 21:09:21 +0000 (22:09 +0100)]
Add missing export-strings.sh

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoResync translations with sources
David Woodhouse [Thu, 28 Apr 2022 21:04:13 +0000 (22:04 +0100)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'scootergrisen-master-patch-59421' of gitlab.com:DimitriPapadopoulos...
David Woodhouse [Thu, 28 Apr 2022 21:03:58 +0000 (22:03 +0100)]
Merge branch 'scootergrisen-master-patch-59421' of gitlab.com:DimitriPapadopoulos/openconnect

3 years agoImport translations from GNOME
David Woodhouse [Thu, 28 Apr 2022 21:03:54 +0000 (22:03 +0100)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'obs' of gitlab.com:bluca/openconnect
David Woodhouse [Thu, 28 Apr 2022 21:01:04 +0000 (22:01 +0100)]
Merge branch 'obs' of gitlab.com:bluca/openconnect

3 years agoMerge branch 'codespell' of gitlab.com:DimitriPapadopoulos/openconnect
David Woodhouse [Thu, 28 Apr 2022 20:59:46 +0000 (21:59 +0100)]
Merge branch 'codespell' of gitlab.com:DimitriPapadopoulos/openconnect

3 years agoFix setsockopt(SO_REUSEADDR) warnings
David Woodhouse [Thu, 28 Apr 2022 19:52:26 +0000 (20:52 +0100)]
Fix setsockopt(SO_REUSEADDR) warnings

Coverity didn't like that we were ignoring the return value, and the mingw
build didnt like that the optval pointer is (unsigned char *) on Windows.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoFix potential leak of cookie_buf on error path
David Woodhouse [Thu, 28 Apr 2022 18:44:39 +0000 (19:44 +0100)]
Fix potential leak of cookie_buf on error path

Spotted by Coverity.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAllow gmp without pkgconfig
David Woodhouse [Thu, 28 Apr 2022 18:44:00 +0000 (19:44 +0100)]
Allow gmp without pkgconfig

The MinGW builds seem to have it like this. Now HPKE works on Windows
(although I haven't worked out how to spawn the browser)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoOnly abort on certificate fail for CERT2_REQUESTED
David Woodhouse [Thu, 28 Apr 2022 14:30:59 +0000 (15:30 +0100)]
Only abort on certificate fail for CERT2_REQUESTED

Some servers seem to request the first certificate even when it isn't
needed. Don't abort XML mode for that.

Fixes: #417
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoRevert "GP: Fix the issue of a 0.0.0.0/0 "split"-include route by swapping the "split...
David Woodhouse [Mon, 25 Apr 2022 09:25:20 +0000 (10:25 +0100)]
Revert "GP: Fix the issue of a 0.0.0.0/0 "split"-include route by swapping the "split" route with the default netmask."

This reverts commit 99ae55aec1408a2905df72394dab99cb6fb41aed, which causes
regressions with existing NetworkManager-openconnect releases.

We can do it in NetworkManager-openconnect with
https://gitlab.gnome.org/GNOME/NetworkManager-openconnect/-/merge_requests/36

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoobs: switch version format to 'tag+n_commits_over_tag+gHASH'
Luca Boccassi [Wed, 27 Apr 2022 13:24:49 +0000 (14:24 +0100)]
obs: switch version format to 'tag+n_commits_over_tag+gHASH'

Note that this is just a copy of the configuration, the OBS
package is maintained on OBS.

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoChange "openconnect" to "OpenConnect"
Dimitri Papadopoulos [Tue, 26 Apr 2022 13:19:00 +0000 (15:19 +0200)]
Change "openconnect" to "OpenConnect"

To be consistent with the way it is written in similar strings.

@scootergrisen, thank you for the original patch against NetworkManager-openconnect.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoobs workflow: trigger release repository rebuilds when a tag is pushed
Luca Boccassi [Mon, 25 Apr 2022 15:27:02 +0000 (17:27 +0200)]
obs workflow: trigger release repository rebuilds when a tag is pushed

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agowww: link OBS setup instructions in packages.xml
Luca Boccassi [Thu, 21 Apr 2022 10:35:25 +0000 (12:35 +0200)]
www: link OBS setup instructions in packages.xml

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agowww: remove link to PPA, not updated anymore
Luca Boccassi [Thu, 21 Apr 2022 10:26:52 +0000 (12:26 +0200)]
www: remove link to PPA, not updated anymore

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoAdd changelog for STRAP
David Woodhouse [Sat, 23 Apr 2022 16:14:49 +0000 (17:14 +0100)]
Add changelog for STRAP

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAlways send STRAP pubkey even when we don't change it
David Woodhouse [Fri, 22 Apr 2022 22:17:16 +0000 (23:17 +0100)]
Always send STRAP pubkey even when we don't change it

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMake all STRAP support conditional on HPKE
David Woodhouse [Fri, 22 Apr 2022 16:02:08 +0000 (17:02 +0100)]
Make all STRAP support conditional on HPKE

We really don't care about STRAP; we only did it for the external browser
support. The only case we've seen STRAP failing is when we *did* advertise
it and then didn't really do it, so omitting it completely seems harmless
for now.

And older GnuTLS such as on CentOS doesn't have some of the functions we
are using to obtain the Finished message or export the privkey, so just
disable it all. We *could* support the basic STRAP from GnuTLS 3.4.0 on
but there's not a lot of point.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoSilence static-analyser warning about redundant assignment to 'sep'
David Woodhouse [Fri, 22 Apr 2022 15:14:17 +0000 (16:14 +0100)]
Silence static-analyser warning about redundant assignment to 'sep'

I did this for a reason. The *compiler* is clever enough not to bother
actually doing the assignment (not that it would matter anyway, since it
is hardly a fast path). But *developers*, including myself, are much less
likely to spot that it needs to be added in the 'deflate' case if we add
a new case at the end. So now in order to shut the tools up, I have to
turn a non-bug into a latent *actual* bug.

I suppose I could leave it there with a comment, or refactor it into a
loop over tuples of the form { COMPR_LZ4, "oc-lz4" }…  but it probably
doesn't matter as we're unlikely to be adding more. Just suck it up.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoRevert "append_compr_types: removed unnecessary assignment"
David Woodhouse [Fri, 22 Apr 2022 14:43:19 +0000 (15:43 +0100)]
Revert "append_compr_types: removed unnecessary assignment"

This reverts commit 3cde372235c0616e4769a09dd8774b6fb2c95209.

The assignment *was* necessary. The point was that the first time 'sep'
was used, it's a space. And *after* that, it's a comma. Using a comma
every time ends up sending headers which look like this:
  X-DTLS-Accept-Encoding:,lzs

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoExport STRAP private key with AnyConnect cookie
David Woodhouse [Fri, 22 Apr 2022 14:39:14 +0000 (15:39 +0100)]
Export STRAP private key with AnyConnect cookie

For STRAP we need to reconnect using the same private key as the auth
process did. Thankfully we already have precedent for this; we can put
multiple 'cookies' into the opaque string that is passed from auth to
connection process, and use internal_split_cookies() to parse them.

So encode the privkey into an 'openconnect_strapkey' cookie which we
handle specially on ingestion.

Fix up a few places where vpninfo->cookie was handled directly, to make
it all work.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAttempt to implement AnyConnect Session Token Re-use Anchor Protocol (STRAP)
David Woodhouse [Thu, 21 Apr 2022 21:14:00 +0000 (22:14 +0100)]
Attempt to implement AnyConnect Session Token Re-use Anchor Protocol (STRAP)

In order to implement the external-browser SAML support we had to send
the X-AnyConnect-STRAP-Pubkey: header, even though we didn't really know
what that was.

That turns out to cause a regression for some user (issue #410), as the
server then rejects us we don't include a valid X-AnyConnect-STRAP-Verify:
header in our CONNECT request.

That header is supposed to contain our Finished message from the TLS
handshake, hashed and signed with our STRAP-Pubkey. Or if we rekey, it's
a signed hash of the Finished message concatenated with the (DER) public
key that we also send in a new X-AnyConnect-STRAP-Pubkey: header.

Lightly tested, as we can't actually work out how to make *our* servers
reject the connections for this offence, and Cisco's documentation is
very sparse. But it shouldn't make things worse for anyone.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoFix typo found by codespell
Dimitri Papadopoulos [Thu, 21 Apr 2022 00:29:36 +0000 (02:29 +0200)]
Fix typo found by codespell

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoImport translations from GNOME
David Woodhouse [Thu, 21 Apr 2022 08:16:43 +0000 (09:16 +0100)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoFix lost translations for PRId64 → PRIu64 change
David Woodhouse [Thu, 21 Apr 2022 08:15:17 +0000 (09:15 +0100)]
Fix lost translations for PRId64 → PRIu64 change

When we make changes like this, we should fix the translations too, to avoid
losing them.

Fixes: 7d8747806c ("The format specifier for uint64_t is PRIu64")
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'GP_internal_no_flag_for_issue_246' into 'master'
Daniel Lenski [Wed, 20 Apr 2022 23:30:38 +0000 (23:30 +0000)]
Merge branch 'GP_internal_no_flag_for_issue_246' into 'master'

GP: add 'internal=no' flag to the login and configuration requests

See merge request openconnect/openconnect!337

3 years agoUpdate changelog
Daniel Lenski [Fri, 8 Apr 2022 03:43:00 +0000 (20:43 -0700)]
Update changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
3 years agoGP: add 'internal=no' flag to the login and configuration requests
Daniel Lenski [Fri, 11 Feb 2022 18:13:46 +0000 (10:13 -0800)]
GP: add 'internal=no' flag to the login and configuration requests

Without these flags, one user reports consistently hitting the "Matching
client config not found" error in response to the /ssl-vpn/getconfig.esp
request.  See https://gitlab.com/openconnect/openconnect/-/issues/246

I *suspect* that 'internal=no' is the implicit default if unspecified
(https://gitlab.com/openconnect/openconnect/-/issues/246#note_836128670),
but we should get more testing on other GlobalProtect VPNs to confirm that
this works fine with them. If there is variation in whether this parameter
is allowed/expected, then we need a way to automatically detect the correct
value.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
3 years agoFix initial client request XML structure when announcing multicert capability
Daniel Lenski [Wed, 20 Apr 2022 03:43:27 +0000 (20:43 -0700)]
Fix initial client request XML structure when announcing multicert capability

Having a separate 'announce_multicert_capability' function wasn't ideal:

1. Building the initial '<config-auth>' XML was more spread out and complex
   than necessary due to an extra layer of functions.
2. When multicert auth is offered by the client, the resultant XML actually
   contained *two* nested capabilities/auth-method tags:

       <config-auth client="vpn" type="init">
         <capabilities>
           <auth-method>single-sign-on</auth-method>
           <auth-method>single-sign-on-v2</auth-method>
         </capabilities>
         <capabilities>
           <auth-method>multiple-cert</auth-method>
         </capabilities>
       </config-auth>

What Cisco clients appear to send is a *single* '<capabilities>' tag
containing multiple '<auth-method>', as shown in the MITM capture in the
comments of
f51ecb36bedcd370086586295978627daeabade4 ("Converse the multiple certificate authentication (multicert) protocol."),
which introduced this structural mistake.

With the non-repeated '<capabilities>' tag, we can also fix the multicert
auth tests, where the check that the client was offering multicert was
disabled in
45da3b07dfc8f808e7b0d0bf80fbf7e73b1b0721 ("fake-cisco-server.py: Disable check for `multiple-cert` support"),
probably due to confusion over the XML structure and xmltodict's handling
of it.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
3 years agoMerge branch 'DWORD_PRId32_PRIo32' into 'master'
David Woodhouse [Wed, 20 Apr 2022 15:54:20 +0000 (15:54 +0000)]
Merge branch 'DWORD_PRId32_PRIo32' into 'master'

MinGW warning: the format specifier for DWORD is "%lu"

Closes #365

See merge request openconnect/openconnect!361

3 years agoMerge branch 'field_precision_specifier_expects_int' into 'master'
David Woodhouse [Wed, 20 Apr 2022 15:54:01 +0000 (15:54 +0000)]
Merge branch 'field_precision_specifier_expects_int' into 'master'

MinGW warning: field precision specifier '.*' expects argument of type 'int'

See merge request openconnect/openconnect!362

3 years agoThe format specifier for uint64_t is PRIu64
Dimitri Papadopoulos [Wed, 20 Apr 2022 11:22:04 +0000 (13:22 +0200)]
The format specifier for uint64_t is PRIu64

Switch from PRId64 (int64_t) to PRIu64 (uint64_t).

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoThe format specifier for DWORD is "%lu"
Dimitri Papadopoulos [Wed, 20 Apr 2022 10:43:06 +0000 (12:43 +0200)]
The format specifier for DWORD is "%lu"

DWORD is unsigned, so PRIu32 would be the proper format specifier for
DWORD, not PRId32. Except DWORD is defined as 'unsigned long int', while
PRIu32 is defined as u, and "%u" is the format specifier for 'unsigned int'.

What a mess! It looks like the only viable format specifier is "%lu".

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoFix MinGW compiler warning
Dimitri Papadopoulos [Wed, 20 Apr 2022 11:22:04 +0000 (13:22 +0200)]
Fix MinGW compiler warning

The compiler warning is:
field precision specifier '.*' expects argument of type 'int'

So we cast '(c - _pgmptr + 1)' from ptrdiff_t (long long int) to int.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoMerge branch 'align' into 'master'
David Woodhouse [Wed, 20 Apr 2022 10:16:16 +0000 (10:16 +0000)]
Merge branch 'align' into 'master'

Align output of openconnect --help

See merge request openconnect/openconnect!360

3 years agoAlign output of openconnect --help
Dimitri Papadopoulos [Tue, 19 Apr 2022 17:14:35 +0000 (19:14 +0200)]
Align output of openconnect --help

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoUse 'open' to spawn browser on OSX
David Woodhouse [Mon, 18 Apr 2022 21:37:05 +0000 (22:37 +0100)]
Use 'open' to spawn browser on OSX

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'master' of gitlab.com:openconnect/openconnect
David Woodhouse [Mon, 18 Apr 2022 19:32:49 +0000 (20:32 +0100)]
Merge branch 'master' of gitlab.com:openconnect/openconnect

3 years agoImport translations from GNOME
David Woodhouse [Mon, 18 Apr 2022 19:32:09 +0000 (20:32 +0100)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'vhost-portable' of gitlab.com:openconnect/openconnect
David Woodhouse [Mon, 18 Apr 2022 14:42:06 +0000 (15:42 +0100)]
Merge branch 'vhost-portable' of gitlab.com:openconnect/openconnect

3 years agoAttempt to make posix_spawn() work on OSX
David Woodhouse [Mon, 18 Apr 2022 14:38:57 +0000 (15:38 +0100)]
Attempt to make posix_spawn() work on OSX

Fixes: #409
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'obs' into 'master'
David Woodhouse [Sat, 16 Apr 2022 07:55:34 +0000 (07:55 +0000)]
Merge branch 'obs' into 'master'

OBS: remove ancient requires on vpnc from RPM

See merge request openconnect/openconnect!359

3 years agoFix hogweed/gmp library linkage for HPKE by actually using $(HPKE_LIBS)
David Woodhouse [Sat, 16 Apr 2022 06:25:29 +0000 (07:25 +0100)]
Fix hogweed/gmp library linkage for HPKE by actually using $(HPKE_LIBS)

I can't type HPKE or HKDF reliably. Fix a different random combination of
letters that escaped my fingers.

Fixes: 02ca865d ("Add GnuTLS crypto support for HPKE") and hopefully #409
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoImport translations from GNOME
David Woodhouse [Fri, 15 Apr 2022 19:46:41 +0000 (20:46 +0100)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoReduce the 'bus factor' for translation sync a bit
David Woodhouse [Fri, 15 Apr 2022 12:25:46 +0000 (13:25 +0100)]
Reduce the 'bus factor' for translation sync a bit

This is mostly just what NMo's import-strings.sh does, but now
it's a bit more obvious and accessible for other OpenConnect
developers.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoOBS: remove ancient requires on vpnc from RPM
Luca Boccassi [Thu, 14 Apr 2022 18:52:53 +0000 (20:52 +0200)]
OBS: remove ancient requires on vpnc from RPM

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoIncrease server delay for fake server tests
David Woodhouse [Thu, 14 Apr 2022 15:36:31 +0000 (16:36 +0100)]
Increase server delay for fake server tests

Doesn't look like 1 second is enough of a delay in all cases.
Increase it and hopefully the tests will stop being so flaky.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'obs' of gitlab.com:bluca/openconnect
David Woodhouse [Thu, 14 Apr 2022 15:26:57 +0000 (16:26 +0100)]
Merge branch 'obs' of gitlab.com:bluca/openconnect

3 years agoMerge branch 'errors' into 'master'
David Woodhouse [Thu, 14 Apr 2022 15:24:28 +0000 (15:24 +0000)]
Merge branch 'errors' into 'master'

Fix Linux kernel coding style error and warnings reported by checkpatch.pl

See merge request openconnect/openconnect!357

3 years agoobs: remove libpskc-dev dependency from libopenconnect-dev
Luca Boccassi [Thu, 14 Apr 2022 13:57:12 +0000 (15:57 +0200)]
obs: remove libpskc-dev dependency from libopenconnect-dev

It is not available on older Ubuntu releases, it is only needed to make
pkg-config work correctly, but it can be installed manually

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoobs workflow: add xdg-utils build-dep on openconnect.dsc too
Luca Boccassi [Thu, 14 Apr 2022 11:30:52 +0000 (13:30 +0200)]
obs workflow: add xdg-utils build-dep on openconnect.dsc too

Due to <reasons> we need to duplicate the list of build deps for Debian builds.

https://gitlab.com/openconnect/openconnect/-/commit/9b5a9e004af579bd3b24e115061fb99c94504bce
added this package to .obs/debian/control, also add it to .obs/openconnect.dsc

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoMerge branch 'insecure-openssl' into 'master'
David Woodhouse [Wed, 13 Apr 2022 08:05:23 +0000 (08:05 +0000)]
Merge branch 'insecure-openssl' into 'master'

openssl: allow ALL ciphers when allow-insecure-crypto is enabled

See merge request openconnect/openconnect!355

3 years agoFix Linux kernel coding style error and warnings
Dimitri Papadopoulos [Tue, 12 Apr 2022 19:31:01 +0000 (21:31 +0200)]
Fix Linux kernel coding style error and warnings

open brace '{' following struct go on the same line
open brace '{' following function definitions go on the next line

"(foo*)" should be "(foo *)"
"foo * bar" should be "foo *bar"
sizeof foo should be sizeof(foo)

quoted string split across lines

please, no space before tabs
Statements should start on a tabstop

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
3 years agoMerge branch 'master' of gitlab.com:openconnect/openconnect
David Woodhouse [Tue, 12 Apr 2022 13:07:34 +0000 (15:07 +0200)]
Merge branch 'master' of gitlab.com:openconnect/openconnect

3 years agoAdd xdg-utils for xdg-open (default external browser)
David Woodhouse [Tue, 12 Apr 2022 13:05:12 +0000 (15:05 +0200)]
Add xdg-utils for xdg-open (default external browser)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'errors' into 'master'
David Woodhouse [Tue, 12 Apr 2022 10:04:54 +0000 (10:04 +0000)]
Merge branch 'errors' into 'master'

Improve error reporting

See merge request openconnect/openconnect!319

3 years agofake-cisco-server.py: Disable check for `multiple-cert` support
David Woodhouse [Tue, 12 Apr 2022 09:56:26 +0000 (11:56 +0200)]
fake-cisco-server.py: Disable check for `multiple-cert` support

Now we support SSO, there are *multiple* auth-method nodes, not just one.
We should check that *one* of them contains 'multiple-cert'. Comment it
out for now.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoMerge branch 'multicert' of gitlab.com:openconnect/openconnect
David Woodhouse [Tue, 12 Apr 2022 09:05:46 +0000 (11:05 +0200)]
Merge branch 'multicert' of gitlab.com:openconnect/openconnect

3 years agoMerge branch 'obs' into 'master'
David Woodhouse [Tue, 12 Apr 2022 07:44:53 +0000 (07:44 +0000)]
Merge branch 'obs' into 'master'

obs workflow: rebuild on each push/merge to master

See merge request openconnect/openconnect!356

3 years agoFix translations mangled by sed
David Woodhouse [Mon, 11 Apr 2022 15:27:42 +0000 (17:27 +0200)]
Fix translations mangled by sed

Ah, the replacement didn't work when the translations were line-wrapped.
Or in the case where the translation didn't include the address at all!

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoUpdate translations from GNOME
David Woodhouse [Mon, 11 Apr 2022 15:10:17 +0000 (17:10 +0200)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoFix translated wintun version strings
David Woodhouse [Mon, 11 Apr 2022 15:08:16 +0000 (17:08 +0200)]
Fix translated wintun version strings

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoNo embedded URLs in translatable strings
Dimitri Papadopoulos [Sat, 1 Jan 2022 13:51:10 +0000 (14:51 +0100)]
No embedded URLs in translatable strings

https://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings

[dwmw2: Fix translations to match]
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAdd openconnect_set_external_browser_callback() and defaults
David Woodhouse [Sun, 10 Apr 2022 21:11:39 +0000 (22:11 +0100)]
Add openconnect_set_external_browser_callback() and defaults

There is a little bit of duplication here since the *library* will spawn
the default (xdg-open) and the application (main.c) has basically the same
code, but that's because we don't want to *require* that the app register
the callback. With suitable default behaviour from the library, it will
work even with existing versions of the NM auth-dialog or other GUI tools.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAnyConnect: Add support for external browser SSO
David Woodhouse [Thu, 7 Apr 2022 11:30:21 +0000 (12:30 +0100)]
AnyConnect: Add support for external browser SSO

For external browser SSO we need to listen on a local port to accept the
encoded token from the browser, as it's passed to us via a redirect to
http://localhost:29786/api/sso/<base64>

This implements a simple listening loop, accepting connections and decoding
the blob we get back.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAdd GnuTLS crypto support for HPKE
David Woodhouse [Sat, 9 Apr 2022 21:49:56 +0000 (22:49 +0100)]
Add GnuTLS crypto support for HPKE

We'll need to explicitly link against libhogweed and maybe also libgmp.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAdd OpenSSL crypto support for HKPE
David Woodhouse [Sat, 9 Apr 2022 21:47:53 +0000 (22:47 +0100)]
Add OpenSSL crypto support for HKPE

We need ECDH derivation, HKDF-SHA256, and AES-256-GCM decryption.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAdd cancellable_accept(), make cancellable_send() take a const buffer
David Woodhouse [Sat, 9 Apr 2022 21:45:49 +0000 (22:45 +0100)]
Add cancellable_accept(), make cancellable_send() take a const buffer

These will be needed for AnyConnect 'external browser' SAML mode.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoAnyConnect: Generate EC keys for X-AnyConnect-STRAP-{DH-,}Pubkey
David Woodhouse [Thu, 7 Apr 2022 21:22:36 +0000 (22:22 +0100)]
AnyConnect: Generate EC keys for X-AnyConnect-STRAP-{DH-,}Pubkey

These are needed for the external browser SAML support.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoDo not XFAIL obsolete-server-crypto on Fedora/CentOS
Mike Gilbert [Sun, 10 Apr 2022 20:22:45 +0000 (16:22 -0400)]
Do not XFAIL obsolete-server-crypto on Fedora/CentOS

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
3 years agoobs workflow: rebuild on each push/merge to master
Luca Boccassi [Mon, 11 Apr 2022 10:53:29 +0000 (11:53 +0100)]
obs workflow: rebuild on each push/merge to master

Signed-off-by: Luca Boccassi <bluca@debian.org>
3 years agoMerge branch 'remove_unnecessary_struct_member_to_quiet_Coverity' into 'master'
David Woodhouse [Mon, 11 Apr 2022 09:57:43 +0000 (09:57 +0000)]
Merge branch 'remove_unnecessary_struct_member_to_quiet_Coverity' into 'master'

Remove repeated flexible array member which is confusing Coverity

See merge request openconnect/openconnect!341

3 years agoMerge branch 'no_MTU_setting_in_openconnect_itself' into 'master'
David Woodhouse [Sun, 10 Apr 2022 20:48:09 +0000 (20:48 +0000)]
Merge branch 'no_MTU_setting_in_openconnect_itself' into 'master'

Don't try to set MTU on tunnel interface within (lib)openconnect itself

See merge request openconnect/openconnect!195

3 years agoMerge branch 'code_climate_deepsource' into 'master'
David Woodhouse [Sun, 10 Apr 2022 20:45:48 +0000 (20:45 +0000)]
Merge branch 'code_climate_deepsource' into 'master'

Improve code for future maintenance

Closes #342 and #341

See merge request openconnect/openconnect!303

3 years agoMerge branch 'const_char' into 'master'
David Woodhouse [Sun, 10 Apr 2022 20:38:56 +0000 (20:38 +0000)]
Merge branch 'const_char' into 'master'

Declare C string constants using array syntax

See merge request openconnect/openconnect!309

3 years agoopenssl: allow ALL ciphers when allow-insecure-crypto is enabled
Mike Gilbert [Sun, 10 Apr 2022 16:21:57 +0000 (12:21 -0400)]
openssl: allow ALL ciphers when allow-insecure-crypto is enabled

Previously, the cipher list was set to "DEFAULT:+3DES:+RC4". However,
according to ciphers(1), the DEFAULT keyword cannot be combined with
other strings using the + characters. In other words, ":+3DES:+RC4" gets
ignored.

The user is opting into insecure behavior, so let's keep it simple and
just allow everything.

This change fixes the obsolete-server-crypto test when openconnect is
built against openssl-1.1.x.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
3 years agoMerge branch 'cast_char' into 'master'
David Woodhouse [Sun, 10 Apr 2022 14:06:37 +0000 (14:06 +0000)]
Merge branch 'cast_char' into 'master'

Do not cast `const char *` to `char *`

See merge request openconnect/openconnect!312

3 years agoMerge branch 'free_const_char' into 'master'
David Woodhouse [Sun, 10 Apr 2022 14:06:04 +0000 (14:06 +0000)]
Merge branch 'free_const_char' into 'master'

Silence compiler warnings [-Wdiscarded-qualifiers]

See merge request openconnect/openconnect!316

3 years agoMerge branch 'vpn_progress_wintun_version' into 'master'
David Woodhouse [Sun, 10 Apr 2022 14:04:46 +0000 (14:04 +0000)]
Merge branch 'vpn_progress_wintun_version' into 'master'

Silence compiler warning [-Wformat=]

See merge request openconnect/openconnect!317

3 years agoMerge branch 'gai_strerror' into 'master'
David Woodhouse [Sun, 10 Apr 2022 14:01:02 +0000 (14:01 +0000)]
Merge branch 'gai_strerror' into 'master'

Win32: gai_strerror → WSAGetLastError

See merge request openconnect/openconnect!322

3 years agoMerge branch 'sigaction' into 'master'
David Woodhouse [Sun, 10 Apr 2022 13:57:48 +0000 (13:57 +0000)]
Merge branch 'sigaction' into 'master'

Check return value of sigaction()

See merge request openconnect/openconnect!318

3 years agoMerge branch 'obs' into 'master'
David Woodhouse [Sun, 10 Apr 2022 13:54:02 +0000 (13:54 +0000)]
Merge branch 'obs' into 'master'

Add packaging and configuration files for OBS build

See merge request openconnect/openconnect!342

3 years agoMerge branch 'dump_buf_hex_performance' into 'master'
David Woodhouse [Sun, 10 Apr 2022 13:53:23 +0000 (13:53 +0000)]
Merge branch 'dump_buf_hex_performance' into 'master'

Skip dump_buf_hex() when the log level is low enough

Closes #395

See merge request openconnect/openconnect!348