[Mono-list] X509Certificate2.Export(X509ContentType.Pfx) support

matthieu Barthélemy bonsouere at gmail.com
Tue Jul 3 17:11:50 UTC 2012


Hi all,

I'm using Mono 2.10.6 to develop and test my project, and realized that the
export of a certificate to the Pfx or PKCS#12 formats is not supported. The
following code:

X509Certificate2 cert= new X509Certificate2("dummy.crt", "");
cert.Export(X509ContentType.Pfx);


throws the following exception:
Operation is not supported.---  at
System.Security.Cryptography.X509Certificates.X509Certificate.Export
(X509ContentType contentType, System.Byte[] password) [0x00047] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs:195
  at System.Security.Cryptography.X509Certificates.X509Certificate.Export
(X509ContentType contentType) [0x00000] in
/home/abuild/rpmbuild/BUILD/mono-2.10.6/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs:163

Is this something that is being worked on, or planned to be implemented?
If not, does it represent a lot of (complicated) work? Is there a
workaround to export a complete certificate (including private key) and be
able to re-import it at a later time?


Thanks for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20120703/69312531/attachment.html>


More information about the Mono-list mailing list