kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

Export pk8 file from keystore #274

Closed timea-techgirl closed 3 years ago

timea-techgirl commented 3 years ago

Is your feature request related to a problem? Please describe. Can't export private key in pk8 format

Describe the solution you'd like An option to export private key in pk8 format

Describe alternatives you've considered I used openssl to generate it

kaikramer commented 3 years ago

See here: http://keystore-explorer.org/doc/5.4/keyPairs.html#export-a-key-pairs-private-key

timea-techgirl commented 3 years ago

I just checked, still couldn't find how to export in pk8 format.

Need to get a certificate.pem and key.pk8, http://www.londatiga.net/it/how-to-sign-apk-zip-files/

kaikramer commented 3 years ago

The section in the manual is called "To export a Key Pair's private key as PKCS #8". Here is a short extract:

timea-techgirl commented 3 years ago

@kaikramer Thank you. I tried this before and didn't export it because the extension didn't automatically change from pcks8 to pk8. I noticed extensions changing automatically when I selected other options. But here, it remained the same. :) Hope that can be polished.

kaikramer commented 3 years ago

Ah, now I understand... The file extension has no effect or meaning for PKCS#8 files, however. There is no commonly accepted standard or best practice for naming PKCS#8 files. You can name the file however you like.

In the linked guide .pk8 was used, but that is completely arbitrary. For comparison: A question about converting a key to PKCS#8 with OpenSSL on Stackoverflow, where someone used the extension .pkcs8.pem and someone else used .key.

What matters is the actual format of the file content and KSE produces the same output format as OpenSSL.

Anyway, any user feedback is appreciated!

timea-techgirl commented 3 years ago

Oh I see, I saw many formats too for certificates and key files. It will be confusing for beginners.

To reduce the confusion, what about a dropdown list to choose among known formats? This would make us understand that it can be saved in various formats.