Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] SSL

Thanks for your time. Unfortunately I am getting the same problem with your implementation as I was getting with mine ... There are a few minor differences between my code and yours so I used yours. I can't see what is going on on the Broker side but I would bet it's saying the same thing as my local broker said. I am about to give up on mosquitto unless you have some additional info to share.  Regards Al


Apr 14, 2015 9:18:00 AM com.Imantics.IoT.ALog L
INFO: The CA Certification is: ca.crt

Apr 14, 2015 9:18:00 AM com.Imantics.IoT.ALog L
INFO: The Certification is: server.crt

Apr 14, 2015 9:18:00 AM com.Imantics.IoT.ALog L
INFO: The KeyFile is: server.key

Apr 14, 2015 9:18:00 AM com.Imantics.IoT.ALog L
INFO: Connecting to broker Using SSL: ssl://test.mosquitto.org:8883
Apr 14, 2015 9:18:01 AM com.Imantics.IoT.ALog L
INFO: reason: 0
Apr 14, 2015 9:18:01 AM com.Imantics.IoT.ALog L
INFO: msg: MqttException
Apr 14, 2015 9:18:01 AM com.Imantics.IoT.ALog L
INFO: loc: MqttException
Apr 14, 2015 9:18:01 AM com.Imantics.IoT.ALog L
INFO: cause: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Apr 14, 2015 9:18:01 AM com.Imantics.IoT.ALog L
INFO: excep: MqttException (0) - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
MqttException (0) - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38)
    at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:604)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1884)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1439)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:878)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:814)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
    at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:89)
    at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:590)
    ... 1 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1421)
    ... 10 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
    ... 16 more

On Tue, Apr 14, 2015 at 6:31 AM, Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Albert,

the SSL tests for the Paho Java client are run against Mosquitto.  I think all the material needed, including Mosquitto configuration files, are in the repository.    I'll check later if I have the chance.  It sounds like an article would be a good idea.

Ian


On 04/14/2015 12:38 AM, Al Nemethy wrote:
Hello All, I have been trying to successfully build an ssl based Mqtt Java Client for some time now but have not been able to successfully connect. I am using Mosquitto 1.4.1 as the broker and it works with the Mosquitto publisher and subscriber aok. I have build the self-signed certificates many different ways. My question is this: Is there a good example that actually WORKS ? with a complete procedure on how to build the certificates that is any different than what Mosquitto publishes ???  Thanks in advance


--
Many Regards Al
Albert N. Nemethy



_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
Many Regards Al
Albert N. Nemethy
802 434-2877

Back to the top