Moved __cplusplus extern statement to include struct definitions as well.

This commit is contained in:
Paul Bakker 2013-06-27 14:29:21 +02:00
parent c5a79cca53
commit 407a0da160
30 changed files with 144 additions and 113 deletions

View file

@ -48,6 +48,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief AES context structure * \brief AES context structure
*/ */
@ -59,10 +63,6 @@ typedef struct
} }
aes_context; aes_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief AES key schedule (encryption) * \brief AES key schedule (encryption)
* *

View file

@ -35,6 +35,10 @@
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief ARC4 context structure * \brief ARC4 context structure
*/ */
@ -46,10 +50,6 @@ typedef struct
} }
arc4_context; arc4_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief ARC4 key schedule * \brief ARC4 key schedule
* *

View file

@ -3,7 +3,7 @@
* *
* \brief Generic ASN.1 parsing * \brief Generic ASN.1 parsing
* *
* Copyright (C) 2006-2011, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>

View file

@ -3,7 +3,7 @@
* *
* \brief ASN.1 buffer writing functionality * \brief ASN.1 buffer writing functionality
* *
* Copyright (C) 2006-2012, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -31,6 +31,10 @@
#define ASN1_CHK_ADD(g, f) if( ( ret = f ) < 0 ) return( ret ); else g += ret #define ASN1_CHK_ADD(g, f) if( ( ret = f ) < 0 ) return( ret ); else g += ret
#ifdef __cplusplus
extern "C" {
#endif
int asn1_write_len( unsigned char **p, unsigned char *start, size_t len ); int asn1_write_len( unsigned char **p, unsigned char *start, size_t len );
int asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag ); int asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag );
#if defined(POLARSSL_BIGNUM_C) #if defined(POLARSSL_BIGNUM_C)
@ -45,4 +49,8 @@ int asn1_write_printable_string( unsigned char **p, unsigned char *start,
int asn1_write_ia5_string( unsigned char **p, unsigned char *start, int asn1_write_ia5_string( unsigned char **p, unsigned char *start,
char *text ); char *text );
#ifdef __cplusplus
}
#endif
#endif /* POLARSSL_ASN1_WRITE_H */ #endif /* POLARSSL_ASN1_WRITE_H */

View file

@ -158,6 +158,10 @@ typedef uint32_t t_udbl;
#endif /* POLARSSL_HAVE_INT16 */ #endif /* POLARSSL_HAVE_INT16 */
#endif /* POLARSSL_HAVE_INT8 */ #endif /* POLARSSL_HAVE_INT8 */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MPI structure * \brief MPI structure
*/ */
@ -169,10 +173,6 @@ typedef struct
} }
mpi; mpi;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Initialize one MPI * \brief Initialize one MPI
* *

View file

@ -52,6 +52,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Blowfish context structure * \brief Blowfish context structure
*/ */
@ -62,10 +66,6 @@ typedef struct
} }
blowfish_context; blowfish_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Blowfish key schedule * \brief Blowfish key schedule
* *

View file

@ -48,6 +48,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief CAMELLIA context structure * \brief CAMELLIA context structure
*/ */
@ -58,10 +62,6 @@ typedef struct
} }
camellia_context; camellia_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief CAMELLIA key schedule (encryption) * \brief CAMELLIA key schedule (encryption)
* *

View file

@ -46,6 +46,10 @@
#define POLARSSL_ERR_CIPHER_INVALID_PADDING -0x6200 /**< Input data contains invalid padding and is rejected. */ #define POLARSSL_ERR_CIPHER_INVALID_PADDING -0x6200 /**< Input data contains invalid padding and is rejected. */
#define POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED -0x6280 /**< Decryption of block requires a full block. */ #define POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED -0x6280 /**< Decryption of block requires a full block. */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { typedef enum {
POLARSSL_CIPHER_ID_NONE = 0, POLARSSL_CIPHER_ID_NONE = 0,
POLARSSL_CIPHER_ID_NULL, POLARSSL_CIPHER_ID_NULL,
@ -207,10 +211,6 @@ typedef struct {
void *cipher_ctx; void *cipher_ctx;
} cipher_context_t; } cipher_context_t;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Returns the list of ciphers supported by the generic cipher module. * \brief Returns the list of ciphers supported by the generic cipher module.
* *

