Skip to content
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

--no-use-agent passed to gpg2 by default #257

Open
crashvb opened this issue May 15, 2019 · 0 comments
Open

--no-use-agent passed to gpg2 by default #257

crashvb opened this issue May 15, 2019 · 0 comments

Comments

@crashvb
Copy link

crashvb commented May 15, 2019

Noticed a comment in gnupg.py for the deprecated use of --[no-]use-agent flags with gpg2; however, they still appear to be used during the initialization of the class:

DEBUG    gnupg:_meta.py:423 GPGBase._homedir_setter(): got directory '/tmp/tmpugw190_r'
DEBUG    gnupg:_meta.py:426 GPGBase._homedir_setter(): Check existence of '/tmp/tmpugw190_r'
DEBUG    gnupg:_meta.py:433 GPGBase._homedir_setter(): checking permissions
INFO     gnupg:_meta.py:442 Setting homedir to '/tmp/tmpugw190_r'
DEBUG    gnupg:_parsers.py:441 Got arg string: --list-config
DEBUG    gnupg:_parsers.py:422 Got groups: {'--list-config': ''}
DEBUG    gnupg:_parsers.py:428 Appending option: --list-config
DEBUG    gnupg:_parsers.py:441 Got arg string: --with-colons
DEBUG    gnupg:_parsers.py:422 Got groups: {'--with-colons': ''}
DEBUG    gnupg:_parsers.py:428 Appending option: --with-colons
DEBUG    gnupg:_meta.py:603 Sending command to GnuPG process:
['/usr/bin/gpg2', '--no-options', '--no-emit-version', '--no-tty', '--status-fd', '2', '--homedir', '/tmp/tmpugw190_r', '--no-default-keyring', '--keyring', '/tmp/tmpugw190_r/pubring.gpg', '--secret-keyring', '/tmp/tmpugw190_r/secring.gpg', '--no-use-agent', '--list-config', '--with-colons']

Code to reproduce:

gpg = gnupg.GPG(homedir=Path(tempfile.mkdtemp()))
passphrase = "testing"
input_data = gpg.gen_key_input(
    name_email="Test", name_real="[email protected]", passphrase=passphrase
)
keyid = str(gpg.gen_key(input_data))
kwargs = {"default_key": keyid}
gpg.sign(
    b"TEST DATA", clearsign=False, detach=True, passphrase=passphrase, **kwargs
)

python-gnupg: gnupg-2.3.1
gnupg: 1.4.20-1ubuntu3.3
gnupg2: 2.1.11-6ubuntu2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant