X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=inc%2Fbearssl.h;h=4f4797cf7937dbdc1a2893c43fe8ce8df400680f;hp=6258e92605f735869b087f9beee03f31eeea6f89;hb=6433cc2e9dff891a2e4669cf50cec36bcf0bae61;hpb=e683ebfe1962ef5b00a972761984674528922a4a diff --git a/inc/bearssl.h b/inc/bearssl.h index 6258e92..4f4797c 100644 --- a/inc/bearssl.h +++ b/inc/bearssl.h @@ -39,9 +39,11 @@ * | :-------------- | :------------------------------------------------ | * | bearssl_hash.h | Hash functions | * | bearssl_hmac.h | HMAC | + * | bearssl_kdf.h | Key Derivation Functions | * | bearssl_rand.h | Pseudorandom byte generators | * | bearssl_prf.h | PRF implementations (for SSL/TLS) | * | bearssl_block.h | Symmetric encryption | + * | bearssl_aead.h | AEAD algorithms (combined encryption + MAC) | * | bearssl_rsa.h | RSA encryption and signatures | * | bearssl_ec.h | Elliptic curves support (including ECDSA) | * | bearssl_ssl.h | SSL/TLS engine interface | @@ -72,7 +74,17 @@ * does not include much failsafes or error reporting when the problem * does not arise from external transient conditions, and can be fixed * only in the application code. This is done so in order to make the - * total code footprint ligther. + * total code footprint lighter. + * + * + * ## `NULL` values + * + * Function parameters with a pointer type shall not be `NULL` unless + * explicitly authorised by the documentation. As an exception, when + * the pointer aims at a sequence of bytes and is accompanied with + * a length parameter, and the length is zero (meaning that there is + * no byte at all to retrieve), then the pointer may be `NULL` even if + * not explicitly allowed. * * * ## Memory Allocation @@ -114,13 +126,45 @@ #include "bearssl_hash.h" #include "bearssl_hmac.h" +#include "bearssl_kdf.h" #include "bearssl_rand.h" #include "bearssl_prf.h" #include "bearssl_block.h" +#include "bearssl_aead.h" #include "bearssl_rsa.h" #include "bearssl_ec.h" #include "bearssl_ssl.h" #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