Android - export single key/alias from keystore

前端 未结 1 887
-上瘾入骨i
-上瘾入骨i 2021-01-03 08:06

I have a single keystore (JKS) with a lot of key entries / aliases for different apps in it. Now one app will be moved to another developer and I want to export / extract th

相关标签:
1条回答
  • 2021-01-03 08:59

    This is bit less strigforward than exporting certificates (which can be exported with -exportcert) as you need to use -importkeystore and create new keystore with the key you want to "export", i.e.

    keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype PKCS12 -srcalias ALIAS -deststorepass PASS -destkeypass PASS

    Alternatively you can just copy your current keystore file and then remove all keys from it but the one you want to export.

    You can also check Keystore Explorer tool

    0 讨论(0)
提交回复
热议问题