Howto create X509Certificate2 instance from a certificate imported into db?
Hi,
please, I was imported X.509 certificate from the .cer file into a database, using command:
CREATE CERTIFICATE FROM FILE='c:\temp\testCert.cer';
After this, I found this certificate in the sys.certificates view.
Now I want to write managed user defined function (.net managed code), which uses the certificate. I want to create instance of X509Certificate2 class, but i dont know how.
In the SQL Server 2005 documentation, I found only Microsoft.SqlServer.Management.Smo.Certificate class, but there isn't any relation (an method or property) to X509Certificate2 class.
Is the certificate stored in some windows certificate store? Or is there an undocumented table, where is the certificate serialized, and I can deserialize it and create instance of the X509Certificate2 class?
Thanks in advance.
Fipil.

