Step 1:Open Terminal and put below the comman.
sh.4.4$ /usr/lib/jvm/java-1.6.0/bin/keytool -genkey -alias tomcat -keyalg RSA
server.
keystore
OR
%JAVA_HOME%\bin\keytool
-genkey -alias tomcat -keyalg RSA \
-keystore \path\to\my\keystore
This command will create a new file, in the
home directory of the user under which you run it, named "
.keystore
".
After executing this command, you will first
be prompted for the keystore password. The default password used by JBoss Web
is "
changeit
"
(all lower case), although you can specify a custom password if you like.
Next, you will be prompted for general
information about this Certificate, such as company, contact name, and so on.
This information will be displayed to users who attempt to access a secure page
in your application, so make sure that the information provided here matches
what they will expect.
Please check in below the screen shot.
Note:
your private key password and keystore password should be the same. If they
differ, you will get an error along the lines of
java.io.IOException:
Cannot recover key
Step:2 Configure your secure socket in the
/var/lib/jbossas/server/atg_production/deploy/jbossweb.sar/server.xml
($CATALINA_HOME/conf/server.xml)
Copy below
the code into server.xml
protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="25" scheme="https"
secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
keystorePass="changeit"
/>
https://localhost:8080/sample
NOTE:
(1) Not supplying identity information: this indicates that there is a valid security certificate, but it is an ordinary certificate and not an EVSSL (green lock) certificate. Same as a gray padlock, as far as the main page goes. So that part of the message is not worrisome unless the site used to show a green padlock before.
(2) Gray exclamation-triangle: this indicates that that the page contains "mixed" content. More specifically, although the page was retrieved through an encrypted connection (HTTPS) with a valid certificate, something in the page was retrieved over an open connection.