-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import private key with passpharse #284
Comments
The key I am trying to import is:
When I do When I use
|
The actual stacktrace with exception is here:
|
I am using If I don't use it - there is no error, nor exception but the secret key is not imported - only the public key. |
Hi @pajuscz , I ran into this issue as well. You can simply pass Changes made within gnupg.py:
and
I tested these changes on my machine and I had a few unknown statuses which I had to patch as well within
|
I came across this while looking into this closed issue: #194
I wasn't able to import private key with passpharse using the same method. What happens is that public key is imported, but not the secret key - I cannot decrypt data after I do the import.
While looking into the code I don't think it is possible to import a key using passpharse, because the passpharse is set to False by default.
The _handle_io:
def _handle_io(self, args, file, result, passphrase=False, binary=False):
called from
import_keys(self, key_data)
is called in this fashion:self._handle_io(['--import'], data, result, binary=True)
I don't see a way to pass passphase there.When I 'hard-code' the passphasee into the
self._handle_io(['--import'], data, result, passphrase='secret', binary=True)
It works as expected. I think there should be a posibility to pass passpharse as an argument into GPG.import_keys()
The text was updated successfully, but these errors were encountered: