Home GnuPG

Remove duplicated code and make parse wrappers internally available.

Description

Remove duplicated code and make parse wrappers internally available.

* src/ber-help.c (_ksba_parse_sequence): New.  Code taken from ocsp.c
or crl.c and function name prefixed with _ksba_.
(_ksba_parse_context_tag): Ditto.
(_ksba_parse_enumerated): Ditto.
(_ksba_parse_integer): Ditto.
(_ksba_parse_octet_string): Ditto.
(_ksba_parse_optional_boolean): Ditto.
(_ksba_parse_object_id_into_str): Ditto.
(_ksba_parse_asntime_into_isotime): Ditto.
* src/ber-help.h: Add new prototypes and macros fro easier use.
(parse_skip): Moved from ocsp.c and crl.c as inline to here.
* src/crl.c: Remove parse fucntions.
* src/ocsp.c: Remove parse fucntions.
* src/Makefile.am (ber_dump_SOURCES): Add time.c
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 8 2020, 3:57 PM
Parents
rK1119068b2e9f: Very minor patch cleanup
Branches
Unknown
Tags
Unknown