keytool -list produces message "BCFKS not found"
search cancel

keytool -list produces message "BCFKS not found"

book

Article ID: 217401

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

When running following command to obtain list of all alias in the keystore of Autosys Webserver 

cd /opt/CA/WorkloadAutomationAE/autouser.$AUTOSERV/webserver/conf

$JAVA_HOME/bin/keytool -list -v -keystore .keystore  -storepass <keystorepass> -storetype BCFKS

(note: replace keystorepass with correct password, default is changeit)

following error message is produced

keytool error: java.security.KeyStoreException: BCFKS not found
java.security.KeyStoreException: BCFKS not found
        at java.security.KeyStore.getInstance(KeyStore.java:851)
        at sun.security.tools.keytool.Main.doCommands(Main.java:796)
        at sun.security.tools.keytool.Main.run(Main.java:368)
        at sun.security.tools.keytool.Main.main(Main.java:361)
Caused by: java.security.NoSuchAlgorithmException: BCFKS KeyStore not available
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
        at java.security.Security.getImpl(Security.java:695)
        at java.security.KeyStore.getInstance(KeyStore.java:848)
        ... 3 more

 

Cause

keytool doesn't recognize the BCKFS format unless provider and path are specified

Resolution

$JAVA_HOME/bin/keytool -provider org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider -providerpath $AUTOSYS/lib/bc-fips.jar -storepass <keystorepass>  -storetype BCFKS -list  -v -keystore .keystore

(note: replace keystorepass with correct password, default is changeit)