Added intermediate casts to void* to prevent spurious warnings (with Clang and -Wcast...
[BearSSL] / inc / bearssl_x509.h
index b394f6f..1f55b4e 100644 (file)
 #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