Hans Leidekker (@hans) commented about dlls/crypt32/unixlib.c:
+ if (!libgnutls_handle) return STATUS_DLL_NOT_FOUND; + + if (params->password && !(pwd = password_to_ascii( params->password ))) + return STATUS_NO_MEMORY; + + /* Import the certificate if provided. */ + if (params->cert_data && params->cert_size) + { + if ((ret = pgnutls_x509_crt_init( &crt )) < 0) goto error; + { + gnutls_datum_t cert_datum = { (unsigned char *)params->cert_data, params->cert_size }; + if ((ret = pgnutls_x509_crt_import( crt, &cert_datum, GNUTLS_X509_FMT_DER )) < 0) goto error; + } + + /* Create cert bag. */ + if ((ret = pgnutls_pkcs12_bag_init( &cert_bag )) < 0) goto error; The last commit doesn't seem to be necessary. Moving this line before this block so cert_bag is always initialized makes the tests pass here.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10532#note_134787