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.67k stars 271 forks source link

Transfer subject and extensions #375

Closed jgrateron closed 1 year ago

jgrateron commented 2 years ago

I am currently renewing certificates and I find this option to copy the subject and extensions of another certificate useful.

image

when you press transfer, the dialog box for displaying certificates from a store appears for you to select one.

image

image

https://github.com/jgrateron/keystore-explorer/tree/transfer

When you are able to review it, changes need to be made to the labels.

jgrateron commented 2 years ago

Thanks @The-Lum

image

The-Lum commented 2 years ago

👍 [Just for traceability] Good enhancement from this remark: https://github.com/jgrateron/keystore-explorer/commit/a8941b3c4b5f01e3204ec1ce09d86f31b63fe7d1#r76844143

kaikramer commented 2 years ago

This is certainly a very useful feature and I also like the improvement of the button label by @The-Lum.

I have looked at the source code and it seems fine for me. There is a class that you can use for updating the transferred extensions: X509ExtensionSetUpdater.java

The-Lum commented 2 years ago

Hello @jgrateron, and all,

I saw also the code, and I have a remark:

As for X509ExtensionType.SUBJECT_KEY_IDENTIFIER, perhaps could you make the similar thing with Auth. Key Id (AKI), with checking if the signature key is the same or not, and if not: update the value on the same format and with the right value.

Thanks for this enhancement. Regards.

kaikramer commented 2 years ago

@The-Lum That is all handled by the class that I recommended in my comment.

jgrateron commented 2 years ago

Hi, I have already made the adjustments

Thanks @kaikramer , @The-Lum