When generating a key pair and certificate that uses DSA as key algorithm, it produces an error "Could not establish an encrypted connection because certificate presented by localhost has an invalid signature.". The solution to this problem is use RSA for key algorithm.

See more details in JETTY-484.