]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
hpke.h, thread.h: Add extern "C" for C++ inclusion
authorTomas Mraz <tomas@openssl.org>
Wed, 28 Jun 2023 09:43:37 +0000 (11:43 +0200)
committerPauli <pauli@openssl.org>
Thu, 29 Jun 2023 22:56:17 +0000 (08:56 +1000)
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)

include/openssl/hpke.h
include/openssl/thread.h

index 8f615edbdcf2c103d21ce3a1b89f607c867127e7..e39a485023d064c0aa881d713ba090b89a970275 100644 (file)
 # 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
index 68ecf9c4c4f30d0b576012de3e9dc9507a08df23..d34aa5ba949e90fbb69886a0afc62913054708bc 100644 (file)
 
 # 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 */