View file

@ -49,6 +49,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief DES context structure * \brief DES context structure
*/ */
@ -69,10 +73,6 @@ typedef struct
} }
des3_context; des3_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Set key parity on the given key to odd. * \brief Set key parity on the given key to odd.
* *

View file

@ -3,7 +3,7 @@
* *
* \brief Diffie-Hellman-Merkle key exchange * \brief Diffie-Hellman-Merkle key exchange
* *
* Copyright (C) 2006-2010, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -130,6 +130,10 @@
"EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179"\ "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179"\
"81BC087F2A7065B384B890D3191F2BFA" "81BC087F2A7065B384B890D3191F2BFA"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief DHM context structure * \brief DHM context structure
*/ */
@ -146,10 +150,6 @@ typedef struct
} }
dhm_context; dhm_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Parse the ServerKeyExchange parameters * \brief Parse the ServerKeyExchange parameters
* *

View file

@ -29,6 +29,10 @@
#include "polarssl/ecp.h" #include "polarssl/ecp.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief ECDH context structure * \brief ECDH context structure
*/ */
@ -43,10 +47,6 @@ typedef struct
} }
ecdh_context; ecdh_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Generate a public key * \brief Generate a public key
* *

View file

@ -36,6 +36,10 @@
#define POLARSSL_ERR_ECP_BUFFER_TOO_SMALL -0x4F80 /**< The buffer is too small to write to. */ #define POLARSSL_ERR_ECP_BUFFER_TOO_SMALL -0x4F80 /**< The buffer is too small to write to. */
#define POLARSSL_ERR_ECP_GENERIC -0x4F00 /**< Generic ECP error */ #define POLARSSL_ERR_ECP_GENERIC -0x4F00 /**< Generic ECP error */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief ECP point structure (jacobian coordinates) * \brief ECP point structure (jacobian coordinates)
* *
@ -134,11 +138,6 @@ ecp_group;
*/ */
#define POLARSSL_ECP_TLS_NAMED_CURVE 3 /**< ECCurveType's named_curve */ #define POLARSSL_ECP_TLS_NAMED_CURVE 3 /**< ECCurveType's named_curve */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Initialize a point (as zero) * \brief Initialize a point (as zero)
*/ */

View file

@ -3,7 +3,7 @@
* *
* \brief Galois/Counter mode for AES * \brief Galois/Counter mode for AES
* *
* Copyright (C) 2006-2012, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -42,6 +42,10 @@ typedef UINT64 uint64_t;
#define POLARSSL_ERR_GCM_AUTH_FAILED -0x0012 /**< Authenticated decryption failed. */ #define POLARSSL_ERR_GCM_AUTH_FAILED -0x0012 /**< Authenticated decryption failed. */
#define POLARSSL_ERR_GCM_BAD_INPUT -0x0014 /**< Bad input parameters to function. */ #define POLARSSL_ERR_GCM_BAD_INPUT -0x0014 /**< Bad input parameters to function. */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief GCM context structure * \brief GCM context structure
*/ */
@ -58,10 +62,6 @@ typedef struct {
} }
gcm_context; gcm_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief GCM initialization (encryption) * \brief GCM initialization (encryption)
* *

View file

@ -3,7 +3,7 @@
* *
* \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion * \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion
* *
* Copyright (C) 2006-2010, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -31,6 +31,10 @@
#define COLLECT_SIZE 1024 #define COLLECT_SIZE 1024
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief HAVEGE state structure * \brief HAVEGE state structure
*/ */
@ -42,10 +46,6 @@ typedef struct
} }
havege_state; havege_state;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief HAVEGE initialization * \brief HAVEGE initialization
* *

View file

@ -5,7 +5,7 @@
* *
* \author Adriaan de Jong <dejong@fox-it.com> * \author Adriaan de Jong <dejong@fox-it.com>
* *
* Copyright (C) 2006-2011, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -44,6 +44,10 @@
#define POLARSSL_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */ #define POLARSSL_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */
#define POLARSSL_ERR_MD_FILE_IO_ERROR -0x5200 /**< Opening or reading of file failed. */ #define POLARSSL_ERR_MD_FILE_IO_ERROR -0x5200 /**< Opening or reading of file failed. */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { typedef enum {
POLARSSL_MD_NONE=0, POLARSSL_MD_NONE=0,
POLARSSL_MD_MD2, POLARSSL_MD_MD2,
@ -131,10 +135,6 @@ typedef struct {
NULL, /* md_ctx */ \ NULL, /* md_ctx */ \
} }
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Returns the list of digests supported by the generic digest module. * \brief Returns the list of digests supported by the generic digest module.
* *

