0
votes
  • I tested to generate the csr file of the following link.

http://www.journaldev.com/223/generating-a-certificate-signing-request-using-java-api

  • Output .key and .req file By this using this java program

for .req file ::::::::

BufferedOutputStream bos1 = new BufferedOutputStream( new FileOutputStream(txtRequest.getText())); bos1.write(csr.getBytes());

for .key file ::::::::

BufferedOutputStream bos2 = new BufferedOutputStream( new FileOutputStream(txtPrivateKey.getText())); bos2.write(getPrivateKey().getEncoded());

  • produce .pfx by using other C# application program.
  • I install this .pfx file in my computer, error occurred...

An internal error occurred.The private key that you are importing might require a cryptographic service provider that is not installed on your system.

I don't know how to fix this error. If you know, please explain me.

Thanks.

1
What do you mean by "I output .key and .req and then I output .pfx"? Please edit your question and give more details.Aaron Digulla
I already tested just like this. But error still occur... An internal error occurred. Either the user profile is not accessible or the private key that you are importing might require a cryptographic service provider that is not installed on your system.Sharifah
what is your operating system?Raj
I tested this installation with Window 7 32-bit Operating System and Window XPSharifah

1 Answers

0
votes

When you generate your certificate using a particular cryptographic service provider (csp) (if you haven't set your csp, then it will be the default csp of the operating system) and if that csp (default csp is different) is missing in the machine that you import the certificate is, - then you will see this behaviour.

I have seen this behaviour when i generate it in my xp machine and import it in a server 2008. I found that the default csp's are different in these 2 operating systems.

My workaround is to to import it in to server 2003 and export it then import it in to server 2008. I assumed that server 2008 is having stricter validations than server 2003 while importing certificates.