X-Git-Url: https://bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=inc%2Fbearssl.h;h=3d5e63abdb05975fbd6f175b4f047bf572b13b63;hp=de62963727457e336f320a8fd814b82e2b30ce96;hb=af9c79a0710a45361f9ae4313f8bb5bf738c3b7a;hpb=5b980fb6250788735f56d9640696864e82e35f59 diff --git a/inc/bearssl.h b/inc/bearssl.h index de62963..3d5e63a 100644 --- a/inc/bearssl.h +++ b/inc/bearssl.h @@ -135,4 +135,34 @@ #include "bearssl_x509.h" #include "bearssl_pem.h" +/** \brief Type for a configuration option. + * + * A "configuration option" is a value that is selected when the BearSSL + * library itself is compiled. Most options are boolean; their value is + * then either 1 (option is enabled) or 0 (option is disabled). Some + * values have other integer values. Option names correspond to macro + * names. Some of the options can be explicitly set in the internal + * `"config.h"` file. + */ +typedef struct { + /** \brief Configurable option name. */ + const char *name; + /** \brief Configurable option value. */ + long value; +} br_config_option; + +/** \brief Get configuration report. + * + * This function returns compiled configuration options, each as a + * 'long' value. Names match internal macro names, in particular those + * that can be set in the `"config.h"` inner file. For boolean options, + * the numerical value is 1 if enabled, 0 if disabled. For maximum + * key sizes, values are expressed in bits. + * + * The returned array is terminated by an entry whose `name` is `NULL`. + * + * \return the configuration report. + */ +const br_config_option *br_get_config(void); + #endif