users@jersey.java.net

[Jersey] Re: Client - Server SSL communication, 400 Bad Request

From: Jean-Louis FERRER <ferrer.jeanlouis_at_gmail.com>
Date: Wed, 14 Mar 2012 09:15:12 +0100

Hello again,

Finally found the solution.

The code for the SSL communication was fine, and it was sending back the
right message, somehow (actually the server was sending back some HTML page
with a 400 Bad Request and saying the SSL Certificate was missing, and I
guess Eclipse took the Jersey error message as a plain 400 Bad Request
error, without giving us the full message).

Then once we had fixed the certificate (keytool and openssl), we had a
CertificateException "No name matching server....com found", which came
from the fact the certificate was issued for a certain domain name, and we
were testing directly on a different server... We just had to override some
verification of hostname and now it's fine.

So it's all good in the end, and no bug to report :)

Thanks for your time !

Cheers,
JL