Hans Leidekker (@hans) commented about dlls/crypt32/unixlib.c:
+ if ((ret = pgnutls_pkcs12_bag_set_privkey( key_bag, key, pwd ? pwd : "", 0 )) < 0) goto error; + } + + /* Build PKCS#12. */ + if ((ret = pgnutls_pkcs12_init( &p12 )) < 0) goto error; + if ((ret = pgnutls_pkcs12_set_bag( p12, cert_bag )) < 0) goto error; + if (key_bag) + { + if ((ret = pgnutls_pkcs12_set_bag( p12, key_bag )) < 0) goto error; + } + + /* Generate MAC. */ + if ((ret = pgnutls_pkcs12_generate_mac2( p12, GNUTLS_MAC_SHA256, pwd ? pwd : "" )) < 0) goto error; + + /* Export. */ + if ((ret = pgnutls_pkcs12_export2( p12, GNUTLS_X509_FMT_DER, &out )) < 0) goto error; Comments like this don't add much. I would prefer to leave them out.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10532#note_134914