6
I exported a file .pfx
of my A3 certificate. How do I convert it to .pem
. In VB.Net if possible.
6
I exported a file .pfx
of my A3 certificate. How do I convert it to .pem
. In VB.Net if possible.
3
The easiest way I think is with Openssl binary, usually for linux, but it also has Windows version:
The installer can be obtained here: http://slproweb.com/products/Win32OpenSSL.html (direct link: http://slproweb.com/download/Win32OpenSSL_Light-1_0_1j.exe ), or in some software library like 'Cygwin', for example, if you are familiar with it.
The command for conversion is:
openssl pkcs12 -in c:\caminho\do\certificado\de\origem.pfx -out c:\caminho\do\arquivo\de\destino.pem -nodes
When you enter this command, you will be prompted for the password used to protect the original . pfx file so that it can be decrypted. This command will generate an UNPROTECTED certificate (no password), which is suitable for use in automated applications (for example, web servers).
Source:
http://support.citrix.com/article/CTX106028
Browser other questions tagged vb.net certified
You are not signed in. Login or sign up in order to post.
I believe it is not possible to do this on . Net without the use of an external library. In any case, you can use Openssl (running it as an external command).
– Vinícius Gobbo A. de Oliveira
Thank you very much, Vinicius! I managed to do this, but would you like to tell me if I can use VB.net and interact with Openssl? For example call it in my project and pass the parameters via programming ? Thank you
– Felipe S
I won’t write an answer because I won’t be able to give you much more detail, unless you say it’s enough, of course! You can call the executable
openssl.exe
and pass the parameters directly to it, or usePInvoke
to call commands fromlibopenssl
(I think the name is that) so as not to run an external program, but I don’t know what commands these are. I hope I’ve helped!– Vinícius Gobbo A. de Oliveira
Got it, Vinicius!! Thank you very much for now, I’m going to do some tests. Hugs!
– Felipe S
by Vb.net execute in command line... I do not use Vb.net but I believe there is a function to execute command lines. An example, in PHP there is an exec() function. In google, look for "Vb.net execute command line".
– Daniel Omine