Tomcat Server/Client Self-Signed SSL Certificate -


I have an Apache Tomcat 6.x server, which is running with a self-signed SSL certificate. I want to present my certificate to the server on the server so that I can prove it on the basis of users' database. I have to work all this on an example that I found online, but with example the canned certification and the creation of JSC datastore. I want to make my own datastore but there is no luck.

How do I create a datastore for Tomcat?
How do I create a self-signed certificate for Tomcat?

How do I create a self-signed certificate for the client?
How can I force Tomcat to believe in the customer's signature?

I am playing with Java key toll several hours now Finally, my problem has been solved, so I will post the result here if

P> Thanks for Michael Martin I came to know that:

By default the keytool uses the DSA algorithm when it produces self-signed certificates. These keys are accepted without any issues prior to the version of Firefox. Firefox 3 does not use DSA, with Beta 5, but uses RSA to fully accept "Keepal RSA" Passing Firefox 3 Beta 5 while creating a self-signed certificate.

I just set that flag, cleaned all the cache in Firefox and it worked magic! I am using it as a test-setup for my project and I need to share it with others, so I wrote a small batch which creates two SSL certificates. One can be dropped in a tomcat setup and the second one. P12 file that can be imported into Firefox / IE. Thanks!

Usage: The first command line argument is the username of the client. All passwords are "password" (no quotes). Change any of the hard-coded bits to meet your needs.

  close @echo if "% 1" == "" gotto use keytool -genkeypair -alias servercert -keyalg rsa -dname "cn = web server, ou = unit, o = organization, l = City, S = State, C US = "-keystore server.jks -storepass password -keypass password keytool -genkeypair -alias% 1 -keystore% 1.p12 -storetype PKCS12 -keyalg RSA -dname" CN =% 1, OU = Unit, O = Organization, L = City, S = State, C = America "-keypass password -storepass password keytool -exportcert -alias% 1 -file% 1 Certificate -keystore% 1.p12 -storetype PKCS12 -storepass password keytool -importcert -keystore server.jks -alias% 1 -file% 1.cer -v -trustcacerts -noprompt -storepass password keytool -List -v -keystore server.jks -Storpass password del% 1. Sense geto end: Usage echo needs User ID as the first argument: generated_kistore [username] goto end: end pause  

The result is two files The server is called jak, which you leave in Tomcat and another file that you import into your browser called {p1}. The client certificate in the server.jks file has been added as a trusted certificate.

I hope someone finds it useful.

And here's the XML that you can test on your bogus conf / sever.xml file (only on Tomcat 6.x)

  & lt; Connector clientAuth = "true" port = "8443" minSpareThreads = "5" maxSpareThreads = "75" EnableLookups = "true" disableUploadTimeout = "true" acceptCount = "100" maxThreads = "200" scheme = "https" secure = "correct "SSLEnabled =" true "keystoreFile =" $ {catalina.home} / conf /server.jks "keystoreType =" JKS "keystorePass =" password "truststoreFile =" $ {catalina.home} /conf/server.jks "truststoreType = "JKS" truststorePass = "password" SSLVerifyClient = "is required" SSLEngine = "on" SSLVerifyDepth = "2" SSL Protocol = "TLS" /> Talket 7:  
  & lt; Connector Protocol = "org.apache.coyote.http11.Http11NioProtocol" ports = "8443" SSLEnabled = "true for  

" MaxThreads = "200" scheme = "https" secure = " True "keystylefile =" $ {catalina.base} / conf /server.jks "keystore =" password "clientAuth =" false "SSL protocol =" TLS "/>


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -