mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Add extern "C" to headers. Some files are missing this, which can cause issues with some compilers when using the C++ mode.
This commit is contained in:
@ -33,6 +33,11 @@
|
|||||||
#include <wolfssl/wolfcrypt/cryptocb.h>
|
#include <wolfssl/wolfcrypt/cryptocb.h>
|
||||||
#include <wolfssl/wolfcrypt/pkcs11.h>
|
#include <wolfssl/wolfcrypt/pkcs11.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct Pkcs11Dev {
|
typedef struct Pkcs11Dev {
|
||||||
void* dlHandle; /* Handle to library */
|
void* dlHandle; /* Handle to library */
|
||||||
CK_FUNCTION_LIST* func; /* Array of functions */
|
CK_FUNCTION_LIST* func; /* Array of functions */
|
||||||
@ -53,10 +58,6 @@ typedef struct Pkcs11Session {
|
|||||||
CK_SESSION_HANDLE handle; /* Handle to active session */
|
CK_SESSION_HANDLE handle; /* Handle to active session */
|
||||||
} Pkcs11Session;
|
} Pkcs11Session;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Types of keys that can be stored. */
|
/* Types of keys that can be stored. */
|
||||||
enum Pkcs11KeyType {
|
enum Pkcs11KeyType {
|
||||||
PKCS11_KEY_TYPE_AES_GCM,
|
PKCS11_KEY_TYPE_AES_GCM,
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This section is included prior to wolfmath.h below */
|
||||||
#if defined(HAVE_WOLF_BIGINT) && !defined(WOLF_BIGINT_DEFINED)
|
#if defined(HAVE_WOLF_BIGINT) && !defined(WOLF_BIGINT_DEFINED)
|
||||||
/* raw big integer */
|
/* raw big integer */
|
||||||
typedef struct WC_BIGINT {
|
typedef struct WC_BIGINT {
|
||||||
@ -30,8 +35,8 @@
|
|||||||
#define WOLF_BIGINT_DEFINED
|
#define WOLF_BIGINT_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* only define functions if mp_int has been declared */
|
/* only define functions if mp_int has been declared */
|
||||||
|
/* The MP_INT_DEFINED is defined in tfm.h and integer.h after mp_int */
|
||||||
#ifdef MP_INT_DEFINED
|
#ifdef MP_INT_DEFINED
|
||||||
|
|
||||||
#ifndef __WOLFMATH_H__
|
#ifndef __WOLFMATH_H__
|
||||||
@ -57,7 +62,7 @@
|
|||||||
WC_TYPE_UNSIGNED_BIN = 2,
|
WC_TYPE_UNSIGNED_BIN = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
WOLFSSL_API int wc_export_int(mp_int* mp, byte* buf, word32* len,
|
WOLFSSL_API int wc_export_int(mp_int* mp, byte* buf, word32* len,
|
||||||
word32 keySz, int encType);
|
word32 keySz, int encType);
|
||||||
|
|
||||||
#ifdef HAVE_WOLF_BIGINT
|
#ifdef HAVE_WOLF_BIGINT
|
||||||
@ -76,3 +81,7 @@
|
|||||||
#endif /* __WOLFMATH_H__ */
|
#endif /* __WOLFMATH_H__ */
|
||||||
|
|
||||||
#endif /* MP_INT_DEFINED */
|
#endif /* MP_INT_DEFINED */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user