View file

@ -37,6 +37,10 @@
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD2 context structure * \brief MD2 context structure
*/ */
@ -52,10 +56,6 @@ typedef struct
} }
md2_context; md2_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD2 context setup * \brief MD2 context setup
* *

View file

@ -44,6 +44,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD4 context structure * \brief MD4 context structure
*/ */
@ -58,10 +62,6 @@ typedef struct
} }
md4_context; md4_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD4 context setup * \brief MD4 context setup
* *

View file

@ -44,6 +44,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD5 context structure * \brief MD5 context structure
*/ */
@ -58,10 +62,6 @@ typedef struct
} }
md5_context; md5_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief MD5 context setup * \brief MD5 context setup
* *

View file

@ -46,6 +46,10 @@
#define POLARSSL_ERR_PEM_BAD_INPUT_DATA -0x1480 /**< Bad input parameters to function. */ #define POLARSSL_ERR_PEM_BAD_INPUT_DATA -0x1480 /**< Bad input parameters to function. */
/* \} name */ /* \} name */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief PEM context structure * \brief PEM context structure
*/ */
@ -57,10 +61,6 @@ typedef struct
} }
pem_context; pem_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief PEM context setup * \brief PEM context setup
* *

View file

@ -5,7 +5,7 @@
* *
* \author Adriaan de Jong <dejong@fox-it.com> * \author Adriaan de Jong <dejong@fox-it.com>
* *
* Copyright (C) 2006-2011, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -45,6 +45,10 @@
#endif /* __ARMCC_VERSION */ #endif /* __ARMCC_VERSION */
#endif /*_MSC_VER */ #endif /*_MSC_VER */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* Context for PKCS #11 private keys. * Context for PKCS #11 private keys.
*/ */
@ -156,6 +160,10 @@ static inline size_t ssl_pkcs11_key_len( void *ctx )
return ( (pkcs11_context *) ctx )->len; return ( (pkcs11_context *) ctx )->len;
} }
#ifdef __cplusplus
}
#endif
#endif /* POLARSSL_PKCS11_C */ #endif /* POLARSSL_PKCS11_C */
#endif /* POLARSSL_PKCS11_H */ #endif /* POLARSSL_PKCS11_H */

View file

@ -3,7 +3,7 @@
* *
* \brief The RSA public-key cryptosystem * \brief The RSA public-key cryptosystem
* *
* Copyright (C) 2006-2010, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -59,6 +59,10 @@
#define RSA_SIGN 1 #define RSA_SIGN 1
#define RSA_CRYPT 2 #define RSA_CRYPT 2
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief RSA context structure * \brief RSA context structure
*/ */
@ -90,10 +94,6 @@ typedef struct
} }
rsa_context; rsa_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief Initialize an RSA context * \brief Initialize an RSA context
* *

View file

@ -44,6 +44,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-1 context structure * \brief SHA-1 context structure
*/ */
@ -58,10 +62,6 @@ typedef struct
} }
sha1_context; sha1_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-1 context setup * \brief SHA-1 context setup
* *

View file

@ -44,6 +44,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-256 context structure * \brief SHA-256 context structure
*/ */
@ -59,10 +63,6 @@ typedef struct
} }
sha2_context; sha2_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-256 context setup * \brief SHA-256 context setup
* *

View file

@ -45,6 +45,10 @@
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-512 context structure * \brief SHA-512 context structure
*/ */
@ -60,10 +64,6 @@ typedef struct
} }
sha4_context; sha4_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief SHA-512 context setup * \brief SHA-512 context setup
* *

View file

