Solved

tomcat 6 (not 7) ssl problem (certificate issues)

Posted on 2014-10-10
11
395 Views
Last Modified: 2014-10-22
Hi;

I have created a keystore and CSR for SSL with the following command:
      
%JAVA_HOME%\bin\keytool -genkey -alias server -keyalg RSA \
  -keystore \path\to\my\keystore

Then I received 2 files from the certificate authority, abc.com.cer and abc.om.p7b

From this point, no matter what I have done, i couldn't make the SSL work on my Tomcat 6.
I followed the steps under, http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
but I failed to import p7b so I convert it crt file and successfully import it.
My application for http, is using 55012 and I want to use the port 443 for https.
Following is my server.xml

<Connector port="443"
maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75" enableLookups="false"
disableUploadTimeout="true" acceptCount="100"
scheme="https" secure="true" SSLEnabled="true"
clientAuth="false" sslProtocol="TLS"
keyAlias="server" keystoreFile="/path/to/JKSfile/your_site_name.jks"
keystorePass="your_keystore_password" />

Now my questions are

1) my keystore alias is server and i send my csr after this.
To clean the things up, I want to delete my keystore but is it fine if I generate the key with another alias, e.g. tomcat as in the tomcat documentation?
2) I have the files, cer and crt (p7b), so is fine or should I need stg extra?
3) Is the order of import important?`first crt then cer?
4) What are the correct import commands? Should I trust tomcat documentation or authorities documentation?

My tomcat version is as follows:

Server version: Apache Tomcat/6.0.36
Server built:   Oct 16 2012 09:59:09
Server number:  6.0.36.0
OS Name:        Windows 7
OS Version:     6.1
Architecture:   amd64
JVM Version:    1.7.0_21-b11
JVM Vendor:     Oracle Corporation

Regards.
0
Comment
Question by:jazzIIIlove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40374545
Java security baseline is 7u65
There is no problem with tomcat.

They sent you certificate in 2 formats. Remember that keytool needs to know that your private key has alias 'server'
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40374695
So while importing crt and cer, i need to use alias as server. Correct?
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40375010
You need to import just one. It is same cryptographic signature in 2 different formats.
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40375131
Hi,

Is it abc.com.cer (which is the intermediate) or abc.com.p7b to import?

Can you write down the exact command? I am a little desperate..
0
 
LVL 62

Expert Comment

by:gheist
ID: 40375134
Consult your CA documentation. p7b is for IIS
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40375168
Yes. I couldn't import p7b so i converted to crt to import to java keystore. So what you say is that i need to import only crt (cer is intermediate certificate and no need to import it?). And i need to use the same alias that i used to generate the CSR. Correct?

I strongly appreciate your interest in question btw. As you see, noone else is commenting currently. I would personally request  5000 pts award instead of 500pts as noone got interested in some areas inEE
0
 
LVL 62

Expert Comment

by:gheist
ID: 40375181
Would be nice if you manage to tell which CA you used and your domain name. Domain abc.com uses Apache, thats not yours I assume.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40375670
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

It's the geotrust, https://www.geocerts.com/install/tomcat

it says,

keytool -import -trustcacerts -alias tomcat -file your_site_name.p7b -keystore mykeystore.jks
You MUST you the same alias used when the keystore was created, in this case the alias used was tomcat

the thing is that i made csr with alias "server", and also unable to install p7b, so my customer send me a converted version, crt.

Now, to be on the safe side, should i delete the keystore and regenerate the csr with alias "tomcat"?
Or should "I" convert p7b to crt file? (Note that I have the other certificate which is a cer file)

And do you think above Connector is fine?

I really wish to give the domain name but the certificate is not in place currently.

Thanks for thousand times!
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40375800
0
 
LVL 62

Expert Comment

by:gheist
ID: 40375899
Tomcat 6 is not compatible with java 1.8
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40375955
Which java should i use for tomcat 6?
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question