components/openssl: add extern C symbol

This commit is contained in:
dongheng 2016-09-23 15:18:14 +08:00
parent 12b72e91af
commit 83aea6c833
15 changed files with 111 additions and 0 deletions

View file

@ -15,6 +15,10 @@
#ifndef _SSL3_H_
#define _SSL3_H_
#ifdef __cplusplus
extern "C" {
#endif
# define SSL3_AD_CLOSE_NOTIFY 0
# define SSL3_AD_UNEXPECTED_MESSAGE 10/* fatal */
# define SSL3_AD_BAD_RECORD_MAC 20/* fatal */
@ -33,4 +37,8 @@
#define SSL3_VERSION 0x0300
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_CERT_H_
#define _SSL_CERT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
/**
@ -35,4 +39,8 @@ CERT* ssl_cert_new(void);
*/
void ssl_cert_free(CERT *cert);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_CODE_H_
#define _SSL_CODE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl3.h"
#include "tls1.h"
#include "x509_vfy.h"
@ -113,4 +117,8 @@ typedef enum {
TLS_ST_SW_FINISHED
} OSSL_HANDSHAKE_STATE;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_DEBUG_H_
#define _SSL_DEBUG_H_
#ifdef __cplusplus
extern "C" {
#endif
#define SSL_DEBUG_ENBALE 0
#define SSL_DEBUG_LEVEL 0
#define SSL_ASSERT_ENABLE 0
@ -46,4 +50,8 @@
#define SSL_DEBUG(level, ...) { if (level > SSL_DEBUG_LEVEL) {SSL_PRINT(__VA_ARGS__);} }
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,14 @@
#ifndef _SSL_LIB_H_
#define _SSL_LIB_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_METHODS_H_
#define _SSL_METHODS_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* TLS method function implement
*/
@ -110,4 +114,8 @@ const X509_METHOD* X509_method(void);
*/
const PKEY_METHOD* EVP_PKEY_method(void);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_PKEY_H_
#define _SSL_PKEY_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
/**
@ -51,4 +55,8 @@ EVP_PKEY* d2i_PrivateKey(int type,
*/
void EVP_PKEY_free(EVP_PKEY *x);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,6 +1,10 @@
#ifndef _SSL_STACK_H_
#define _SSL_STACK_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
/**
@ -30,4 +34,8 @@ OPENSSL_STACK *OPENSSL_sk_new_null(void);
*/
void OPENSSL_sk_free(OPENSSL_STACK *stack);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_TYPES_H_
#define _SSL_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_code.h"
typedef void SSL_CIPHER;
@ -294,4 +298,8 @@ typedef int (*next_proto_cb)(SSL *ssl, unsigned char **out,
unsigned char *outlen, const unsigned char *in,
unsigned int inlen, void *arg);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_X509_H_
#define _SSL_X509_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
#include "ssl_stack.h"
@ -50,4 +54,8 @@ X509* d2i_X509(X509 **cert, const unsigned char *buffer, long len);
*/
void X509_free(X509 *x);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _TLS1_H_
#define _TLS1_H_
#ifdef __cplusplus
extern "C" {
#endif
# define TLS1_AD_DECRYPTION_FAILED 21
# define TLS1_AD_RECORD_OVERFLOW 22
# define TLS1_AD_UNKNOWN_CA 48/* fatal */
@ -44,4 +48,8 @@
#define TLS1_1_VERSION 0x0302
#define TLS1_2_VERSION 0x0303
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _X509_VFY_H_
#define _X509_VFY_H_
#ifdef __cplusplus
extern "C" {
#endif
#define X509_V_OK 0
#define X509_V_ERR_UNSPECIFIED 1
#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2
@ -100,4 +104,8 @@
#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_H_
#define _SSL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "platform/ssl_port.h"
#include "internal/ssl_x509.h"
@ -1684,5 +1688,8 @@ const char *SSL_get_psk_identity_hint(SSL *ssl);
*/
const char *SSL_get_psk_identity(SSL *ssl);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -15,6 +15,10 @@
#ifndef _SSL_PM_H_
#define _SSL_PM_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ssl_types.h"
#include "ssl_port.h"

View file

@ -15,6 +15,10 @@
#ifndef _SSL_PORT_H_
#define _SSL_PORT_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_types.h"
void* ssl_zalloc(size_t size);