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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

enabling SSL certs

 
Author
Posts: 587
6
  • 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.

Robert
 
Bartender
Posts: 1868
81
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.
 
Sheriff
Posts: 3072
454
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 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
 
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic