Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > BOOK: Professional Apache Tomcat
|
BOOK: Professional Apache Tomcat
This is the forum to discuss the Wrox book Professional Apache Tomcat by Chanoch Wiggers, Ben Galbraith, Vivek Chopra, Sing Li, Debashish Bhattacharjee, Amit Bakore, Romin Irani, Sandip Bhattacharya, Chad Fowler; ISBN: 9780764543722
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2011, 10:54 AM
Registered User
 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default TLS-Protokoll with embedded Tomcat 6

Hi to all,

I need urgent help in implementing SSL encryption!
With the normal HTTP protocol, my application with embedded Tomcat 6 works without problems.
When I insert the following connectors, I can receive the webclient over the URL HTTP://localhost:8080
and HTTP://localhost:8443, instead of https://localhost:8443!

...

/ / Create a connector that listens on all addresses
/ / On port 8080
Connector connector = embedded.createConnector (
(String) null, 8080 false);

/ / Wire up the connector
embedded.addConnector (connector);

/ / Ssl connector
Connector sslConnector embedded.createConnector = (
(Java.net.InetAddress) null, 8443, true);

sslConnector.setProtocol ("TLS");
sslConnector.setSecure (true);
sslConnector.setEnableLookups (false);
sslConnector.setAttribute (keypass "," changeit ");
sslConnector.setAttribute ("keystore", catalina home +
"/ keys / .keystore");
sslConnector.setAttribute (ClientAuth "," false ");

/ / Wire up the sslconnector
embedded.addConnector (sslConnector);
...

I tried also the following version for the sslConnector:

...
Connector sslConnector embedded.createConnector =
((java.net.InetAddress) null, sslPort, true);
IntrospectionUtils.setProperty (sslConnector, "port", "8443");
IntrospectionUtils.setProperty (sslConnector, "SslProtocols", "TLS");
IntrospectionUtils.setProperty (sslConnector,
"keystore file", catalina home + "/ keys / .keystore");
IntrospectionUtils.setProperty (sslConnector,
"keystore pass", "kspass");
IntrospectionUtils.setProperty (sslConnector,
"keystore type", "JKS");
IntrospectionUtils.setProperty (sslConnector, "clientAuth", "false");
IntrospectionUtils.setProperty (this, "SSLEnabled", "true");

embedded.addConnector (sslConnector);
...

With the same result! It causes no errors in both trials. I can't understand the javaworld!
Can someone tell me where I make the mistake and show me a working solution?

Thanks for your helps

Andi





Similar Threads
Thread Thread Starter Forum Replies Last Post
ciphersuites in TLS/SSL Daniel_DA BOOK: Beginning Cryptography with Java 6 March 3rd, 2010 12:09 PM
Security + embedded tomcat allanws Apache Tomcat 0 April 29th, 2009 04:58 PM
[Tomcat 6] What is 'tomcat-users.xml'?? Bugslayer All Other Wrox Books 0 April 21st, 2009 08:06 PM
JNDI setup in Embedded Tomcat 5.0.19 Pretty Apache Tomcat 3 July 12th, 2005 06:55 AM
JWS Axis Tomcat (posted to Apache Tomcat too) rushman Servlets 0 April 15th, 2005 09:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.