cancel
Showing results for 
Search instead for 
Did you mean: 

Ready API 1.6.0, javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificate"

New Contributor

Ready API 1.6.0, javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificate"

In Ready API 1.6.0, In the test step "Publish using MQTT", i get the below error message

 

"Error during message publishing: org.eclipse.paho.client.mqttv3.MqttException "MqttException"; cause: javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificate""

 

I created a key store(keystore.jks) using the keytool and added the keystore in the preferrences. I am trying to eveluate the tool for our project.  if this doesnt work then we might need to look for other options.

3 REPLIES 3
Community Manager

Re: Ready API 1.6.0, javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificat

Hi Suganeby,

 

Try the following:
1) open a http session to the server and download the certificate (eg cer - file) 
2) switch to the jre\lib\security - path of soapui, make a backup of cacerts. 
3) Import the cer-File to the cacerts-File like this: 
keytool -import -alias <alias> -file <cer> -keystore cacerts -storepass changeit
where <alias> is the hostname (google.com) and 
<cer> is the filepath to the cer-file. 

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
New Contributor

Re: Ready API 1.6.0, javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificat

Hi Tanya,

 

Thanks for getting back.

1. I downloaded the cert files from the server. Cert files downloaded from the server includes (privatekey.pem and certificate.pem). Another file ca.crt from "https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-C...

 

2. Used the below command to generate p12 keystore file

"openssl pkcs12 -export -out certificate.p12 -inkey privatekey.pem -in certificate.pem -certfile ca.crt"

 

3. After step 1 and step 2, i tried your suggestion as below

keytool -import -alias <hostname> -file <path to the certificate.p12 file generated in step 2> -keystore cacerts -storepass changeit

it throws error "keytool error: java.lang.Exception: Input not an X.509 certificate"

 

 

 

 

 

 

 

 

 

Community Manager

Re: Ready API 1.6.0, javax.net.ssl.SSLHandshakeException "Received fatal alert: bad_certificat

Hi Suganeby,

 

Thanks for checking this. Could you please contact our Ready! API Support Team to investigate this issue? You can get in touch with them here: http://support.smartbear.com/product-list/

 

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
New Here?
Join us and watch the welcome video:
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win