mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
fixed windows build warnings
This commit is contained in:
@@ -342,6 +342,7 @@ enum Misc {
|
|||||||
TLSv1_MINOR = 1, /* TLSv1 minor version number */
|
TLSv1_MINOR = 1, /* TLSv1 minor version number */
|
||||||
TLSv1_1_MINOR = 2, /* TLSv1_1 minor version number */
|
TLSv1_1_MINOR = 2, /* TLSv1_1 minor version number */
|
||||||
TLSv1_2_MINOR = 3, /* TLSv1_2 minor version number */
|
TLSv1_2_MINOR = 3, /* TLSv1_2 minor version number */
|
||||||
|
INVALID_BYTE = 0xff, /* Used to initialize cipher specs values */
|
||||||
NO_COMPRESSION = 0,
|
NO_COMPRESSION = 0,
|
||||||
ZLIB_COMPRESSION = 221, /* CyaSSL zlib compression */
|
ZLIB_COMPRESSION = 221, /* CyaSSL zlib compression */
|
||||||
HELLO_EXT_SIG_ALGO = 13, /* ID for the sig_algo hello extension */
|
HELLO_EXT_SIG_ALGO = 13, /* ID for the sig_algo hello extension */
|
||||||
|
@@ -498,11 +498,11 @@ void FreeCiphers(CYASSL* ssl)
|
|||||||
|
|
||||||
void InitCipherSpecs(CipherSpecs* cs)
|
void InitCipherSpecs(CipherSpecs* cs)
|
||||||
{
|
{
|
||||||
cs->bulk_cipher_algorithm = -1;
|
cs->bulk_cipher_algorithm = INVALID_BYTE;
|
||||||
cs->cipher_type = -1;
|
cs->cipher_type = INVALID_BYTE;
|
||||||
cs->mac_algorithm = -1;
|
cs->mac_algorithm = INVALID_BYTE;
|
||||||
cs->kea = -1;
|
cs->kea = INVALID_BYTE;
|
||||||
cs->sig_algo = -1;
|
cs->sig_algo = INVALID_BYTE;
|
||||||
|
|
||||||
cs->hash_size = 0;
|
cs->hash_size = 0;
|
||||||
cs->static_ecdh = 0;
|
cs->static_ecdh = 0;
|
||||||
@@ -7110,15 +7110,17 @@ int SetCipherList(Suites* s, const char* list)
|
|||||||
b = input[i++];
|
b = input[i++];
|
||||||
if (b) {
|
if (b) {
|
||||||
byte cookie[MAX_COOKIE_LEN];
|
byte cookie[MAX_COOKIE_LEN];
|
||||||
byte cookieSz;
|
|
||||||
|
|
||||||
if (b > MAX_COOKIE_LEN)
|
if (b > MAX_COOKIE_LEN)
|
||||||
return BUFFER_ERROR;
|
return BUFFER_ERROR;
|
||||||
if (i + b > totalSz)
|
if (i + b > totalSz)
|
||||||
return INCOMPLETE_DATA;
|
return INCOMPLETE_DATA;
|
||||||
cookieSz = EmbedGenerateCookie(cookie, COOKIE_SZ, ssl);
|
if ((EmbedGenerateCookie(cookie, COOKIE_SZ, ssl)
|
||||||
if ((b != cookieSz) || XMEMCMP(cookie, input + i, b) != 0)
|
!= COOKIE_SZ)
|
||||||
|
|| (b != COOKIE_SZ)
|
||||||
|
|| (XMEMCMP(cookie, input + i, b) != 0)) {
|
||||||
return COOKIE_ERROR;
|
return COOKIE_ERROR;
|
||||||
|
}
|
||||||
i += b;
|
i += b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
src/io.c
2
src/io.c
@@ -320,7 +320,7 @@ int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
else {
|
else {
|
||||||
if (dtlsCtx != NULL
|
if (dtlsCtx != NULL
|
||||||
&& dtlsCtx->peer.sz > 0
|
&& dtlsCtx->peer.sz > 0
|
||||||
&& peerSz != dtlsCtx->peer.sz
|
&& peerSz != (XSOCKLENT)dtlsCtx->peer.sz
|
||||||
&& memcmp(&peer, dtlsCtx->peer.sa, peerSz) != 0) {
|
&& memcmp(&peer, dtlsCtx->peer.sa, peerSz) != 0) {
|
||||||
CYASSL_MSG(" Ignored packet from invalid peer");
|
CYASSL_MSG(" Ignored packet from invalid peer");
|
||||||
return IO_ERR_WANT_READ;
|
return IO_ERR_WANT_READ;
|
||||||
|
@@ -374,7 +374,7 @@ void TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
|
|||||||
c16toa((word16)sz, length);
|
c16toa((word16)sz, length);
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
if (ssl->options.dtls)
|
if (ssl->options.dtls)
|
||||||
c16toa(GetEpoch(ssl, verify), seq);
|
c16toa((word16)GetEpoch(ssl, verify), seq);
|
||||||
#endif
|
#endif
|
||||||
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);
|
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user