Utopia-FinTech
Regular Visitor

ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hi,

I just get started with the visa SDK for node js. I followed the instruction on the README file correctly but I just keep getting this response.

error {"library":"x509 certificate routines","function":"X509_check_private_key","reason":"key values mismatch","code":"ERR_OSSL_X509_KEY_VALUES_MISMATCH"}

 

Any help is appreciated. 

 

Thank you.

 

8 REPLIES 8
DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hello @Utopia-FinTech

 

Can you please let me know the API product that your question and error relates to?

 




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.

Utopia-FinTech
Regular Visitor

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

This was the API: payment_account_validation_api

 

 

Thanks in advance. 

DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hey @Utopia-FinTech,

 

Thanks for providing this information. INC9446833 has been logged for the engineering team to investigate the issue and someone will reach out to you soon. Let us know if you have other questions.

 

 

 




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.

Bhawani
Occasional Visitor

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

I'm facing the same issue. Can you please help me?

DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hi @Bhawani,

 

We're happy to help you resolve the error. Please try using the VDP Playground tool to test the Visa Developer APIs in sandbox. Please see the VDP Playground user guide below.

 

VDP Playground – https://community.developer.visa.com/t5/Developer-Tools/How-to-test-and-troubleshoot-APIs-with-the-V... 

 

If the error persists, please provide the following information and a screenshot of the error. Someone will 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.

DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hey @Utopia-FinTech and @Bhawani,

 

Can you please let us know if the issue persists? If the issue persists, I'm happy to help. If the issue is resolved, I'll close the incident.  




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.

DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hi @Utopia-FinTech and @Bhawani,

 

First off, you get this error if the private key you've specified does not match the public key in the certificate you are trying to use. Please check that the private key you use matches the public key in the certificate. This can be done be comparing the output of the following commands which should be the same:

 

openssl x509 -noout -modulus -in your-cert-file.pem
openssl rsa -noout -modulus -in your-key-file.pem

 

If these do not match, then perhaps you have used the wrong file for either your cert or your key files.

 

cert => file you download from the Credentials section of the Portal
key ==> the private key that you downloaded or created when you first created the project
ca ==> on a Mac, you can point to cacerts (if you get a self-signed error, see if commenting this out helps)

 

This worked on NodeJS v 14.15.0 and 15.1.0 (npm 6.14.8, 7.0.8)




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.

DianaTran
Visa Dev Moderator

Re: ERR_OSSL_X509_KEY_VALUES_MISMATCH

Hey @Utopia-FinTech,

 

I'll close INC9446833 as resolved. Have a nice week and let us know of any questions.




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.