Multicast

1. Move the function `wolfSSL_mcast_read()` to
   follow `wolfSSL_read_internal()`.
2. Implemented `wolfSSL_mcast_read()`.
This commit is contained in:
John Safranek 2017-01-10 14:57:28 -08:00
parent 60c6c32ad3
commit 3f330a2b21

View File

@ -935,22 +935,6 @@ int wolfSSL_set_secret(WOLFSSL* ssl, unsigned short epoch,
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 */
@ -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
/* let's use async hardware, SSL_SUCCESS on ok */