如標題,
正在使用的要怎麼查詢呢?
Windows環境應該會在這個路徑
C:\User\[YOUR ACCOUNT]\.keystore
linux 環境可以從keytool的path找起.
這邊有一段sh, 測試過可以執行.
#! /bin/bash
CACERTS=$(readlink -e $(dirname $(readlink -e $(which keytool)))/../lib/security/cacerts)
if keytool -list -keystore $CACERTS -storepass changeit > /dev/null ; then
echo $CACERTS
else
echo 'Can not find cacerts file.' >&2
exit 1
fi