Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.net.ssl.SSLHandshakeException: null cert chain #1

Closed
josecelano opened this issue Feb 6, 2015 · 6 comments
Closed

javax.net.ssl.SSLHandshakeException: null cert chain #1

josecelano opened this issue Feb 6, 2015 · 6 comments

Comments

@josecelano
Copy link

I am trying to run this example but I get this message on ActiveMQ log:

2015-02-06 19:15:01,355 | WARN  | Transport Connection to: tcp://000.000.000.000:50277 failed: javax.net.ssl.SSLHandshakeException: null  cert chain | org.apache.activemq.broker.TransportConnection.Transport

Executing this command fron the client:

openssl s_client -connect 123.123.123.123:61612 -cert client.pem -showcerts

I get this output:

CONNECTED(00000003)
depth=0 /C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
verify return:1

---
Certificate chain
 0 s:/C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
   i:/C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
-----BEGIN CERTIFICATE-----
....

I can connect well using stomp without SSL.

@rethab
Copy link
Owner

rethab commented Feb 7, 2015

Hi Jose, have you followed the steps exactly or did you do something
differently? If so, could you please list the exact steps you took?

Alternatively, can you provide me with a reproducing example?

  • Reto

On Fri, Feb 6, 2015, 20:59 Jose Celano [email protected] wrote:

I am trying to run this example but I get this message on ActiveMQ log:

2015-02-06 19:15:01,355 | WARN | Transport Connection to: tcp://000.000.000.000:50277 failed: javax.net.ssl.SSLHandshakeException: null cert chain | org.apache.activemq.broker.TransportConnection.Transport

Executing this command:

openssl s_client -connect 123.123.123.123:61612 -cert client.pem -showcerts

I get this output:

CONNECTED(00000003)
depth=0 /C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server

verify return:1

Certificate chain
0 s:/C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
i:/C=US/ST=State/L=City/O=Org/OU=Org Unit/CN=Activemq Server
-----BEGIN CERTIFICATE-----
....

I can connect well using stomp without SSL.


Reply to this email directly or view it on GitHub
#1.

@josecelano
Copy link
Author

First I followed the steps exactly but later I did somethings differently becuase it did not work. I think the problem could be I am using a Stomp class that does not allow ssl connections, but I am not sure, still working on that, see:

dejanb/stomp-php#34

@rethab
Copy link
Owner

rethab commented Feb 7, 2015 via email

@josecelano
Copy link
Author

Thanks @rethab, I did not realize that you are using a fork, I was using the original repository. I have notified the problem in the original repository dejanb/stomp-php#34

Now It seems to connect well but I get another error:

Fatal error: Uncaught exception 'FuseSource\Stomp\Exception\StompException' with message 'User name [] or password is invalid. No user for client certificate: CN=Activemq Client, OU=Org Unit Client, O=Org Client, L=City Client, ST=State Client, C=US' in D:\www\test\stomb\FuseSource\Stomp\Frame.php on line 57

I suppose this is a problem with the users.properties config file in ActiveMQ server, is not?

@josecelano
Copy link
Author

The new problem is fixed:

users.properties previous file:

php-client=C=US, ST=State Client, L=City Client, O=Org Client, OU=Org Unit Client, CN=Activemq Client

users.properties new file:

php-client=CN=Activemq Client, OU=Org Unit Client, O=Org Client, L=City Client, ST=State Client, C=US

I thought certificate fields order do not matter.

@rethab
Copy link
Owner

rethab commented Feb 16, 2015

Glat it works now.

I agree the documentation could more clearly stating that you need this fork.

  • Reto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants