Skip to content
Fix Code Error

How to check certificate name and alias in keystore files?

March 13, 2021 by Code Error
Posted By: Anonymous

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.

Solution

You can run the following command to list the content of your keystore file (and alias name):

keytool -v -list -keystore .keystore

If you are looking for a specific alias, you can also specify it in the command:

keytool -list -keystore .keystore -alias foo

If the alias is not found, it will display an exception:

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

Answered By: Anonymous

Related Articles

  • How to create a signed APK file using Cordova command line…
  • IOException in Java 8 when reading PKCS12 keystore created…
  • How to enable Google Play App Signing
  • How do you sign a Certificate Signing Request with your…
  • Converting a Java Keystore into PEM Format
  • Keytool is not recognized as an internal or external command
  • How to make a SIMPLE C++ Makefile
  • GLYPHICONS - bootstrap icon font hex value
  • Received fatal alert: handshake_failure through…
  • Trust Store vs Key Store - creating with keytool

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

How do I remove repeated elements from ArrayList?

Next Post:

Download a file by jQuery.Ajax

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Get code errors & solutions at akashmittal.com
© 2022 Fix Code Error