Re: Type the password for the private key

basik
Regular Visitor

Type the password for the private key

I have managed to get as far as generating the P12 file using the command shown(with my files as downloaded from the Visa Dev Center) and wish to import it into my certficate store on Windows 10. Using instructions from here

openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -certfile cert.pem -out myProject_keyAndCertBundle.p12

 

The Certificate Import Wizard step asks for the private key password - I have no recollection of entering one. I just recall downloading the key file when creating my application on the Developer Center.

 

Where should look for this private key password or is it the password I use for the developer center? Thank you

 

6 REPLIES 6
swaritsharma
Regular Contributor

Re: Type the password for the private key

Hi, The private key password is the one you must have set while generating p12 keystore with openssl after entering this command: > "openssl pkcs12 -export -in cert.pem -inkey "privateKey.pem" -certfile cert.pem -out myProject_keyAndCertBundle.p12".

So you need to enter that password in the Wizard.
API_Products
Visa Developer Support Specialist

Re: Type the password for the private key

Hey @basik,

 

We recommend you to use the VDC Playground tool for your testing because it's the simplest method to use for sandbox testing. Can you please download this tool and test from there?

 

You can also download VDC Playground from your Visa Developer project app. Just click on your project, and download VDC Playground from the Assets section and Run it. Refer to screenshot.

20190917 Assets VDP Playground.png

 

I have also attached the VDC Playground tool as an attachment, for your convenience.

 

You can find the guide on Getting Started with VDC Playground from this blog post here - https://developer.visa.com/pages/visa-developer-center-playground 

 

If the issue persists, please provide the following information and I'd be happy to help:

1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

gldiazcardenas
Regular Visitor

Re: Type the password for the private key

Hi, I can see in the code samples that ApiClient is asking for two passwords:  keyStorePassword and privateKeyPassword, I remember my keyStorePassword which is the one I entered when created the p12 file, but privateKeyPassword is unknown to me.  Are they same thing? if not, where do I get my privateKeyPassword?  Thanks for the info.

API_Products
Visa Developer Support Specialist

Re: Type the password for the private key

Hey @gldiazcardenas,

 

That's a good question and I'm happy to help. If your project uses products (APIs) that use Two-Way Mutual SSL authentication, you will need to download and add your new project certificate to a keystore. A keystore is a repository where private keys and certificates can be stored. The PrivateKeyPassword can be the same as your KeystorePassword. 

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

gldiazcardenas
Regular Visitor

Re: Type the password for the private key

Hi Diana,

 

Thanks for replying, yes looks like privateKeyPassword is usually the same keyStorePassword.  I was looking into the code samples in Java, and I found that actually the privateKeyPassword is never used; the ApiClient class has that field and all test classes ask for the privateKeyPassword, but internally in the HTTP request building process that privateKeyPassword is never used; so in samples that's a unnecessary field.   Hope this helps people to understand a little bit more this topic.

API_Products
Visa Developer Support Specialist

Re: Type the password for the private key

Hey @gldiazcardenas,

 

Thanks for your feedback, it's greatly appreciated.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.