kurtbrose / pyjks

a pure python Java KeyStore file parser, including private key decryption
MIT License
130 stars 35 forks source link

Allow opening a store without passphrase #57

Closed elias5000 closed 4 years ago

elias5000 commented 4 years ago

In case of empty passphrase the integrity check needs to be skipped in order to be able to load a keystore. This copies the behavior of keytool.

mahmoud commented 4 years ago

Hi @elias5000! This seems like a reasonable change. I had to search around for keytool behavior, because I recalled it working differently back when we used it more. Still, this seems to mirror what some other projects have done.

Could I motivate you to add a test? The linked PR has a keystore with a blank password already, if you'd like to borrow that one.

elias5000 commented 4 years ago

I added a test using the truststore.jks from the PR you linked.

This is actually my use case: Opening a truststore that does not contain any private keys. I just need to get the certificates.

mahmoud commented 4 years ago

It's perfect, thank you! Will get this released ASAP. For now, feel free to install from master and give it a whirl. Thanks again!