Page MenuHome GnuPG

core: Don't split gpgconf strings on comma

Authored by aheinecke on Apr 5 2017, 5:05 PM.


  • src/engine-gpgconf.c (gpgconf_parse_option): Don't split strings on comma.

    -- This only affects values where the main type is string. Values with the alt_type string but another main type are still split to keep lists (e.g. groups) working.
Test Plan

Checked with t-gpgconf that a group value is still a list and the default_pubkey_algo is ok

Diff Detail

rG GnuPG
Lint Skipped
Unit Tests Skipped

Event Timeline

Changing gpg or gpgconf is wrong. A string list is indicated by flag value 2 which is not set for that option and thus we do not have a string list.

There might be a bug in gpgme, though.

Update diff with arcanist

Maybe this fixes that no context is shown in the diff

Still wrong package. You need to address this in gpgme/src/engine-gpgconf.c.
Minor correction: the value of the flag is 1^2.

werner edited projects, added gpgme; removed gnupg.

I guess I should do this.

This revision now requires changes to proceed.Apr 5 2017, 5:45 PM
aheinecke edited edge metadata.

Patch now fixes the problem in gpgme

aheinecke retitled this revision from gpg: Escape commas in default_pubkey_algo to core: Don't split gpgconf strings on comma.Apr 5 2017, 6:40 PM
aheinecke edited the summary of this revision. (Show Details)
aheinecke edited the test plan for this revision. (Show Details)

Ping. Is this patch ok? I'm pretty sure it is and I've included it in Gpg4win but before I can push the default_pubkey_algo respecting change to Kleopatra I need this to work in GPGME.

I've accidentally pushed this commit. But I'm very sure it's Ok anyway and pretty trivial. And it's been over a month to object. I really need this patch to get keygen working with default_pubkey_algo in kleopatra. It was also included in the last gpg4win betas.