@ -254,6 +254,10 @@
#define POLARSSL_PREMASTER_SIZE POLARSSL_MPI_MAX_SIZE #define POLARSSL_PREMASTER_SIZE POLARSSL_MPI_MAX_SIZE
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* Generic function pointers for allowing external RSA private key * Generic function pointers for allowing external RSA private key
* implementations. * implementations.
@ -547,10 +551,6 @@ struct _ssl_context
char peer_verify_data[36]; /*!< previous handshake verify data */ char peer_verify_data[36]; /*!< previous handshake verify data */
}; };
#ifdef __cplusplus
extern "C" {
#endif
#if defined(POLARSSL_SSL_HW_RECORD_ACCEL) #if defined(POLARSSL_SSL_HW_RECORD_ACCEL)
#define SSL_CHANNEL_OUTBOUND 0 #define SSL_CHANNEL_OUTBOUND 0

View file

@ -3,7 +3,7 @@
* *
* \brief Portable interface to the CPU cycle counter * \brief Portable interface to the CPU cycle counter
* *
* Copyright (C) 2006-2010, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -27,6 +27,10 @@
#ifndef POLARSSL_TIMING_H #ifndef POLARSSL_TIMING_H
#define POLARSSL_TIMING_H #define POLARSSL_TIMING_H
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief timer structure * \brief timer structure
*/ */
@ -35,10 +39,6 @@ struct hr_time
unsigned char opaque[32]; unsigned char opaque[32];
}; };
#ifdef __cplusplus
extern "C" {
#endif
extern volatile int alarmed; extern volatile int alarmed;
/** /**

View file

@ -3,7 +3,7 @@
* *
* \brief Run-time version information * \brief Run-time version information
* *
* Copyright (C) 2006-2012, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -52,6 +52,10 @@
#if defined(POLARSSL_VERSION_C) #if defined(POLARSSL_VERSION_C)
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* Get the version number. * Get the version number.
* *
@ -76,6 +80,10 @@ void version_get_string( char *string );
*/ */
void version_get_string_full( char *string ); void version_get_string_full( char *string );
#ifdef __cplusplus
}
#endif
#endif /* POLARSSL_VERSION_C */ #endif /* POLARSSL_VERSION_C */
#endif /* version.h */ #endif /* version.h */

View file

@ -3,7 +3,7 @@
* *
* \brief X.509 certificate and private key decoding * \brief X.509 certificate and private key decoding
* *
* Copyright (C) 2006-2011, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -140,6 +140,10 @@
#define X509_FORMAT_DER 1 #define X509_FORMAT_DER 1
#define X509_FORMAT_PEM 2 #define X509_FORMAT_PEM 2
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \addtogroup x509_module * \addtogroup x509_module
* \{ */ * \{ */
@ -320,10 +324,6 @@ typedef struct _x509_raw
x509_raw; x509_raw;
*/ */
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \name Functions to read in DHM parameters, a certificate, CRL or private RSA key * \name Functions to read in DHM parameters, a certificate, CRL or private RSA key
* \{ * \{

View file

@ -3,7 +3,7 @@
* *
* \brief X509 buffer writing functionality * \brief X509 buffer writing functionality
* *
* Copyright (C) 2006-2012, Brainspark B.V. * Copyright (C) 2006-2013, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -33,6 +33,10 @@
#include "rsa.h" #include "rsa.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _x509_req_name typedef struct _x509_req_name
{ {
char oid[128]; char oid[128];
@ -47,6 +51,10 @@ int x509_write_key_der( unsigned char *buf, size_t size, rsa_context *rsa );
int x509_write_cert_req( unsigned char *buf, size_t size, rsa_context *rsa, int x509_write_cert_req( unsigned char *buf, size_t size, rsa_context *rsa,
x509_req_name *req_name, md_type_t md_alg ); x509_req_name *req_name, md_type_t md_alg );
#ifdef __cplusplus
}
#endif
#endif /* POLARSSL_X509_WRITE_C */ #endif /* POLARSSL_X509_WRITE_C */
#endif /* POLARSSL_X509_WRITE_H */ #endif /* POLARSSL_X509_WRITE_H */

View file

@ -47,6 +47,10 @@ typedef UINT32 uint32_t;
// Regular implementation // Regular implementation
// //
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief XTEA context structure * \brief XTEA context structure
*/ */
@ -56,10 +60,6 @@ typedef struct
} }
xtea_context; xtea_context;
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* \brief XTEA key schedule * \brief XTEA key schedule
* *