diff options
author | Tomas Mraz <tomas@openssl.org> | 2023-06-28 11:43:37 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-06-30 08:56:17 +1000 |
commit | ed5c0dfdf4f2d386fadfadcd8692a521061c772d (patch) | |
tree | 5cc4e2adba71989ed084eb8c241333dd4e9a25b5 | |
parent | 44957a49329135163a4138b1877ccf7f899d19b9 (diff) |
hpke.h, thread.h: Add extern "C" for C++ inclusion
Fixes #21305
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21307)
-rw-r--r-- | include/openssl/hpke.h | 8 | ||||
-rw-r--r-- | include/openssl/thread.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/openssl/hpke.h b/include/openssl/hpke.h index 8f615edbdc..e39a485023 100644 --- a/include/openssl/hpke.h +++ b/include/openssl/hpke.h @@ -72,6 +72,10 @@ # define OSSL_HPKE_ROLE_SENDER 0 # define OSSL_HPKE_ROLE_RECEIVER 1 +# ifdef __cplusplus +extern "C" { +# endif + typedef struct { uint16_t kem_id; /* Key Encapsulation Method id */ uint16_t kdf_id; /* Key Derivation Function id */ @@ -157,4 +161,8 @@ size_t OSSL_HPKE_get_ciphertext_size(OSSL_HPKE_SUITE suite, size_t clearlen); size_t OSSL_HPKE_get_public_encap_size(OSSL_HPKE_SUITE suite); size_t OSSL_HPKE_get_recommended_ikmelen(OSSL_HPKE_SUITE suite); +# ifdef __cplusplus +} +# endif + #endif diff --git a/include/openssl/thread.h b/include/openssl/thread.h index 68ecf9c4c4..d34aa5ba94 100644 --- a/include/openssl/thread.h +++ b/include/openssl/thread.h @@ -16,8 +16,16 @@ # include <openssl/types.h> +# ifdef __cplusplus +extern "C" { +# endif + uint32_t OSSL_get_thread_support_flags(void); int OSSL_set_max_threads(OSSL_LIB_CTX *ctx, uint64_t max_threads); uint64_t OSSL_get_max_threads(OSSL_LIB_CTX *ctx); +# ifdef __cplusplus +} +# endif + #endif /* OPENSSL_THREAD_H */ |