Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config.client_generate_connect_options: only emit "auth" if tls-auth is used #201

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ is specified. If it is desired to use the certificates from the PKCS#12 file
to authenticate the remote the certificates can be added with the "ca" option
by extracting the certificates with e.g. `openssl pkcs12`.

For tls clients (as opposed to static key clients) we only support data channel
AEAD ciphers. This means the `--auth` option is ignored for data channel
authentication for tls clients. For `--tls-auth` it is still used to choose the
hmac used for the control channel while for `--tls-crypt` and `--tls-crypt-v2`
the hmac is hardcoded (as per OpenVPN™).

## Funding

This project was funded in 2019 for six months by the [German federal ministry for education and research](https://www.bmbf.de) via the [Prototypefund](https://prototypefund.de) - the amount was 47500 EUR.
Expand Down
8 changes: 7 additions & 1 deletion src/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,13 @@ let client_generate_connect_options t =
| B (Link_mtu, _) -> true
| B (Pull, _) -> true
| B (Tls_mode, `Client) -> true
| B (Auth, _) -> true
| B (Auth, _) ->
hannesm marked this conversation as resolved.
Show resolved Hide resolved
Conf_map.mem Tls_auth t
(* Assumption: we only support AEAD ciphers in tls clients. Thus
[Auth] option is ignored for the data channel, and for
tls-crypt(-v2) the hmac is hardcoded. For tls-auth we still want
to send it because it is used for authenticating the control
channel *)
| _ -> false)
t
in
Expand Down