#24554, but for macOS. (Different fix, and the macOS existing failure is holding up a Linux fix)
var collection = new X509Certificate2Collection();
collection.Add(certificateWithPrivateKey);
collection.Add(anotherCertWithoutPrivateKey);
var output = collection.Export(X509ContentType.Pkcs12);
See also dotnet/corefx#26152.
#24554, but for macOS. (Different fix, and the macOS existing failure is holding up a Linux fix)
See also dotnet/corefx#26152.