forked from wolfSSL/wolfssl
Minor openssl compatability layer improvements to AES, MD5 and SSL.
This commit is contained in:
@ -34,6 +34,8 @@
|
||||
#ifndef NO_AES
|
||||
#ifdef WOLFSSL_AES_DIRECT
|
||||
|
||||
#include <wolfssl/wolfcrypt/aes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -63,6 +65,13 @@ WOLFSSL_API void wolfSSL_AES_decrypt
|
||||
#define wolfSSL_AES_encrypt(in, out, aes) wc_AesEncryptDirect(aes, out, in)
|
||||
#define wolfSSL_AES_decrypt(in, out, aes) wc_AesDecryptDirect(aes, out, in)
|
||||
|
||||
#ifndef AES_ENCRYPT
|
||||
#define AES_ENCRYPT AES_ENCRYPTION
|
||||
#endif
|
||||
#ifdef AES_DECRYPT
|
||||
#define AES_DECRYPT AES_DECRYPTION
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#ifndef NO_MD5
|
||||
|
||||
#include <wolfssl/wolfcrypt/hash.h>
|
||||
|
||||
#ifdef WOLFSSL_PREFIX
|
||||
#include "prefix_md5.h"
|
||||
#endif
|
||||
@ -38,6 +40,12 @@ typedef WOLFSSL_MD5_CTX MD5_CTX;
|
||||
#define MD5Final wolfSSL_MD5_Final
|
||||
#endif
|
||||
|
||||
#ifndef MD5
|
||||
#define MD5(d, n, md) wc_Md5Hash((d), (n), (md))
|
||||
#endif
|
||||
|
||||
#define MD5_DIGEST_LENGTH MD5_DIGEST_SIZE
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
@ -286,10 +286,10 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
||||
#define CRYPTO_num_locks wolfSSL_num_locks
|
||||
|
||||
|
||||
# define CRYPTO_LOCK 1
|
||||
# define CRYPTO_UNLOCK 2
|
||||
# define CRYPTO_READ 4
|
||||
# define CRYPTO_WRITE 8
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
#define CRYPTO_READ 4
|
||||
#define CRYPTO_WRITE 8
|
||||
|
||||
#define X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert
|
||||
#define X509_STORE_add_cert wolfSSL_X509_STORE_add_cert
|
||||
@ -477,7 +477,7 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
||||
|
||||
#if defined(HAVE_LIGHTY) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \
|
||||
defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \
|
||||
defined(HAVE_POCO_LIB) || defined(WOLFSSL_HAPROXY)
|
||||
defined(HAVE_POCO_LIB) || defined(WOLFSSL_HAPROXY)
|
||||
typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
|
||||
|
||||
#define X509_NAME_free wolfSSL_X509_NAME_free
|
||||
@ -629,6 +629,8 @@ typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
|
||||
#define ASN1_STRFLGS_ESC_MSB 4
|
||||
#define X509_V_ERR_CERT_REJECTED 28
|
||||
|
||||
#define SSL_MAX_MASTER_KEY_LENGTH 48 /* SECRET_LEN from internal.h */
|
||||
|
||||
#define SSL_alert_desc_string_long wolfSSL_alert_desc_string_long
|
||||
#define SSL_alert_type_string_long wolfSSL_alert_type_string_long
|
||||
#define SSL_CIPHER_get_bits wolfSSL_CIPHER_get_bits
|
||||
@ -801,7 +803,7 @@ typedef WOLFSSL_ASN1_BIT_STRING ASN1_BIT_STRING;
|
||||
#define SSL_is_server wolfSSL_is_server
|
||||
#define SSL_CTX_set1_curves_list wolfSSL_CTX_set1_curves_list
|
||||
|
||||
#endif
|
||||
#endif /* WOLFSSL_NGINX || WOLFSSL_HAPROXY */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
@ -570,7 +570,14 @@ WOLFSSL_API void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
|
||||
WOLFSSL_API const char* wolfSSL_ERR_reason_error_string(unsigned long);
|
||||
|
||||
/* extras */
|
||||
#define WOLF_STACK_OF(x) WOLFSSL_STACK
|
||||
|
||||
#ifndef WOLF_STACK_OF
|
||||
#define WOLF_STACK_OF(x) WOLFSSL_STACK
|
||||
#endif
|
||||
#ifndef DECLARE_STACK_OF
|
||||
#define DECLARE_STACK_OF(x) WOLF_STACK_OF(x);
|
||||
#endif
|
||||
|
||||
WOLFSSL_API int wolfSSL_sk_X509_push(WOLF_STACK_OF(WOLFSSL_X509_NAME)* sk,
|
||||
WOLFSSL_X509* x509);
|
||||
WOLFSSL_API WOLFSSL_X509* wolfSSL_sk_X509_pop(WOLF_STACK_OF(WOLFSSL_X509_NAME)* sk);
|
||||
|
Reference in New Issue
Block a user