From 46f7dddce75227f2e40ab94d66ceb9f19ee6b1b0 Mon Sep 17 00:00:00 2001 From: Thomas Pornin Date: Wed, 8 Jun 2022 08:15:39 -0400 Subject: [PATCH 1/3] Added macro that indicates presence of the time callback feature. Also added C++ compatibility. --- inc/bearssl.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/inc/bearssl.h b/inc/bearssl.h index 4f4797c..310edb2 100644 --- a/inc/bearssl.h +++ b/inc/bearssl.h @@ -137,6 +137,10 @@ #include "bearssl_x509.h" #include "bearssl_pem.h" +#ifdef __cplusplus +extern "C" { +#endif + /** \brief Type for a configuration option. * * A "configuration option" is a value that is selected when the BearSSL @@ -167,4 +171,13 @@ typedef struct { */ const br_config_option *br_get_config(void); +/* ======================================================================= */ + +/** \brief Version feature: support for time callback. */ +#define BR_FEATURE_X509_TIME_CALLBACK 1 + +#ifdef __cplusplus +} +#endif + #endif -- 2.17.1 From 79c060eea3eea1257797f15ea1608a9a9923aa6f Mon Sep 17 00:00:00 2001 From: Thomas Pornin Date: Mon, 20 Feb 2023 19:09:51 -0500 Subject: [PATCH 2/3] Fixed spurious warning about old-style prototype. --- src/rsa/rsa_i62_keygen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rsa/rsa_i62_keygen.c b/src/rsa/rsa_i62_keygen.c index 8f55c37..992fe97 100644 --- a/src/rsa/rsa_i62_keygen.c +++ b/src/rsa/rsa_i62_keygen.c @@ -40,7 +40,7 @@ br_rsa_i62_keygen(const br_prng_class **rng, /* see bearssl_rsa.h */ br_rsa_keygen -br_rsa_i62_keygen_get() +br_rsa_i62_keygen_get(void) { return &br_rsa_i62_keygen; } @@ -49,7 +49,7 @@ br_rsa_i62_keygen_get() /* see bearssl_rsa.h */ br_rsa_keygen -br_rsa_i62_keygen_get() +br_rsa_i62_keygen_get(void) { return 0; } -- 2.17.1 From 3c040368f6791553610e362401db1efff4b4c5b8 Mon Sep 17 00:00:00 2001 From: Thomas Pornin Date: Wed, 12 Jun 2024 10:56:12 -0400 Subject: [PATCH 3/3] Fix: make static ECDH selectable with the br_ssl_client_set_single_ec() helper function. --- src/ssl/ssl_ccert_single_ec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl/ssl_ccert_single_ec.c b/src/ssl/ssl_ccert_single_ec.c index 93ebcde..2e1e54f 100644 --- a/src/ssl/ssl_ccert_single_ec.c +++ b/src/ssl/ssl_ccert_single_ec.c @@ -69,6 +69,7 @@ cc_choose(const br_ssl_client_certificate_class **pctx, choices->hash_id = -1; choices->chain = zc->chain; choices->chain_len = zc->chain_len; + return; } } -- 2.17.1