mirror of https://github.com/wolfSSL/wolfssl.git
Patches
1. Define Timeval in callbacks.h if the file sys/time.h is missing. 2. When picking the correct strtok() function, take into account MINGW64. 3. In the example server, changed the call to SSL_accept_ex() as it doesn't exist. Using wolfSSL_accept_ex(). Only a problem when setting WOLFSSL_CALLBACKS. 4. PickHashSigAlgo() is missing a ; when WOLFSSL_CALLBACKS is set.pull/1787/head
parent
7f324d2c3b
commit
4eb0d32fa8
|
@ -120,7 +120,7 @@ static int NonBlockingSSL_Accept(SSL* ssl)
|
||||||
#ifndef WOLFSSL_CALLBACKS
|
#ifndef WOLFSSL_CALLBACKS
|
||||||
int ret = SSL_accept(ssl);
|
int ret = SSL_accept(ssl);
|
||||||
#else
|
#else
|
||||||
int ret = SSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo);
|
int ret = wolfSSL_accept_ex(ssl, srvHandShakeCB, srvTimeoutCB, srvTo);
|
||||||
#endif
|
#endif
|
||||||
int error = SSL_get_error(ssl, 0);
|
int error = SSL_get_error(ssl, 0);
|
||||||
SOCKET_T sockfd = (SOCKET_T)SSL_get_fd(ssl);
|
SOCKET_T sockfd = (SOCKET_T)SSL_get_fd(ssl);
|
||||||
|
@ -163,7 +163,7 @@ static int NonBlockingSSL_Accept(SSL* ssl)
|
||||||
#ifndef WOLFSSL_CALLBACKS
|
#ifndef WOLFSSL_CALLBACKS
|
||||||
ret = SSL_accept(ssl);
|
ret = SSL_accept(ssl);
|
||||||
#else
|
#else
|
||||||
ret = SSL_accept_ex(ssl,
|
ret = wolfSSL_accept_ex(ssl,
|
||||||
srvHandShakeCB, srvTimeoutCB, srvTo);
|
srvHandShakeCB, srvTimeoutCB, srvTo);
|
||||||
#endif
|
#endif
|
||||||
error = SSL_get_error(ssl, 0);
|
error = SSL_get_error(ssl, 0);
|
||||||
|
|
|
@ -16346,7 +16346,7 @@ void PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo,
|
||||||
char* packetName = info->packetNames[info->numberPackets];
|
char* packetName = info->packetNames[info->numberPackets];
|
||||||
XSTRNCPY(packetName, name, MAX_PACKETNAME_SZ);
|
XSTRNCPY(packetName, name, MAX_PACKETNAME_SZ);
|
||||||
packetName[MAX_PACKETNAME_SZ] = '\0';
|
packetName[MAX_PACKETNAME_SZ] = '\0';
|
||||||
info->numberPackets++
|
info->numberPackets++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
(void)ssl;
|
(void)ssl;
|
||||||
|
|
|
@ -52,7 +52,15 @@ typedef struct handShakeInfo_st {
|
||||||
} HandShakeInfo;
|
} HandShakeInfo;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_TIME_H
|
||||||
typedef struct timeval Timeval;
|
typedef struct timeval Timeval;
|
||||||
|
#else /* HAVE_SYS_TIME_H */
|
||||||
|
/* Define the Timeval explicitly. */
|
||||||
|
typedef struct {
|
||||||
|
long tv_sec; /* Seconds. */
|
||||||
|
long tv_usec; /* Microseconds. */
|
||||||
|
} Timeval;
|
||||||
|
#endif /* HAVE_SYS_TIME_H */
|
||||||
|
|
||||||
|
|
||||||
typedef struct packetInfo_st {
|
typedef struct packetInfo_st {
|
||||||
|
|
|
@ -315,7 +315,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(USE_WOLF_STRTOK) && \
|
#if !defined(USE_WOLF_STRTOK) && \
|
||||||
(defined(__MINGW32__) || defined(WOLFSSL_TIRTOS) || defined(WOLF_C99))
|
((defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) || \
|
||||||
|
defined(WOLFSSL_TIRTOS) || defined(WOLF_C99))
|
||||||
#define USE_WOLF_STRTOK
|
#define USE_WOLF_STRTOK
|
||||||
#endif
|
#endif
|
||||||
#if !defined(USE_WOLF_STRSEP) && (defined(WOLF_C99))
|
#if !defined(USE_WOLF_STRSEP) && (defined(WOLF_C99))
|
||||||
|
|
Loading…
Reference in New Issue