We help IT Professionals succeed at work.

Need Private key in certificate file

Greetings,

Firstly, most of what I need is client driven...

I have a CA installed on a stand-alone Win Server 2008.  A few PC's will be connected to this  server (no domain) and "registered" with my software.    After this registration the PC will be disconnected and operate as a stand-alone unit (No network or internet access).  As part of this registration process, I need to request a certificate from the CA, an operator will then issue the certificate, and then I need a certificate file with both the private and public keys included.  This certificate will then be installed on the Client PC.  (This risk will be managed by the client)

I got the whole process to work in C#, except the resulting certificate does not have a private key.  I used CX509CertificateRequestPkcs10 to request the certificate from the CA.  From my research it seems I need a pkcs12 certificate file.  I am not sure if this is correct.

I need a certificate file which can be installed on the client PC with a private and public key.  The whole process needs to happen with C#, except for the issuing of the certificate on the CA.

Any help is much appreciated.

Comment
Watch Question

Distinguished Expert 2019
Commented:
Does your code approximate what is posted here
Software Engineer
Distinguished Expert 2019
Commented:
PKCS#12 is a format that contains bot certificate + key. And optionaly has a password to protect it.
The file extension on windows for this type of file is a .pfx file.

You obviously have created a request and had it signed by a CA, no import the certificate to the tools you used to create the request. After that you should beable to export a certificate + key to a .pfx file.
btanExec Consultant
Distinguished Expert 2019
Commented:
TolomirAdministrator
Top Expert 2005

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.