For this test we will create a wallet, add a cert then check its expiry, all command will be run in powershell.
1. Create Oracle Wallet (needs a strong password)
mkdir “F:\Test2”
cd “F:\Test2”
orapki wallet create -wallet “F:\Test2” -auto_login_local -pwd “ThisISaTest1234!”
2. Export cert from website browser using snowdba.com as an example
Using MS Edge go to website click padlock next to https, > Connect is Secure > click on the certificate Icon> Details > Export > Save as F:\Test2\snowdba.crt
3. Add cert to Oracle wallet
orapki wallet add -wallet “F:\Test2” -trusted_cert -cert “snowdba.crt” -pwd “ThisISaTest1234!”
4. Display wallet contents it should now have cert
orapki wallet display -wallet “F:\Test2” -pwd “ThisISaTest1234!”
output:
Oracle PKI Tool Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
Requested Certificates:
User Certificates:
Trusted Certificates:
Subject: CN=www.snowdba.com
5. Check expiry of cert
a. Export Cert from wallet
orapki wallet export -wallet “F:\Test2” -dn “CN=www.snowdba.com” -cert check_expiry.crt
b. display information on exported cert
orapki cert display -cert check_expiry.crt
Oracle PKI Tool Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
Subject: CN=www.snowdba.com
Issuer: CN=R3,O=Let’s Encrypt,C=US
Valid Until: Tue May 21 11:15:28 BST 2024
We can see above the certificate expires on May 21st
We can also create an view certificates using Wallet manager as below: