Self-Signed SSL Certificate For Weblogic


Self-Signed SSL Certificate for Weblogic


To create a self-signed cert:

keytool -genkeypair -alias vijay -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 365 -dname "cn=www.vijayarathinam.com, ou=WLS, o=Oracle, c=IN" -storepass password -keystore identity.jks

keytool -export -alias vijay -file root.cer -keystore identity.jks -storepass password

keytool -import -alias vijay -file root.cer -keystore trust.jks -storepass password -trustcacerts -noprompt 


Below are the steps to configure with Weblogic Server:

Step 1 :

Login to Weblogic Admin console --> Environment --> Servers --> < server_name_where_ssl_has_to_be_configured > --> Configuration -> General --> SSL Listen Port Enabled ( Check )

Note : The default SSL Listen Port would be 7002, change it if required. 

Step 2 :

Click on Keystores tab under " Configuration " tab :

Step 2a :

Click on the drop-down menu next to Keystores and select "Custom Identity and Custom Trust" 

Step 2b :

Now fill in the following information:

---Identity---  

Custom Identity Keystore : < location_of_identity_keystore_that_you_have_created>

NOTE : By default WLS will look for this keystore file in domain_home location.

 Custom Identity Keystore Type : jks

 Custom Identity Keystore Passphrase: < This_would_be_your_storepass >

 ---Trust---

 Custom Trust Keystore : < location_of_trust_keystore_that_you_have_created>

NOTE : By default WLS will look for this keystore file in domain_home location.

 Custom Trust Keystore Type : jks

 Custom Trust Keystore Passphrase: < This_would_be_your_storepass >

Step 2c :

Now save the changes and click on " SSL " tab :

Private Key Alias: < This_would_be_your_certificate_alias >

Private Key Passphrase: < This_would_be_your_keypass >

Step 3 :

Save the changes and click on the " >Advanced " field under the " SSL " tab :  

Set the " Hostname Verification: " to None ( from the drop down menu ).

Note : We need to select the hostname verification as none if the CN of the certificate is not the same as the hostname of the machine where WLS is installed. 

 Now access your Weblogic application over https URL :

 " https://localhost:7503/HelloWorldSecond/"



Thank You !
Vijayarathinam

Comments

Popular posts from this blog

SSL certificate in WebSphere Application Server

Tomcat Upgrade Steps on Windows.