Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to delete 2 alias entries from keystore?

Tags:

I have imported multiple certificates(with alias name) into pc.keystore. I want to delete 2 aliases (mydomain and ourdomain) entries from the keystore.

I know we can delete one entry from keystore using alias like:

keytool -delete -alias mydomain -keystore pc.keystore

But i want to delete two aliases (mydomain and ourdomain) entries from pc.keystore. Is there any option to achieve this ?

Thanks in advance.

like image 555
Mohan Avatar asked May 22 '13 09:05

Mohan


People also ask

How do I remove an alias from a keystore?

Use case to delete an alias from a keystore. In the case of a trust store on occasion, an external trusted system will change root certificates in which case you should either update your alias with the new trusted root, or delete the alias and create a new entry with a new alias.

How do I delete a certificate alias?

Check the contents of the trust store by entering the following in the command prompt: <JAVA_HOME>\bin\keytool -list -v -keystore truststore -storepass access . Note the alias names of the certificates you want to remove. Enter <JAVA_HOME>\bin\keytool -delete -alias <alias name> -keystore truststore.

Can a keystore have multiple alias?

And the only way you can sign with a different alias would be to clone the previous one as the answer also suggests.


1 Answers

Is there a reason you can't do this?

keytool -delete -alias mydomain -keystore pc.keystore
keytool -delete -alias ourdomain -keystore pc.keystore
like image 193
vikingsteve Avatar answered Oct 26 '22 23:10

vikingsteve