libopendkim: Expose dkim_code_to_name() and dkim_name_to_code() with tables #207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before OpenDKIM 1.2.0,
dkim_code_to_name()
,dim_name_to_code()
and nametables for conversion had been hidden from outside of the library as a part of global name consolidation.However as a result of it, users of the libopendkim must maintain their own conversion tables if it is needed. Actually opendkim milter itself has its own conversion table for
dkim_alg_t
anddkim_canon_t
. I think it is very waistful.And when I've extended opendkim-testkey utility for supporting new
KeyTable
format, it also got need a conversion from name todkim_alg_t
.So I want those conversion functions and nametables, at least those nametables for the constants which is already exposed in
dkim.h
, to expose outside of library.For enable to change the structure of nametable without changing API,
the structure of nametable itself is not exposed. However, as there is some use case that need enumerating all items in the table, functions for iteration on the tables are also added.