Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.4k points)

I have a bunch of .keystore files and need to find one with specific CN and alias. Is there a way to do it with keytool, jarsigner or some other tool? I found a way to check if specific keystore was used to sign a specific apk, but I also need to get the alias and certificate name in each of the files.

1 Answer

0 votes
by (46k points)

You can manage the resulting command to list the content of your Keystore file (an alias name):

keytool -v -list -keystore .keystore

If you are viewing for a precise alias, you can further designate it in the command:

keytool -list -keystore .keystore -alias foo

If the alias is not observed, it will present an exception:

keytool error: java.lang.Exception: Alias does not exist

Related questions

...