Home GnuPG

New API to construct arbitrary DER objects in memory.

Description

New API to construct arbitrary DER objects in memory.

* src/der-builder.h (struct ksba_der_s, ksba_der_t): Move to ...
* src/ksba.h.in: here.
(ksba_der_release): New.
(ksba_der_builder_new): New.
(ksba_der_builder_reset): New.
(ksba_der_add_ptr): New.
(ksba_der_add_val): New.
(ksba_der_add_int): New.
(ksba_der_add_oid): New.
(ksba_der_add_bts): New.
(ksba_der_add_der): New.
(ksba_der_add_tag): New.
(ksba_der_add_end): New.
(ksba_der_builder_get): New.
* src/libksba.def: Add new functions.
* src/libksba.vers: Ditto.
* src/visibility.c: Add wrapper.
* src/visibility.h (ksba_der_add_val): Add usual macro magic.

This is a set of convenient functions to make building of DER objects
easy. The "add" function do not return an error so that the code is
not cluttered with error handling. ksba_der_builder_get instead
returns an error if any.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on May 12 2020, 12:03 PM
Parents
rK60943d9f1816: Allow parsing of EdDSA certificates.
Branches
Unknown
Tags
Unknown