[gnutls-devel] GnuTLS | rnd: always clear internal RNG state and confidential temporary data (!2051)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Jan 14 06:43:48 CET 2026



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/2051 was reviewed by Daiki Ueno

--
  
Daiki Ueno started a new discussion on lib/nettle/rnd.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2051#note_3004253700

 > +	zeroize_key(new_key, sizeof(new_key));
 >  	gnutls_free(ctx);
 >  	return ret;

Not a fault of this MR, but I would write like this to share the common code:

```suggestion:-8+0
	*_ctx = _gnutls_steal_pointer(ctx);

cleanup:
	zeroize_key(new_key, sizeof(new_key));
	gnutls_free(ctx);
	return ret;
```

You would need to change `goto fail` to `goto cleanup`, and initialize `ret` to 0.


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2051
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/20260114/6dc30331/attachment-0001.html>


More information about the Gnutls-devel mailing list