How to regenerate DemoIdentity.jks and DemoTrust.jks


How to regenerate DemoIdentity.jks and DemoTrust.jks file for weblogic


1. Regenerate DemoIdentity.jks

We can use below commands to regenerate DemoIdentity.jks

[orcloim@mydmain]$ export PATH=$PATH:/u01/java/jdk1.8.0_152/jre/bin

[orcloim@mydmain]$ java utils.CertGen -keyfilepass DemoIdentityPassPhrase -certfile democert -keyfile demokey -strength 1024
Error: Could not find or load main class utils.CertGen

Export CLASSPATH environment variable

[orcloim@mydmain]$ export CLASSPATH=$CLASSPATH:$OIM_HOME/wlserver/server/lib/weblogic.jar
[orcloim@mydmain]$ java utils.CertGen -keyfilepass DemoIdentityPassPhrase -certfile democert -keyfile demokey -strength 1024
[orcloim@mydmain]$ java utils.ImportPrivateKey -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyfile demokey.pem -keyfilepass DemoIdentityPassPhrase -certfile democert.pem -alias demoidentity
[orcloim@mydmain]$ keytool -list -v -keystore DemoIdentity.jks

copy DemoIdentity.jks file <OIM_DOMAIN>/security/ directory and restart admin and managed servers

2. Regenerate DemoTrust.jks

[orcloim@mydmain]$ cd <WL_HOME>/server/bin/
[orcloim@mydmain]$ . ./ 
[orcloim@mydmain]$ keytool -importcert -trustcacerts -alias wlscertgencab -keystore DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -file $WL_HOME/server/lib/CertGenCA.der

How to Decrypt SqlDeveloper connections passwords

To recover password we need two files named connections.xml & product-preferences.xml .
Above files can be available in below locations

On Windows :
%APPDATA%\SQL Developer\system*\o.jdeveloper.db.connection*\connections.xml
%APPDATA%\SQL Developer\system*\o.sqldeveloper*\product-preferences.xml

On Linux :

Continue reading

How to assign a Privileged Port to OHS

Problem :
Unable to assign port 80 & 443 to http & https respectively in OHS, which is running on Linux environment. Below error logged in OHS logs

[VirtualHost: main] (13)Permission denied: make_sock: could not bind to address [::]:443

On a UNIX system the TCP/IP port numbers below 1024 are special in that only processes with root privileges are allowed to listen on those ports. Continue reading