[gnutls-devel] GnuTLS | locks: couple of improvements using Gnulib glthread (!1485)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Nov 15 16:36:40 CET 2021




Daiki Ueno commented on a discussion on lib/tpm2_esys.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1485#note_733515776

>  
> -int install_tpm2_key(struct tpm2_info_st *info, gnutls_privkey_t pkey,
> -		     unsigned int parent, bool emptyauth,
> -		     gnutls_datum_t *privdata, gnutls_datum_t *pubdata)
> +GNUTLS_ONCE(tcti_once);
> +
> +void
> +tpm2_tcti_deinit(void)
> +{
> +	if (tcti_ctx) {
> +		Tss2_TctiLdr_Finalize(&tcti_ctx);
> +	}
> +}
> +
> +static void
> +tcti_once_init(void)

Yes; afaik library initialization (either implicit or explicit) is already implemented like a once: multiple calls to `gnutls_global_init` only takes effect for the first time.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1485#note_733515776
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/20211115/496c0078/attachment.html>


More information about the Gnutls-devel mailing list