Home GnuPG

Allow name-value lookup w/o a trailing colon for the name.

Description

Allow name-value lookup w/o a trailing colon for the name.

* src/name-value.c (_gpgrt_name_value_entry): Add field namelen.
(ascii_memcasecmp): New.
(same_name_p): New.
(valid_name): Strip the colon and return the length.
(do_nvc_add): Set namelen.
(_gpgrt_nvc_lookup): Simplify.
* tests/t-name-value.c (test_getting_values): Add some extra tests.

The requirement for a colon after the name is too cumbersome.

Details

Provenance
wernerAuthored on Mon, Apr 7, 11:20 AM
Parents
rE7ec1f27b60ee: New public API gpgrt_nvc_* and gpgrt_nve_*
Branches
Unknown
Tags
Unknown