mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Improve support for XHTONS
with WOLFSSL_USER_IO
and session tickets with default encryption implementation !WOLFSSL_NO_DEF_TICKET_ENC_CB
.
This commit is contained in:
@@ -616,11 +616,30 @@ WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
|
|||||||
#define XINET_PTON(a,b,c) InetPton((a),(b),(c))
|
#define XINET_PTON(a,b,c) InetPton((a),(b),(c))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef XHTONS
|
#ifndef XHTONS
|
||||||
|
#if !defined(WOLFSSL_NO_SOCK) && (defined(USE_WOLFSSL_IO) || defined(HAVE_HTTP_CLIENT))
|
||||||
#define XHTONS(a) htons((a))
|
#define XHTONS(a) htons((a))
|
||||||
|
#else
|
||||||
|
/* we don't have sockets, so define our own htons and ntohs */
|
||||||
|
#ifdef BIG_ENDIAN_ORDER
|
||||||
|
#define XHTONS(a) (a)
|
||||||
|
#else
|
||||||
|
#define XHTONS(a) ((((a) >> 8) & 0xff) | (((a) & 0xff) << 8))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef XNTOHS
|
#ifndef XNTOHS
|
||||||
|
#if !defined(WOLFSSL_NO_SOCK) && (defined(USE_WOLFSSL_IO) || defined(HAVE_HTTP_CLIENT))
|
||||||
#define XNTOHS(a) ntohs((a))
|
#define XNTOHS(a) ntohs((a))
|
||||||
|
#else
|
||||||
|
/* we don't have sockets, so define our own htons and ntohs */
|
||||||
|
#ifdef BIG_ENDIAN_ORDER
|
||||||
|
#define XNTOHS(a) (a)
|
||||||
|
#else
|
||||||
|
#define XNTOHS(a) ((((a) >> 8) & 0xff) | (((a) & 0xff) << 8))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WOLFSSL_IP4
|
#ifndef WOLFSSL_IP4
|
||||||
|
Reference in New Issue
Block a user