[gnutls-devel] GnuTLS | pkcs11: try to initialize modules in thread-safe mode (!2014)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Sep 8 13:47:26 CEST 2025




Daiki Ueno commented on a discussion on tests/pkcs11/pkcs11-mock4.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2014#note_2736095233

 > +
 > +#ifdef __sun
 > +#pragma fini(mock_deinit)
 > +#pragma init(mock_init)
 > +#define _CONSTRUCTOR
 > +#define _DESTRUCTOR
 > +#else
 > +#define _CONSTRUCTOR __attribute__((constructor))
 > +#define _DESTRUCTOR __attribute__((destructor))
 > +#endif
 > +
 > +static CK_RV override_C_Initialize(void *args)
 > +{
 > +	CK_C_INITIALIZE_ARGS *init_args = args;
 > +
 > +	if (init_args->flags & CKF_OS_LOCKING_OK)

Am I right that the first call is [here](https://gitlab.com/gnutls/gnutls/-/merge_requests/2014/diffs#231d64530b66ece6c42d67c19ec4981f1183e470_0_149) and the second call is [here](https://gitlab.com/gnutls/gnutls/-/merge_requests/2014/diffs#231d64530b66ece6c42d67c19ec4981f1183e470_0_163)? For the former, the `lib` is not amended with the `override_*` function, so it's just softhsm.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2014#note_2736095233
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/20250908/f22e7cb3/attachment.html>


More information about the Gnutls-devel mailing list