diff --git a/src/ssl.c b/src/ssl.c index a304a6f60..95a5553da 100755 --- a/src/ssl.c +++ b/src/ssl.c @@ -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 */