projects
/
BearSSL
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ee15f23
)
Made headers compatible with C++.
author
Thomas Pornin
<pornin@bolet.org>
Wed, 5 Apr 2017 23:03:54 +0000
(
01:03
+0200)
committer
Thomas Pornin
<pornin@bolet.org>
Wed, 5 Apr 2017 23:03:54 +0000
(
01:03
+0200)
inc/bearssl_block.h
patch
|
blob
|
history
inc/bearssl_ec.h
patch
|
blob
|
history
inc/bearssl_hash.h
patch
|
blob
|
history
inc/bearssl_hmac.h
patch
|
blob
|
history
inc/bearssl_pem.h
patch
|
blob
|
history
inc/bearssl_prf.h
patch
|
blob
|
history
inc/bearssl_rand.h
patch
|
blob
|
history
inc/bearssl_rsa.h
patch
|
blob
|
history
inc/bearssl_ssl.h
patch
|
blob
|
history
inc/bearssl_x509.h
patch
|
blob
|
history
diff --git
a/inc/bearssl_block.h
b/inc/bearssl_block.h
index
31c4ed6
..
415bc28
100644
(file)
--- a/
inc/bearssl_block.h
+++ b/
inc/bearssl_block.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_block.h
*
* # Block Ciphers and Symmetric Ciphers
/** \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);
*/
br_poly1305_run br_poly1305_ctmulq_get(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_ec.h
b/inc/bearssl_ec.h
index
3de86b4
..
533296d
100644
(file)
--- a/
inc/bearssl_ec.h
+++ b/
inc/bearssl_ec.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_ec.h
*
* # Elliptic Curves
/** \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);
*/
br_ecdsa_vrfy br_ecdsa_vrfy_raw_get_default(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_hash.h
b/inc/bearssl_hash.h
index
d06bae4
..
860ab71
100644
(file)
--- a/
inc/bearssl_hash.h
+++ b/
inc/bearssl_hash.h
@@
-29,6
+29,10
@@
#include <stdint.h>
#include <string.h>
#include <stdint.h>
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_hash.h
*
* # Hash Functions
/** \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);
*/
br_ghash br_ghash_pwr8_get(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_hmac.h
b/inc/bearssl_hmac.h
index
71e9451
..
511dbbe
100644
(file)
--- a/
inc/bearssl_hmac.h
+++ b/
inc/bearssl_hmac.h
@@
-30,6
+30,10
@@
#include "bearssl_hash.h"
#include "bearssl_hash.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_hmac.h
*
* # HMAC
/** \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);
const void *data, size_t len, size_t min_len, size_t max_len,
void *out);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_pem.h
b/inc/bearssl_pem.h
index
42b2305
..
5e466bc
100644
(file)
--- a/
inc/bearssl_pem.h
+++ b/
inc/bearssl_pem.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_pem.h
*
* # PEM Support
/** \file bearssl_pem.h
*
* # PEM Support
@@
-232,4
+236,8
@@
br_pem_decoder_name(br_pem_decoder_context *ctx)
return ctx->name;
}
return ctx->name;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_prf.h
b/inc/bearssl_prf.h
index
1ad4a04
..
39d1c42
100644
(file)
--- a/
inc/bearssl_prf.h
+++ b/
inc/bearssl_prf.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_prf.h
*
* # The TLS PRF
/** \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);
const void *secret, size_t secret_len,
const char *label, const void *seed, size_t seed_len);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_rand.h
b/inc/bearssl_rand.h
index
2cc9ace
..
59628fb
100644
(file)
--- a/
inc/bearssl_rand.h
+++ b/
inc/bearssl_rand.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_rand.h
*
* # Pseudo-Random Generators
/** \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;
}
return ctx->digest_class;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_rsa.h
b/inc/bearssl_rsa.h
index
8c79157
..
fc6cd00
100644
(file)
--- a/
inc/bearssl_rsa.h
+++ b/
inc/bearssl_rsa.h
@@
-28,6
+28,10
@@
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_rsa.h
*
* # RSA
/** \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);
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
#endif
diff --git
a/inc/bearssl_ssl.h
b/inc/bearssl_ssl.h
index
fee7b3c
..
21d162b
100644
(file)
--- a/
inc/bearssl_ssl.h
+++ b/
inc/bearssl_ssl.h
@@
-35,6
+35,10
@@
#include "bearssl_rand.h"
#include "bearssl_x509.h"
#include "bearssl_rand.h"
#include "bearssl_x509.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_ssl.h
*
* # SSL
/** \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
#define BR_ALERT_UNSUPPORTED_EXTENSION 110
#define BR_ALERT_NO_APPLICATION_PROTOCOL 120
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif
diff --git
a/inc/bearssl_x509.h
b/inc/bearssl_x509.h
index
2463c79
..
1f55b4e
100644
(file)
--- a/
inc/bearssl_x509.h
+++ b/
inc/bearssl_x509.h
@@
-32,6
+32,10
@@
#include "bearssl_hash.h"
#include "bearssl_rsa.h"
#include "bearssl_hash.h"
#include "bearssl_rsa.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file bearssl_x509.h
*
* # X.509 Certificate Chain Processing
/** \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
#endif