Possible bug in GPGME Python
meep via Gnupg-devel <[email protected]>
| Newsgroups | gmane.comp.encryption.gpg.devel |
|---|---|
| Message-ID | <[email protected]> |
Good day.
I would like to report what I believe to be an oversight in the Python
wrapper of GPGME.
I am reporting it here as it is a minor thing, and account creation is
disabled on the bug tracker at dev.gnupg.org. I would also prefer not
to make an account if possible.
In the interact(...) function of the Context class on line 1089 in
core.py it is checked whether a key is actually passed in to the
function:
if key is None:
raise ValueError("First argument cannot be None")
Which is fine when editing a key, but when interacting with a smart
card (setting the flag INTERACT_CARD) - for example to generate a key
on it - there is not necessarily a key to be edited.
In interact_start(...) on line 131 of edit.c the presence of the key is
only checked if card_edit isn't set:
if ((card_edit == 0 && !key) || !fnc || !out)
return gpg_error (GPG_ERR_INV_VALUE);
This functions is called by gpgme_op_interact(...) in the same file
which is called from Python in the aforementioned interact(...)
function.
Thus I believe that the intended behavior in Python would be to mirror
the C code and only check whether the key is None if INTERACT_CARD is
not set.
Please correct me if I am wrong and point me in the right direction.
Thanks in advance
- meep
_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
signature.asc
(application/pgp-signature, 854 B)
-----BEGIN PGP SIGNATURE----- iQJDBAABCgAtFiEEnJcf7op1FgP4NuMA95dlHd8I+uUFAmY2PlwPHG1lZXBAbWVl cHMuZGV2AAoJEPeXZR3fCPrl2OUQAKhGeDjkA7FimkwW6qIT84kNg66j3UoC5LV5 bsOZCivBDNoGTnqop+CMRXuFXgSqtwCZ+tWeKwoWWhY+7sIomK+ebRWw3V8SH7bk 7VNc3FYyvZe6LIfOXMAfzRwBH64OD4CWhuEGs9ger/63n/KpDLYSt3iwtlzYRMJP jI75D13fPDaayEovM9GeDRXUJrBRb+lU5eMhbxVcTxMMWDmzTZ6hLJ4yr8si2Sl+ 90ZfdoSr7WohJfFu/MH58Sm7WVeItF2TGE/nB8EVas/jG12qfDrbDQkCyMS0fzOu LPUsNGI+urm4bxzNFVmIG3wKpHx3SjOaHMcjLWnitPRbexLlJ4T9GpSC1pW4ho4l mxsmmsYdATweJX/Sht9v2lkMzVhPskso3ERJsi0pk0zrh65fyHn4iwBoruNEj8sf IW4bLF0wPmyGL/v/kDqslKyMnHjpONHwgiJj/2P5RkQt/lPrgeIlOT8+tvVnqAUJ Vb5hunkdb6xiyc7tUJk6UkC8ZJwK6lpCngYEKkBe0xqesuy52Bj+cDPI2KQ0SjEZ 8GIYaQjJLh0Pr3q50NtXojTYmg8e/YqcFCRSttFeDC6y6r4PseZPt60D2pJ6j/xK +II4HvL4C7KyUPiogiRCIUfuFckQtK1N4EnYG2ezVB0SA5RwzvNT0cr/1clYWgYh rCRoXecB =KoN2 -----END PGP SIGNATURE-----