ActiveMQ self signed certificate causes errors ActiveMQ self signed certificate causes errors curl curl

ActiveMQ self signed certificate causes errors


Finally, I was able to solve my problem. The main issue is that cURL is broken. Here are the necessary steps:

  1. When generating the keys, use localhost as the Common Name (CN)"-dname CN=localhost" as it is apparently used too when verifyingthe certificate.

  2. Use wget instead of cURL:wget --http-user=admin --http-password=admin --post-data="body=foowget22" https://localhost:8162/api/message/TEST\?type\=queue --ca-certificate=~/dev/apache-activemq-5.9.1/conf/amq-server.pem

Also, you may verify using openssl s_client -connect localhost:8162 -CAfile ~/dev/apache-activemq-5.9.1/conf/amq-server.pem and see if it returns Verify return code: 0 (ok)