[gnutls-devel] GnuTLS | Refactor pkcs11_find_objects to use p11-kit iterator (!1758)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Aug 3 14:15:41 CEST 2023




Zoltán Fridrich commented on a discussion on lib/pkcs11.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1758#note_1498753645

> -
> -		for (j = 0; j < count; j++) {
> -			a[0].type = CKA_ID;
> -			a[0].value = certid_tmp;
> -			a[0].value_len = sizeof certid_tmp;
> -
> -			if (pkcs11_get_attribute_value(sinfo->module,
> -						       sinfo->pks, ctx[j], a,
> -						       1) == CKR_OK) {
> -				id.data = a[0].value;
> -				id.size = a[0].value_len;
> -			} else {
> -				id.data = NULL;
> -				id.size = 0;
> +		if (find_data->current + 1 > alloc_size) {
> +			alloc_size = alloc_size == 0 ? 2 : alloc_size * 2;

Opened an MR: https://gitlab.com/gnutls/gnutls/-/merge_requests/1764

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1758#note_1498753645
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/20230803/6e7549b9/attachment-0001.html>


More information about the Gnutls-devel mailing list