From: Arne Schwabe <arne@...1227...>
To: Antonio Quartulli <a@...2181...>, openvpn-devel@lists.sourceforge.net
Subject: Re: [Openvpn-devel] [PATCH 09/25] dco: configure keys in DCO right after generating them
Date: Mon, 27 Jun 2022 14:42:13 +0200 [thread overview]
Message-ID: <97cb0341-2762-3ce3-8809-d1dad6edfc66@...1227...> (raw)
In-Reply-To: <20220624083809.23487-10-a@...2181...>
Am 24.06.22 um 10:37 schrieb Antonio Quartulli:
>
> +/**
> + * Install the key material in DCO for the specified peer, at the specified slot
> + *
> + * @param multi the TLS context of the current instance
> + * @param ks the state of the key being installed
> + * @param key2 the container for the raw key material
> + * @param key_direction the key direction to be used to extract the material
> + * @param ciphername the name of the cipher to use the key with
> + * @param server whether we are running on a server instance or not
> + *
> + * @return 0 on success or a negative error code otherwise
> + */
> +int init_key_dco_bi(struct tls_multi *multi, struct key_state *ks,
> + const struct key2 *key2, int key_direction,
> + const char *ciphername, bool server);
I think here the description might be outdated. Your method does not
have a specified slot anymore. It would be good to document that this
method instead has a hidden that it install the primary key on the first
call and otherwards installs/overwrites the secondary key.
> + if (dco_disabled)
> + {
> + init_key_ctx_bi(key, key2, key_direction, key_type, "Data Channel");
> + /* Initialize implicit IVs */
> + key_ctx_update_implicit_iv(&key->encrypt, key2->keys[(int)server].hmac,
> + MAX_HMAC_KEY_LENGTH);
> + key_ctx_update_implicit_iv(&key->decrypt,
> + key2->keys[1 - (int)server].hmac,
> + MAX_HMAC_KEY_LENGTH);
> + }
> +
> + if (!dco_disabled)
> + {
I think an else here would be better.
> + /* encrypt/decrypt context are unused with DCO */
Do we have actually checked this? IIrc the generation of the explicit
exit notification might still try to generate a data channel key and use
these contexts.
Arne
next prev parent reply other threads:[~2022-06-27 12:42 UTC|newest]
Thread overview: 157+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 8:37 [Openvpn-devel] [PATCH 00/25] ovpn-dco: introduce data-channel offload support Antonio Quartulli
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 01/25] dco: introduce low-level code for handling ovpn-dco in the Linux kernel Antonio Quartulli
2022-06-27 11:03 ` Arne Schwabe
2022-06-28 15:07 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-28 15:46 ` Heiko Hund
2022-06-28 15:50 ` Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 02/25] dco: add helper function to detect if DCO is enabled or not Antonio Quartulli
2022-06-27 11:47 ` Arne Schwabe
2022-06-28 15:11 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-07-05 12:36 ` [Openvpn-devel] [PATCH 02/25] " Heiko Hund
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 03/25] dco: use specific metric when installing routes Antonio Quartulli
2022-06-27 11:04 ` Arne Schwabe
2022-06-28 18:56 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-06-28 20:52 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 04/25] dco: create DCO interface using SITNL Antonio Quartulli
2022-06-27 11:06 ` Arne Schwabe
2022-06-28 15:21 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 05/25] dco: let open_tun_generic handle the DCO case Antonio Quartulli
[not found] ` <1b657825-faa9-ea35-fb12-84a940c1e0ba@...1227...>
2022-06-27 11:32 ` Antonio Quartulli
2022-06-27 11:47 ` Arne Schwabe
2022-06-28 18:58 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-06-29 12:29 ` [Openvpn-devel] [PATCH v3] " Antonio Quartulli
2022-06-29 12:49 ` [Openvpn-devel] [PATCH v4] " Antonio Quartulli
2022-06-30 13:44 ` Heiko Hund
2022-06-30 13:51 ` Antonio Quartulli
2022-06-30 14:08 ` [Openvpn-devel] [PATCH v5 05/25] " Antonio Quartulli
2022-07-06 14:29 ` [Openvpn-devel] [PATCH pre-05/25] networking: add net_iface_type API Antonio Quartulli
2022-07-06 14:29 ` [Openvpn-devel] [PATCH v6 05/25] dco: let open_tun_generic handle the DCO case Antonio Quartulli
2022-07-11 13:12 ` [Openvpn-devel] [PATCH v7] " Antonio Quartulli
2022-07-11 13:55 ` [Openvpn-devel] [PATCH v8 05/25] " Antonio Quartulli
2022-07-12 21:46 ` [Openvpn-devel] [PATCH v9 " Antonio Quartulli
2022-07-14 14:11 ` Gert Doering
2022-07-19 14:16 ` [Openvpn-devel] [PATCH v10 " Antonio Quartulli
2022-07-21 18:10 ` Gert Doering
2022-07-21 18:24 ` [Openvpn-devel] [PATCH v11 05/25] dco: introduce open_tun_dco_generic() to open dynamic or fixed-name DCO devices Gert Doering
2022-07-27 13:06 ` Antonio Quartulli
2022-07-27 18:00 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-07-11 8:10 ` [Openvpn-devel] [PATCH v2 pre-05/25] networking: add net_iface_type API Antonio Quartulli
2022-07-13 10:53 ` Gert Doering
2022-07-13 12:05 ` Antonio Quartulli
2022-07-13 12:43 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-07-13 12:55 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 06/25] dco: initialize context and save pointer in TLS object Antonio Quartulli
2022-06-27 11:47 ` Arne Schwabe
2022-07-14 14:27 ` Gert Doering
2022-07-18 22:50 ` Antonio Quartulli
2022-07-20 12:30 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-07-27 18:14 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 07/25] dco: add option check - disable DCO if conflict is detected Antonio Quartulli
2022-06-27 11:17 ` Arne Schwabe
2022-07-12 22:13 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-07-18 22:17 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-07-19 9:25 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-07-12 22:16 ` [Openvpn-devel] [PATCH pre-07/25] tun: create tun_name_is_fixed helper Antonio Quartulli
2022-07-14 18:20 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 08/25] dco: allow user to disable it at runtime Antonio Quartulli
2022-06-27 11:32 ` Arne Schwabe
2022-07-05 12:32 ` Heiko Hund
2022-07-18 20:31 ` Antonio Quartulli
2022-07-18 22:19 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-07-19 9:40 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 09/25] dco: configure keys in DCO right after generating them Antonio Quartulli
2022-06-27 12:42 ` Arne Schwabe [this message]
2022-07-20 12:32 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-07-28 12:56 ` Arne Schwabe
2022-07-28 13:01 ` Antonio Quartulli
2022-07-28 15:20 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-07-28 15:38 ` Arne Schwabe
2022-08-01 14:06 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-08-01 15:14 ` Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 10/25] dco: periodically check and possibly rotate/delete keys Antonio Quartulli
2022-06-28 14:23 ` Arne Schwabe
2022-07-28 19:35 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-07-29 7:41 ` Frank Lichtenheld
2022-07-29 7:48 ` Antonio Quartulli
2022-08-01 15:44 ` Frank Lichtenheld
2022-08-02 8:07 ` Antonio Quartulli
2022-08-02 15:16 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-08-03 9:10 ` Frank Lichtenheld
2022-08-03 14:30 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 11/25] dco: split option parsing routines Antonio Quartulli
2022-06-28 14:29 ` Arne Schwabe
2022-07-28 19:47 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-08-02 10:53 ` Gert Doering
2022-08-03 8:51 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-08-03 9:50 ` [Openvpn-devel] [PATCH v4 " Antonio Quartulli
2022-08-03 15:56 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 12/25] dco: check that pulled options are compatible Antonio Quartulli
2022-06-28 14:32 ` Arne Schwabe
2022-07-14 20:14 ` Gert Doering
2022-07-18 22:54 ` Antonio Quartulli
2022-07-18 23:12 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 13/25] dco: implement dco support for p2p/client code path Antonio Quartulli
2022-07-05 12:30 ` Heiko Hund
2022-07-05 12:38 ` Antonio Quartulli
2022-08-04 7:14 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-08-04 13:30 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-08-04 13:51 ` Antonio Quartulli
2022-08-04 15:17 ` Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 14/25] dco: implement dco support for p2mp/server " Antonio Quartulli
2022-07-05 12:31 ` Heiko Hund
2022-07-05 14:53 ` Antonio Quartulli
2022-07-05 15:14 ` Arne Schwabe
2022-07-28 19:55 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-08-01 13:10 ` Heiko Hund
2022-08-05 6:45 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-08-05 14:55 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:37 ` [Openvpn-devel] [PATCH 15/25] dco: add documentation for ovpn-dco-linux Antonio Quartulli
2022-07-04 8:29 ` Frank Lichtenheld
2022-07-04 8:33 ` Antonio Quartulli
2022-07-05 12:31 ` Heiko Hund
2022-07-05 14:09 ` Antonio Quartulli
2022-08-05 6:58 ` [Openvpn-devel] [PATCH v2 " Antonio Quartulli
2022-08-05 8:12 ` Frank Lichtenheld
2022-08-05 9:37 ` [Openvpn-devel] [PATCH v3 " Antonio Quartulli
2022-08-05 10:04 ` Frank Lichtenheld
2022-08-05 10:58 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 16/25] GitHub Actions: add Linux DCO build (on Ubuntu 20.04) Antonio Quartulli
2022-07-04 8:58 ` Frank Lichtenheld
2022-07-19 16:52 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 17/25] tun: extract close_tun_handle into its own fucntion and print correct type Antonio Quartulli
2022-07-04 8:47 ` Frank Lichtenheld
2022-07-19 20:13 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 18/25] dco: turn supported ciphers list into a function Antonio Quartulli
2022-07-05 12:31 ` Heiko Hund
2022-08-07 10:04 ` [Openvpn-devel] [PATCH v2 18/18] " Antonio Quartulli
2022-08-07 14:58 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 19/25] dco-win: implement GetOverlappedResultEx for mingw32 Antonio Quartulli
2022-06-24 18:53 ` Selva Nair
2022-06-27 10:30 ` Lev Stipakov
2022-06-27 18:50 ` Antonio Quartulli
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 20/25] dco-win: add platform dependant check on incompatible options Antonio Quartulli
2022-07-05 12:31 ` Heiko Hund
2022-07-19 20:17 ` Gert Doering
2022-08-11 20:58 ` Gert Doering
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 21/25] do_open_tun: restyle "can preserve TUN" check Antonio Quartulli
2022-07-05 12:31 ` Heiko Hund
2022-07-05 18:47 ` Antonio Quartulli
2022-08-04 11:49 ` Lev Stipakov
2022-08-04 12:07 ` Antonio Quartulli
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 22/25] dco-win: introduce low-level code for handling ovpn-dco-win in Windows Antonio Quartulli
2022-06-27 10:38 ` Lev Stipakov
2022-06-28 8:36 ` Lev Stipakov
2022-07-05 12:32 ` Heiko Hund
2022-07-05 12:40 ` Antonio Quartulli
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 23/25] dco-win: implement ovpn-dco support in P2P Windows code path Antonio Quartulli
2022-06-28 8:46 ` Lev Stipakov
2022-07-05 12:32 ` Heiko Hund
2022-07-11 14:19 ` [Openvpn-devel] [PATCH v2 23/23] " Antonio Quartulli
2022-07-11 15:04 ` Heiko Hund
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 24/25] dco-win: add documentation to README.dco.md Antonio Quartulli
2022-07-05 12:32 ` Heiko Hund
2022-06-24 8:38 ` [Openvpn-devel] [PATCH 25/25] dco-win: update GH Actions config file Antonio Quartulli
2022-07-05 9:32 ` Frank Lichtenheld
2022-07-05 9:36 ` Antonio Quartulli
2022-07-05 10:38 ` Lev Stipakov
2022-08-04 15:28 ` Gert Doering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97cb0341-2762-3ce3-8809-d1dad6edfc66@...1227... \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.