Skip to content

Instantly share code, notes, and snippets.

@jrwarwick
Created June 22, 2018 23:32
Show Gist options
  • Save jrwarwick/907f60c7729dd85967e511d19bbe7570 to your computer and use it in GitHub Desktop.
Save jrwarwick/907f60c7729dd85967e511d19bbe7570 to your computer and use it in GitHub Desktop.
Oracle Wallet population with Trusted Certificate Authority SSL Certificates extracted from Windows
#Use a powershell exporter script to get all the current trusted root CA certs in a folder, then copy up to db server
for sslcert in /tmp/ssl_trusted_cert_export/* ; do openssl pkcs12 -in $sslcert -nokeys -out $( echo $sslcert | sed 's/\.p12/.pem/' ) ; done
mkdir /tmp/ssl_trusted_cert_export/pem && mv /tmp/ssl_trusted_cert_export/*.pem /tmp/ssl_trusted_cert_export/pem/
su - oracle
# Select source ora env
mkdir -p $ORACLE_BASE/wallets/apex
cd $ORACLE_BASE/wallets/apex
export OWAAPW='<$ecretPa55w0rdHere-4-apexInternalAdmin>'
orapki wallet create -wallet https_wallet -pwd "$OWAAPW" -auto_login
# Just press enter over and over again here.
for sslcert in /tmp/ssl_trusted_cert_export/pem/* ; do orapki wallet add -wallet https_wallet -cert $sslcert -trusted_cert -pwd "$OWAAPW" ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment