Step 1:
Search Command Prompt (CMD) on Start Menu, right click and select “Run as administrator”
Step 2:
In CMD, “cd” to the path of “C:\Program Files\Java\jre8\bin”.
Step 3:
Export the certificate storing file to plain text to search correct aliasname, by using command keytool -list -keystore ../lib/security/cacerts -rfc > C:\Users\master\Desktop\certfile.txt
- Password may require: changeit
- .txt file was created under desktop, you can look for certfile.txt
Step 4:
Look for the latest “Creation date” and that’s the certificate using and require to replace a new certificate. Take note on the “Alias Name”, for example NameOfTheAlias
Step 5:
Once locate the alias name, back to Administrator Command Prompt and insert command keytool -delete -alias NameOfTheAlias -keystore ../lib/security/cacerts
- NameOfTheAlias is the alias name, how’s going to retrieve may refer Step 3 & Step 4
- Password may require: changeit
Once successfully remove old certificate, minimize CMD and proceed next step.
Step 6:
Open browser (Google Chrome) and navigate to API connect URL (for example: https://app.geneexpress.com/api/1.0/). Retrieve the certificate by click the lock beside URL > Certificate > Details > Copy to file… , select Base-64 encoded X.509, and complete the wizard for export to Desktop/Folder. Extension may select (.cer) or (.crt).
Step 7:
Once certificate successfully downloaded, rename to any specific project for easy search in future, for example: ge2020.crt / ge2020.cer
- You may store certificate file under a folder (for example, store under C:\apps\chemolimsnx)
Step 8:
Open back the CMD minimize from Step 5, make sure the CMD existing path is at “C:\Program Files\Java\jre8\lib\security”, let said the certificate name we just added at Step 6 & Step 7 is call “ge2020.crt”, and store under chemolimsnx folder, insert below command:
keytool -import -trustcacerts -file C:\apps\chemolimsnx\ge2020.crt -alias NameOfTheAlias -keystore ../lib/security/cacerts
- NameOfTheAlias is the alias name, how to retrieve may refer to Step 3 & Step 4
- Password may require: changeit
- Trust this certificate? Will be asking after insert password, insert/input “Yes” and click Enter