forked from wolfSSL/wolfssl
Multicast
1. Move the function `wolfSSL_mcast_read()` to follow `wolfSSL_read_internal()`. 2. Implemented `wolfSSL_mcast_read()`.
This commit is contained in:
32
src/ssl.c
32
src/ssl.c
@@ -935,22 +935,6 @@ int wolfSSL_set_secret(WOLFSSL* ssl, unsigned short epoch,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wolfSSL_mcast_read(WOLFSSL* ssl, unsigned char* id, void* data, int sz)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
(void)ssl;
|
|
||||||
(void)data;
|
|
||||||
(void)sz;
|
|
||||||
|
|
||||||
WOLFSSL_ENTER("wolfSSL_mcast_read()");
|
|
||||||
if (ssl->options.dtls && id != NULL)
|
|
||||||
*id = 0;
|
|
||||||
WOLFSSL_LEAVE("wolfSSL_mcast_read()", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* WOLFSSL_MULTICAST */
|
#endif /* WOLFSSL_MULTICAST */
|
||||||
|
|
||||||
|
|
||||||
@@ -1563,6 +1547,22 @@ int wolfSSL_read(WOLFSSL* ssl, void* data, int sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_MULTICAST
|
||||||
|
|
||||||
|
int wolfSSL_mcast_read(WOLFSSL* ssl, unsigned char* id, void* data, int sz)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
WOLFSSL_ENTER("wolfSSL_mcast_read()");
|
||||||
|
|
||||||
|
ret = wolfSSL_read_internal(ssl, data, sz, FALSE);
|
||||||
|
if (ssl->options.dtls && ssl->options.haveMcast && id != NULL)
|
||||||
|
*id = ssl->keys.curPeerId;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* WOLFSSL_MULTICAST */
|
||||||
|
|
||||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
|
|
||||||
/* let's use async hardware, SSL_SUCCESS on ok */
|
/* let's use async hardware, SSL_SUCCESS on ok */
|
||||||
|
Reference in New Issue
Block a user