On Jul 3, 2012, at 5:16 PM, Daniel de Arêa Leão wrote: > On the Java side: IOException: sun.security.validator.ValidatorException: > PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested target > On the NOX side: SSL3_READ_BYTES:sslv3 alert certificate unknow from > SSL_accept > > I suspect that it's missing a certificate on the NOX side. Does anyone know > anything about certificates for the JSON messages?
I think the NOX side is actually fine. I believe the problem is that the SSL cert is self-signed. Java has no idea if it's actually trusted or not, so it doesn't take it. You could install a cert in NOX that is known trusted, or you could convince Java to trust the one that got generated during the building of NOX. To do the latter, you need to do something along the lines of grabbing the cert from NOX's messenger directory, converting it into a Java keystore file with Java's "keytool" commandline program, loading that into a Java KeyStore object, and using that to initialize an SSLSocketFactory to get your Java-side socket from. Read tons and tons of vague JavaDoc or just google "Java self-signed certificate socket" or something for more info. Or if you don't really need SSL, just use a plain TCP socket. :) Hope that helps. -- Murphy
