X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=inc%2Fbearssl_x509.h;h=1f55b4e74e6f32d8f039de388f4fdc83b255d00b;hp=b394f6ffedb8e0b452e41a0c8e8f2e41a4f5c6e0;hb=127fb4a31d24e58fa8e04a154c6e87a2cb28245b;hpb=9e71c0673a9f46f82e43125919619f296698292e diff --git a/inc/bearssl_x509.h b/inc/bearssl_x509.h index b394f6f..1f55b4e 100644 --- a/inc/bearssl_x509.h +++ b/inc/bearssl_x509.h @@ -32,6 +32,10 @@ #include "bearssl_hash.h" #include "bearssl_rsa.h" +#ifdef __cplusplus +extern "C" { +#endif + /** \file bearssl_x509.h * * # X.509 Certificate Chain Processing @@ -822,6 +826,20 @@ br_x509_minimal_set_ecdsa(br_x509_minimal_context *ctx, ctx->iec = iec; } +/** + * \brief Initialise a "minimal" X.509 engine with default algorithms. + * + * This function performs the same job as `br_x509_minimal_init()`, but + * also sets implementations for RSA, ECDSA, and the standard hash + * functions. + * + * \param ctx context to initialise. + * \param trust_anchors trust anchors. + * \param trust_anchors_num number of trust anchors. + */ +void br_x509_minimal_init_full(br_x509_minimal_context *ctx, + const br_x509_trust_anchor *trust_anchors, size_t trust_anchors_num); + /** * \brief Set the validation time for the X.509 "minimal" engine. * @@ -1231,4 +1249,8 @@ br_skey_decoder_get_ec(const br_skey_decoder_context *ctx) } } +#ifdef __cplusplus +} +#endif + #endif