File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Problem with ssl and glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Problem with ssl and glassfish" Watch "Problem with ssl and glassfish" New topic

Problem with ssl and glassfish

David Acevedo

Joined: Feb 12, 2010
Posts: 15
I am trying to use ssl in my server to make a secure connection with a server from one of our customers.
They sent us the certificate file (*.crt) and we are supposed to use it in our server.

I did not have idea about ssl and secure connections so I did some basic tutorials, I generated my keys using keytool and after
tested that loading https://localhost:8181. Everything seem working fine, but when I imported the customer certificate using keytool and I change
the name of the alias in my glassfish domain, https://localhost:8181 did not load again.

I checked with keytool -list and the certificate that I imported appears in the list with the other certificates that I created. Everything looks the same
but when I set the alias of that certificate in glassfish, https://localhost:8181 doesnt load.

Just to test I exported a crt file using one of the generated keys that was working. After that I imported the crt file and the https://localhost:8181 did not load again.
Then I think the problem is when I import the crt file, or maybe I am doing sth very stupid .

I have tried different parameters to import the crt file like:

keytool -import -file certificate.crt -alias cert

keytool -import -file certificate.crt -keystore keystore.jks -alias cert

keytool -import -v -trustcacerts -file certificate.crt -keystore keystore.jks -alias cert

Thanks for your help!!!


I agree. Here's the link:
subject: Problem with ssl and glassfish
It's not a secret anymore!