forked from wolfSSL/wolfssl
Fixed after second review
This commit is contained in:
@@ -1410,7 +1410,7 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap)
|
|||||||
#error Micrium port does not support DTLS session export yet
|
#error Micrium port does not support DTLS session export yet
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif defined UIP
|
#elif defined WOLFSSL_UIP
|
||||||
ctx->CBIORecv = uIPReceive;
|
ctx->CBIORecv = uIPReceive;
|
||||||
ctx->CBIOSend = uIPSend;
|
ctx->CBIOSend = uIPSend;
|
||||||
#ifdef WOLFSSL_DTLS
|
#ifdef WOLFSSL_DTLS
|
||||||
|
@@ -2068,7 +2068,7 @@ void wolfSSL_SetIO_Mynewt(WOLFSSL* ssl, struct mn_socket* mnSocket, struct mn_so
|
|||||||
|
|
||||||
#endif /* defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP) */
|
#endif /* defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP) */
|
||||||
|
|
||||||
#ifdef UIP
|
#ifdef WOLFSSL_UIP
|
||||||
#include <uip.h>
|
#include <uip.h>
|
||||||
|
|
||||||
#define SOCKLEN_UIP sizeof(struct sockaddr_uip)
|
#define SOCKLEN_UIP sizeof(struct sockaddr_uip)
|
||||||
@@ -2112,7 +2112,7 @@ int uIPReceive(WOLFSSL *ssl, char *buf, int sz, void *_ctx)
|
|||||||
if (ctx->ssl_rb_len > 0) {
|
if (ctx->ssl_rb_len > 0) {
|
||||||
if (sz > ctx->ssl_rb_len - ctx->ssl_rb_off)
|
if (sz > ctx->ssl_rb_len - ctx->ssl_rb_off)
|
||||||
sz = ctx->ssl_rb_len - ctx->ssl_rb_off;
|
sz = ctx->ssl_rb_len - ctx->ssl_rb_off;
|
||||||
memcpy(buf, ctx->ssl_recv_buffer + ctx->ssl_rb_off, sz);
|
XMEMCPY(buf, ctx->ssl_recv_buffer + ctx->ssl_rb_off, sz);
|
||||||
ctx->ssl_rb_off += sz;
|
ctx->ssl_rb_off += sz;
|
||||||
if (ctx->ssl_rb_off >= ctx->ssl_rb_len) {
|
if (ctx->ssl_rb_off >= ctx->ssl_rb_len) {
|
||||||
ctx->ssl_rb_len = 0;
|
ctx->ssl_rb_len = 0;
|
||||||
@@ -2145,6 +2145,6 @@ int uIPGenerateCookie(WOLFSSL* ssl, byte *buf, int sz, void *_ctx)
|
|||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* UIP */
|
#endif /* WOLFSSL_UIP */
|
||||||
|
|
||||||
#endif /* WOLFCRYPT_ONLY */
|
#endif /* WOLFCRYPT_ONLY */
|
||||||
|
@@ -226,7 +226,8 @@
|
|||||||
|
|
||||||
#if defined(WOLFSSL_CONTIKI)
|
#if defined(WOLFSSL_CONTIKI)
|
||||||
#include <contiki.h>
|
#include <contiki.h>
|
||||||
#define UIP
|
#define WOLFSSL_UIP
|
||||||
|
#define NO_WOLFSSL_MEMORY
|
||||||
#define NO_WRITEV
|
#define NO_WRITEV
|
||||||
#define SINGLE_THREADED
|
#define SINGLE_THREADED
|
||||||
#define WOLFSSL_USER_IO
|
#define WOLFSSL_USER_IO
|
||||||
@@ -237,27 +238,6 @@
|
|||||||
{
|
{
|
||||||
return clock_seconds();
|
return clock_seconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void* XREALLOC(void *p, size_t n, void* heap, int type)
|
|
||||||
{
|
|
||||||
(void)heap;
|
|
||||||
(void)type;
|
|
||||||
return realloc(p,n);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void *XMALLOC(size_t n, void* heap, int type)
|
|
||||||
{
|
|
||||||
(void)heap;
|
|
||||||
(void)type;
|
|
||||||
return malloc(n);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void XFREE(void *p, void* heap, int type)
|
|
||||||
{
|
|
||||||
(void)heap;
|
|
||||||
(void)type;
|
|
||||||
free(p);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_ROWLEY_ARM)
|
#if defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_ROWLEY_ARM)
|
||||||
|
@@ -423,7 +423,7 @@ WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
|
|||||||
struct mn_sockaddr_in* mnSockAddrIn);
|
struct mn_sockaddr_in* mnSockAddrIn);
|
||||||
#endif /* defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP) */
|
#endif /* defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP) */
|
||||||
|
|
||||||
#ifdef UIP
|
#ifdef WOLFSSL_UIP
|
||||||
#define SSL_DATABUF_LEN 1460
|
#define SSL_DATABUF_LEN 1460
|
||||||
|
|
||||||
struct uip_wolfssl_ctx {
|
struct uip_wolfssl_ctx {
|
||||||
|
Reference in New Issue
Block a user