Added different tls version support for asio
This commit is contained in:
parent
d8dff3e4de
commit
93d7891701
@ -3009,6 +3009,12 @@ then
|
||||
AM_CFLAGS="-DOPENSSL_ALL $AM_CFLAGS"
|
||||
fi
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASIO -DWOLFSSL_KEY_GEN"
|
||||
AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1_2 -DSSL_TXT_TLSV1_1"
|
||||
AM_CFLAGS="$AM_CFLAGS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3"
|
||||
if test "$ENABLED_TLSV10" = "yes"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DSSL_TXT_TLSV1"
|
||||
fi
|
||||
|
||||
# Requires OCSP make sure on
|
||||
if test "x$ENABLED_OCSP" = "xno"
|
||||
|
44
src/tls.c
44
src/tls.c
@ -9971,7 +9971,7 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
#ifndef NO_OLD_TLS
|
||||
|
||||
#ifdef WOLFSSL_ALLOW_TLSV10
|
||||
#ifdef OPENSSL_EXTRA
|
||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
|
||||
/* Gets a WOLFSL_METHOD type that is not set as client or server
|
||||
*
|
||||
* Returns a pointer to a WOLFSSL_METHOD struct
|
||||
@ -9990,7 +9990,7 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
|
||||
return m;
|
||||
}
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
#endif /* OPENSSL_EXTRA || OPENSSL_ALL*/
|
||||
|
||||
WOLFSSL_METHOD* wolfTLSv1_client_method(void)
|
||||
{
|
||||
@ -10132,6 +10132,26 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
return method;
|
||||
}
|
||||
#endif /* WOLFSSL_ALLOW_TLSV10 */
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
|
||||
/* Gets a WOLFSL_METHOD type that is not set as client or server
|
||||
*
|
||||
* Returns a pointer to a WOLFSSL_METHOD struct
|
||||
*/
|
||||
WOLFSSL_METHOD* wolfTLSv1_1_method(void) {
|
||||
WOLFSSL_METHOD* m;
|
||||
WOLFSSL_ENTER("wolfTLSv1_1_method");
|
||||
#ifndef NO_WOLFSSL_CLIENT
|
||||
m = wolfTLSv1_1_client_method();
|
||||
#else
|
||||
m = wolfTLSv1_1_server_method();
|
||||
#endif
|
||||
if (m != NULL) {
|
||||
m->side = WOLFSSL_NEITHER_END;
|
||||
}
|
||||
return m;
|
||||
}
|
||||
#endif /* OPENSSL_EXTRA || OPENSSL_ALL */
|
||||
|
||||
WOLFSSL_METHOD* wolfTLSv1_1_server_method(void)
|
||||
{
|
||||
@ -10154,6 +10174,26 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
|
||||
#ifndef WOLFSSL_NO_TLS12
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
|
||||
/* Gets a WOLFSL_METHOD type that is not set as client or server
|
||||
*
|
||||
* Returns a pointer to a WOLFSSL_METHOD struct
|
||||
*/
|
||||
WOLFSSL_METHOD* wolfTLSv1_2_method(void) {
|
||||
WOLFSSL_METHOD* m;
|
||||
WOLFSSL_ENTER("wolfTLSv1_2_method");
|
||||
#ifndef NO_WOLFSSL_CLIENT
|
||||
m = wolfTLSv1_2_client_method();
|
||||
#else
|
||||
m = wolfTLSv1_2_server_method();
|
||||
#endif
|
||||
if (m != NULL) {
|
||||
m->side = WOLFSSL_NEITHER_END;
|
||||
}
|
||||
return m;
|
||||
}
|
||||
#endif /* OPENSSL_EXTRA || OPENSSL_ALL */
|
||||
|
||||
WOLFSSL_METHOD* wolfTLSv1_2_server_method(void)
|
||||
{
|
||||
return wolfTLSv1_2_server_method_ex(NULL);
|
||||
|
@ -143,8 +143,10 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
||||
#define TLSv1_method wolfTLSv1_method
|
||||
#define TLSv1_server_method wolfTLSv1_server_method
|
||||
#define TLSv1_client_method wolfTLSv1_client_method
|
||||
#define TLSv1_1_method wolfTLSv1_1_method
|
||||
#define TLSv1_1_server_method wolfTLSv1_1_server_method
|
||||
#define TLSv1_1_client_method wolfTLSv1_1_client_method
|
||||
#define TLSv1_2_method wolfTLSv1_2_method
|
||||
#define TLSv1_2_server_method wolfTLSv1_2_server_method
|
||||
#define TLSv1_2_client_method wolfTLSv1_2_client_method
|
||||
|
||||
@ -765,7 +767,8 @@ typedef STACK_OF(WOLFSSL_ASN1_OBJECT) GENERAL_NAMES;
|
||||
#define X509_CHECK_FLAG_NO_WILDCARDS WOLFSSL_NO_WILDCARDS
|
||||
|
||||
#define SSL3_RANDOM_SIZE 32 /* same as RAN_LEN in internal.h */
|
||||
#if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(OPENSSL_EXTRA)
|
||||
#if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(OPENSSL_EXTRA) \
|
||||
|| defined(OPENSSL_ALL)
|
||||
#include <wolfssl/openssl/asn1.h>
|
||||
|
||||
#define SSL2_VERSION 0x0002
|
||||
|
@ -440,8 +440,10 @@ WOLFSSL_API WOLFSSL_METHOD *wolfSSLv3_client_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD* wolfTLSv1_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_server_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_client_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_1_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_1_server_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_1_client_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_2_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_2_server_method(void);
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_2_client_method(void);
|
||||
#ifdef WOLFSSL_TLS13
|
||||
|
Loading…
Reference in New Issue
Block a user