forked from wolfSSL/wolfssl
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:
10
src/tls13.c
10
src/tls13.c
@ -3156,8 +3156,9 @@ static int CreateCookie(WOLFSSL* ssl, byte* hash, byte hashSz)
|
||||
/* Tie cookie to peer address */
|
||||
if (ret == 0) {
|
||||
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
||||
ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa,
|
||||
ssl->buffers.dtlsCtx.peer.sz);
|
||||
ret = wc_HmacUpdate(&cookieHmac,
|
||||
(byte*)ssl->buffers.dtlsCtx.peer.sa,
|
||||
ssl->buffers.dtlsCtx.peer.sz);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -5327,8 +5328,9 @@ static int CheckCookie(WOLFSSL* ssl, byte* cookie, byte cookieSz)
|
||||
/* Tie cookie to peer address */
|
||||
if (ret == 0) {
|
||||
if (ssl->options.dtls && ssl->buffers.dtlsCtx.peer.sz > 0) {
|
||||
ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa,
|
||||
ssl->buffers.dtlsCtx.peer.sz);
|
||||
ret = wc_HmacUpdate(&cookieHmac,
|
||||
(byte*)ssl->buffers.dtlsCtx.peer.sa,
|
||||
ssl->buffers.dtlsCtx.peer.sz);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user