質問

I have a strange problem with one of my keystores. Depending on the directory I am in, the hash from keytool is different. The other strange thing is that it doesn't ask for a password even though it has one. For example:

$ keytool -exportcert -alias myalias -keystore ~/Desktop/Keys/mykey.keystore | openssl sha1 -binary | openssl base64
QXK1vA...
$ cd ~/Desktop/Keys/
$ keytool -exportcert -alias myalias -keystore mykey.keystore | openssl sha1 -binary | openssl base64
NqYlhGE...

Is it hosed?

役に立ちましたか?

解決

If you need the SHA1 of your key, just type in

$ keytool -exportcert -v -list -keystore mykey.keystore

By placing | openssl sha1 -binary | openssl base64 after that, you are encoding the output displayed by the keytool command. I suppose this is not what you normally want.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top