• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

enabling SSL certs

Posts: 587
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gets me to have SSL always...

But I need to know how to set up the certs!

I was given two .crt files and a .key file.

What do I do?  Can I assign the cert from the admin console?

I'm clueless here, please help.

Posts: 1868
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You most likely have to do this on the server and their is most likely more then placing the files in the 'correct' location.
Certificates are usually tied to the fully qualified domain name e.g. www.google.com or with wildcard certificates to sub domains e.g. mydomain.google.com and yourdomain.google.com.

Step 1
Find out which domain(s) the certificate is good for.
Step 2:
- If the certificate was purchased from a certificate authority like GeoTrust then see exactly how they suggest you install the certificate
- A quick look at Google with these key terms glassfish ssl certificate install brings up many results.

So what exactly you have to do depends on the version of your Glassfish server. It looks like the steps for version 3 are different then the steps for version 4.
Saloon Keeper
Posts: 2619
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used Glassfish, but if it is like other Java applications, you will need to import the certs and private key in to the keystore that the server uses.

These are the two steps which I have used to do this:

Export private key and certificates to PKCS12 file
# openssl pkcs12 -export -in my-site.example.com.crt -inkey my-site.example.com.key -out my-site.example.com.p12 -name my-site.example.com -CAfile my-ca-cert.crt
Enter Export Password: xxxxxx
Verifying - Enter Export Password: xxxxxx

Import PKCS12 file to keystore
# keytool -importkeystore -deststorepass secret -destkeypass xxxxxx -destkeystore /path/to/keystore.jks -srckeystore my-site.example.com.p12 -srcstoretype PKCS12 -srcstorepass secret -alias my-site.example.com
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!