Home GnuPG

random: Make the DRBG C-90 clean and use a flag string.
95f1db3affb9Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

random: Make the DRBG C-90 clean and use a flag string.

* random/random.h (struct gcry_drbg_test_vector): Rename "flags" to
"flagstr" and turn it into a string.
* random/random-drbg.c (drbg_test_pr, drbg_test_nopr): Replace use of
designated initializers.  Use a string for the flags.
(gcry_rngdrbg_cavs_test): Parse the flag string into a flag value.
(drbg_healthcheck_sanity): Ditto.

Libgcrypt needs to be build-able on C-90 only systems and thus we
can't use C-99 designated initializers. Because we have removed the
flag macros from the API we should not use them in the CAVS test code
either. Thus they are replaced by the flag string which also tests
the flag string parser.

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

Details

Provenance
wernerAuthored on Feb 19 2016, 11:44 AM
Parents
rC85ed07790552: random: Symbol name cleanup for random-drbg.c.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC95f1db3affb9: random: Make the DRBG C-90 clean and use a flag string. (authored by Werner Koch <wk@gnupg.org>).Feb 19 2016, 2:35 PM