Thursday, 7 March 2024

SSL on OHS using orapki

1. Create a Wallet

C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet create
-wallet C:\SSL\default -auto_login_only

2. Generate a Certificate Signing Request (CSR)

C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet add -wallet C:\SSL\default 
-dn "CN=xxx.yyy.com ,OU=IT, O=XXX  Pvt Ltd, L=US , ST=TX , C=US" -keysize 2048 -auto_login_only
3. Export CSR

C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet export -wallet C:\SSL\default  -dn "CN=xxx.yyy.com ,OU=IT, O=XXX  Pvt Ltd, L=US , ST=TX , C=US"
-request xxx.yyy.com.csr

4. Once you have the Certs Signed - Import into wallet 

-- Import Root Certificate
C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet add -wallet C:\SSL\default 
-trusted_cert -cert c:\SSL\certs\RootCA.crt  -auto_login_only

-- Import Intermediate Certificate
C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet add -wallet C:\SSL\default 
-trusted_cert -cert c:\SSL\certs\RootInterCA.crt  -auto_login_only

-- Import User Certificate
C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet add -wallet C:\SSL\default 
-user_cert -cert c:\SSL\certs\User_Cert.crt  -auto_login_only

-- Verify the Wallet
 C:\Oracle\Middleware\Oracle_Home\oracle_common\bin\orapki wallet display -wallet C:\SSL\default 

Once Wallet is verified to have all the three certs - copy C:\SSL\default to the actual location of wallet defined under ssl.conf file. Finally, restart OHS to take the effect.

No comments:

Post a Comment