Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

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. or with wildcard certificates to sub domains e.g. and

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.
Posts: 3072
Android Eclipse IDE Angular Framework TypeScript Redhat MicroProfile 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 -inkey -out -name -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 -srcstoretype PKCS12 -srcstorepass secret -alias
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic