Made headers compatible with C++.

This commit is contained in:
Thomas Pornin 2017-04-06 01:03:54 +02:00
parent ee15f235c9
commit 042986b989
10 changed files with 80 additions and 0 deletions

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_block.h
*
* # Block Ciphers and Symmetric Ciphers
@ -1802,4 +1806,8 @@ void br_poly1305_ctmulq_run(const void *key, const void *iv,
*/
br_poly1305_run br_poly1305_ctmulq_get(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_ec.h
*
* # Elliptic Curves
@ -793,4 +797,8 @@ br_ecdsa_vrfy br_ecdsa_vrfy_asn1_get_default(void);
*/
br_ecdsa_vrfy br_ecdsa_vrfy_raw_get_default(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -29,6 +29,10 @@
#include <stdint.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_hash.h
*
* # Hash Functions
@ -1335,4 +1339,8 @@ void br_ghash_pwr8(void *y, const void *h, const void *data, size_t len);
*/
br_ghash br_ghash_pwr8_get(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -30,6 +30,10 @@
#include "bearssl_hash.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_hmac.h
*
* # HMAC
@ -200,4 +204,8 @@ size_t br_hmac_outCT(const br_hmac_context *ctx,
const void *data, size_t len, size_t min_len, size_t max_len,
void *out);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_pem.h
*
* # PEM Support
@ -232,4 +236,8 @@ br_pem_decoder_name(br_pem_decoder_context *ctx)
return ctx->name;
}
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_prf.h
*
* # The TLS PRF
@ -115,4 +119,8 @@ typedef void (*br_tls_prf_impl)(void *dst, size_t len,
const void *secret, size_t secret_len,
const char *label, const void *seed, size_t seed_len);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_rand.h
*
* # Pseudo-Random Generators
@ -249,4 +253,8 @@ br_hmac_drbg_get_hash(const br_hmac_drbg_context *ctx)
return ctx->digest_class;
}
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,6 +28,10 @@
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_rsa.h
*
* # RSA
@ -702,4 +706,8 @@ br_rsa_pkcs1_sign br_rsa_pkcs1_sign_get_default(void);
uint32_t br_rsa_ssl_decrypt(br_rsa_private core, const br_rsa_private_key *sk,
unsigned char *data, size_t len);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -35,6 +35,10 @@
#include "bearssl_rand.h"
#include "bearssl_x509.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \file bearssl_ssl.h
*
* # SSL
@ -4065,4 +4069,8 @@ int br_sslio_close(br_sslio_context *cc);
#define BR_ALERT_UNSUPPORTED_EXTENSION 110
#define BR_ALERT_NO_APPLICATION_PROTOCOL 120
#ifdef __cplusplus
}
#endif
#endif

View File

@ -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
@ -1245,4 +1249,8 @@ br_skey_decoder_get_ec(const br_skey_decoder_context *ctx)
}
}
#ifdef __cplusplus
}
#endif
#endif