Previous: Buffer description, Up: Utilities [Contents][Index]
Although GCRYCTL_PRINT_CONFIG can be used to print
configuration options, it is sometimes necessary to check them in a
program.  This can be accomplished by using this function:
This function returns a malloced string with colon delimited configure
options.  With a value of 0 for mode this string resembles the
output of GCRYCTL_PRINT_CONFIG.  However, if what is not
NULL, only the line where the first field (e.g. "cpu-arch") matches
what is returned.
Other values than 0 for mode are not defined.  The caller shall
free the string using gcry_free.  On error NULL is returned and
ERRNO is set; if a value for what is unknown, ERRNO will be set to 0.