[gnutls-devel] GnuTLS | Draft: record: Allow setting all record state (!1968)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Jun 10 12:10:44 CEST 2025



Alistair Francis created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1968

Project:Branches: alistair23/gnutls:alistair/session-backup to gnutls/gnutls:master
Author:   Alistair Francis




The gnutls_record_get_state() returns a range of data, but the current
gnutls_record_set_state() only supports setting seq_number.

This patch adds a new gnutls_record_set_state2() function that allows
restoring all of the data returned from gnutls_record_get_state().

This is working towards allowing us to support KeyUpdate in
ktls-utils with the kernel keyring storing the gnutls session data [1].
This allows us to restore data which we can get from the kernel (which
is previously obtained from gnutls_record_get_state()).

1: https://lore.kernel.org/kernel-tls-handshake/49a61a63-db9a-42cd-afa9-3f177400bd86@suse.de/T/#ma9fb251a756fe427bc474f113572abc5fbe8ddab
Signed-off-by: Alistair Francis <alistair.francis at wdc.com>

Based-on: https://gitlab.com/gnutls/gnutls/-/merge_requests/1965

## Checklist
 * [X] Commits have `Signed-off-by:` with name/author being identical to the commit author
 * [X] Code modified for feature
 * [ ] Test suite updated with functionality tests
 * [ ] Test suite updated with negative tests
 * [X] Documentation updated / NEWS entry present (for non-trivial changes)
 * [X] CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

## Reviewer's checklist:
 * [ ] Any issues marked for closing are addressed
 * [ ] There is a test suite reasonably covering new functionality or modifications
 * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
 * [ ] This feature/change has adequate documentation added
 * [ ] No obvious mistakes in the code

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1968
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20250610/6c213590/attachment-0001.html>


More information about the Gnutls-devel mailing list