forked from wolfSSL/wolfssl
header updates
This commit is contained in:
26
cyassl/ssl.h
26
cyassl/ssl.h
@@ -1,15 +1,15 @@
|
|||||||
/* cyassl.h
|
/* ssl.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
* This file is part of CyaSSL.
|
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||||
*
|
*
|
||||||
* CyaSSL is free software; you can redistribute it and/or modify
|
* wolfSSL is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* CyaSSL is distributed in the hope that it will be useful,
|
* wolfSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cyassl.h defines cyassl compatibility layer
|
* ssl.h makes wolfssl backwards compatibile with cyassl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
/* wincrypt.h clashes */
|
/* wincrypt.h clashes */
|
||||||
#undef X509_NAME
|
#undef X509_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CYASSL WOLFSSL
|
#define CYASSL WOLFSSL
|
||||||
#define CYASSL_SESSION WOLFSSL_SESSION
|
#define CYASSL_SESSION WOLFSSL_SESSION
|
||||||
#define CYASSL_METHOD WOLFSSL_METHOD
|
#define CYASSL_METHOD WOLFSSL_METHOD
|
||||||
@@ -54,13 +55,13 @@
|
|||||||
/* redeclare guard */
|
/* redeclare guard */
|
||||||
#define CYASSL_TYPES_DEFINED WOLFSSL_TYPES_DEFINED
|
#define CYASSL_TYPES_DEFINED WOLFSSL_TYPES_DEFINED
|
||||||
|
|
||||||
/* structs */
|
/* cyassl/ssl.h (structs) */
|
||||||
#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
|
#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
|
||||||
#define CYASSL_RSA WOLFSSL_RSA
|
#define CYASSL_RSA WOLFSSL_RSA
|
||||||
#define CYASSL_DSA WOLFSSL_DSA
|
#define CYASSL_DSA WOLFSSL_DSA
|
||||||
#define CYASSL_BIO WOLFSSL_BIO
|
#define CYASSL_BIO WOLFSSL_BIO
|
||||||
#define CYASSL_BIO_METHOD WOLFSSL_BIO_METHOD
|
#define CYASSL_BIO_METHOD WOLFSSL_BIO_METHOD
|
||||||
#define CYASSL_CIPHER WOLFSSL_SSL_CIPHER
|
#define CYASSL_CIPHER WOLFSSL_CIPHER
|
||||||
#define CYASSL_X509_LOOKUP WOLFSSL_X509_LOOKUP
|
#define CYASSL_X509_LOOKUP WOLFSSL_X509_LOOKUP
|
||||||
#define CYASSL_X509_CRL WOLFSSL_X509_CRL
|
#define CYASSL_X509_CRL WOLFSSL_X509_CRL
|
||||||
#define CYASSL_X509_EXTENSION WOLFSSL_X509_EXTENSION
|
#define CYASSL_X509_EXTENSION WOLFSSL_X509_EXTENSION
|
||||||
@@ -101,6 +102,16 @@
|
|||||||
#define CyaSSL_get_cipher wolfSSL_get_cipher
|
#define CyaSSL_get_cipher wolfSSL_get_cipher
|
||||||
#define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
|
#define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
|
||||||
#define CyaSSL_get_current_cipher wolfSSL_get_current_cipher
|
#define CyaSSL_get_current_cipher wolfSSL_get_current_cipher
|
||||||
|
#define CyaSSL_CTX_load_verify_locations wolfSSL_CTX_load_verify_locations
|
||||||
|
#define CyaSSL_CertManagerDisableOCSP wolfSSL_CertManagerDisableOCSP
|
||||||
|
#define CyaSSL_CertManagerEnableOCSP wolfSSL_CertManagerEnableOCSP
|
||||||
|
#define CyaSSL_SetMinVersion wolfSSL_SetMinVersion
|
||||||
|
#define CyaSSL_KeyPemToDer wolfSSL_KeyPemToDer
|
||||||
|
#define CyaSSL_CertPemToDer wolfSSL_CertPemToDer
|
||||||
|
#define CyaSSL_CertManagerUnloadCAs wolfSSL_CertManagerUnloadCAs
|
||||||
|
#define CyaSSL_get_alert_history wolfSSL_get_alert_history
|
||||||
|
#define CyaSSL_get_ciphers wolfSSL_get_ciphers
|
||||||
|
|
||||||
|
|
||||||
/* io.c */
|
/* io.c */
|
||||||
#define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE
|
#define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE
|
||||||
@@ -128,6 +139,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Initialization and Shutdown */
|
/* Initialization and Shutdown */
|
||||||
#define CyaSSL_Init wolfSSL_Init
|
#define CyaSSL_Init wolfSSL_Init
|
||||||
#define CyaSSL_library_init wolfSSL_library_init
|
#define CyaSSL_library_init wolfSSL_library_init
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
* This file is part of wolfSSL.
|
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||||
*
|
*
|
||||||
* wolfSSL is free software; you can redistribute it and/or modify
|
* wolfSSL is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -2,14 +2,14 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
* This file is part of CyaSSL.
|
* This file is part of wolfSSL.
|
||||||
*
|
*
|
||||||
* CyaSSL is free software; you can redistribute it and/or modify
|
* wolfSSL is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* CyaSSL is distributed in the hope that it will be useful,
|
* wolfSSL is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
@@ -38,7 +38,7 @@ typedef void *(*wolfSSL_Realloc_cb)(void *ptr, size_t size);
|
|||||||
|
|
||||||
|
|
||||||
/* Public set function */
|
/* Public set function */
|
||||||
WOLFSSL_API int CyaSSL_SetAllocators(wolfSSL_Malloc_cb malloc_function,
|
WOLFSSL_API int wolfSSL_SetAllocators(wolfSSL_Malloc_cb malloc_function,
|
||||||
wolfSSL_Free_cb free_function,
|
wolfSSL_Free_cb free_function,
|
||||||
wolfSSL_Realloc_cb realloc_function);
|
wolfSSL_Realloc_cb realloc_function);
|
||||||
|
|
||||||
@@ -52,4 +52,4 @@ WOLFSSL_API void* wolfSSL_Realloc(void *ptr, size_t size);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CYASSL_MEMORY_H */
|
#endif /* WOLFSSL_MEMORY_H */
|
||||||
|
@@ -19,15 +19,14 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(WOLF_CRYPT_TYPES_H && CTAO_CRYPT_TYPES_H)
|
||||||
#ifndef WOLF_CRYPT_TYPES_H
|
|
||||||
#define WOLF_CRYPT_TYPES_H
|
#define WOLF_CRYPT_TYPES_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||||
|
|
||||||
/* wolfssl_cyassl compatibility layer */
|
/* wolfssl_wolfssl compatibility layer */
|
||||||
#include <cyassl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -42,7 +41,7 @@
|
|||||||
#define LITTLE_ENDIAN_ORDER
|
#define LITTLE_ENDIAN_ORDER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CYASSL_TYPES
|
#ifndef WOLFSSL_TYPES
|
||||||
#ifndef byte
|
#ifndef byte
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
#endif
|
#endif
|
||||||
@@ -91,9 +90,9 @@
|
|||||||
/* These platforms have 64-bit CPU registers. */
|
/* These platforms have 64-bit CPU registers. */
|
||||||
#if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \
|
#if (defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || \
|
||||||
defined(__mips64) || defined(__x86_64__) || defined(_M_X64))
|
defined(__mips64) || defined(__x86_64__) || defined(_M_X64))
|
||||||
typedef word64 cyassl_word;
|
typedef word64 wolfssl_word;
|
||||||
#else
|
#else
|
||||||
typedef word32 cyassl_word;
|
typedef word32 wolfssl_word;
|
||||||
#ifdef WORD64_AVAILABLE
|
#ifdef WORD64_AVAILABLE
|
||||||
#define WOLFCRYPT_SLOW_WORD64
|
#define WOLFCRYPT_SLOW_WORD64
|
||||||
#endif
|
#endif
|
||||||
@@ -101,7 +100,7 @@
|
|||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
WOLFSSL_WORD_SIZE = sizeof(cyassl_word),
|
WOLFSSL_WORD_SIZE = sizeof(wolfssl_word),
|
||||||
WOLFSSL_BIT_SIZE = 8,
|
WOLFSSL_BIT_SIZE = 8,
|
||||||
WOLFSSL_WORD_BITS = WOLFSSL_WORD_SIZE * WOLFSSL_BIT_SIZE
|
WOLFSSL_WORD_BITS = WOLFSSL_WORD_SIZE * WOLFSSL_BIT_SIZE
|
||||||
};
|
};
|
||||||
@@ -181,7 +180,7 @@ enum {
|
|||||||
&& !defined(WOLFSSL_SAFERTOS) && !defined(FREESCALE_MQX) \
|
&& !defined(WOLFSSL_SAFERTOS) && !defined(FREESCALE_MQX) \
|
||||||
&& !defined(WOLFSSL_LEANPSK)
|
&& !defined(WOLFSSL_LEANPSK)
|
||||||
/* default C runtime, can install different routines at runtime via cbs */
|
/* default C runtime, can install different routines at runtime via cbs */
|
||||||
#include <cyassl/ctaocrypt/memory.h>
|
#include <wolfssl/wolfcrypt/memory.h>
|
||||||
#define XMALLOC(s, h, t) ((void)h, (void)t, wolfSSL_Malloc((s)))
|
#define XMALLOC(s, h, t) ((void)h, (void)t, wolfSSL_Malloc((s)))
|
||||||
#define XFREE(p, h, t) {void* xp = (p); if((xp)) wolfSSL_Free((xp));}
|
#define XFREE(p, h, t) {void* xp = (p); if((xp)) wolfSSL_Free((xp));}
|
||||||
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n))
|
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n))
|
||||||
@@ -230,6 +229,7 @@ enum {
|
|||||||
|
|
||||||
|
|
||||||
/* memory allocation types for user hints */
|
/* memory allocation types for user hints */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DYNAMIC_TYPE_CA = 1,
|
DYNAMIC_TYPE_CA = 1,
|
||||||
DYNAMIC_TYPE_CERT = 2,
|
DYNAMIC_TYPE_CERT = 2,
|
||||||
@@ -326,6 +326,4 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
|
|||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* WOLF_CRYPT_TYPES_H */
|
#endif /* WOLF_CRYPT_TYPES_H */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user