isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

How to sign a file with exist key #127

Closed zhangtianye closed 7 years ago

zhangtianye commented 8 years ago

I want to sign a file,with a exist key stored in /home/z/mykey/.gnupg, How can I use it to sign a file in python-gnupg? When I use gpg.sign_file(stream), I got a error: 'GPG' object has no attribute 'sign_file'

stefan2904 commented 8 years ago

you could try sign https://python-gnupg.readthedocs.io/en/latest/gnupg.html#gnupg.GPG.sign or _sign_file (internal API) https://python-gnupg.readthedocs.io/en/latest/gnupg.html#gnupg._meta.GPGBase._sign_file

isislovecruft commented 7 years ago

Thanks for answering that @stefan2904!

@zhangtianye I hope that answered your question, feel free to reopen if otherwise.