mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
dtls13: abide g++ compiler errors
``` src/tls13.c:5330:72: error: invalid conversion from 'void*' to 'const byte*' {aka 'const unsigned char*'} [-fpermissive] 5330 | ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa, | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | | | void* ./wolfssl/wolfcrypt/hmac.h:191:55: note: initializing argument 2 of 'int wc_HmacUpdate(Hmac*, const byte*, word32)' 191 | WOLFSSL_API int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz); ```
This commit is contained in:
@@ -3156,7 +3156,8 @@ static int CreateCookie(WOLFSSL* ssl, byte* hash, byte hashSz)
|
|||||||
/* Tie cookie to peer address */
|
/* Tie cookie to peer address */
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
||||||
ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa,
|
ret = wc_HmacUpdate(&cookieHmac,
|
||||||
|
(byte*)ssl->buffers.dtlsCtx.peer.sa,
|
||||||
ssl->buffers.dtlsCtx.peer.sz);
|
ssl->buffers.dtlsCtx.peer.sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5327,7 +5328,8 @@ static int CheckCookie(WOLFSSL* ssl, byte* cookie, byte cookieSz)
|
|||||||
/* Tie cookie to peer address */
|
/* Tie cookie to peer address */
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
||||||
ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa,
|
ret = wc_HmacUpdate(&cookieHmac,
|
||||||
|
(byte*)ssl->buffers.dtlsCtx.peer.sa,
|
||||||
ssl->buffers.dtlsCtx.peer.sz);
|
ssl->buffers.dtlsCtx.peer.sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user