by Angel Todorov [atodorov at acm dot org] posted on 2003/11/09 |
|
Hello.
Since the dll i am using , where i also import the cert, is placed in "public" environment, i don't want to store the certificate on the file system. Is it possible to create a certificate from string which is provided directly in the code? Or, also, is it possible to create a cert from a string in the code, and then load that cert? I provide only the string , which means it is not binary, as the MS.NET wants the certificates to be. (in DER output form). Thanks |
by Pieter Philippaerts [Pieter at mentalis dot org] posted on 2003/11/09 |
|
Yes, you can hard code a certificate as a string in your source code. Simply use a Base64ed DER encoded certificate and pass it to the Certificate.CreateFromBase64String method.
Another option is to use a resource file to embed your certificate in your dll. I don't know exactly how this works because I hardly work with resource files, but I'm sure there are some good tutorials online. |