fixed windows build warnings
This commit is contained in:
parent
b76c42da7b
commit
e673b1852a
@ -342,6 +342,7 @@ enum Misc {
|
||||
TLSv1_MINOR = 1, /* TLSv1 minor version number */
|
||||
TLSv1_1_MINOR = 2, /* TLSv1_1 minor version number */
|
||||
TLSv1_2_MINOR = 3, /* TLSv1_2 minor version number */
|
||||
INVALID_BYTE = 0xff, /* Used to initialize cipher specs values */
|
||||
NO_COMPRESSION = 0,
|
||||
ZLIB_COMPRESSION = 221, /* CyaSSL zlib compression */
|
||||
HELLO_EXT_SIG_ALGO = 13, /* ID for the sig_algo hello extension */
|
||||
|
@ -498,11 +498,11 @@ void FreeCiphers(CYASSL* ssl)
|
||||
|
||||
void InitCipherSpecs(CipherSpecs* cs)
|
||||
{
|
||||
cs->bulk_cipher_algorithm = -1;
|
||||
cs->cipher_type = -1;
|
||||
cs->mac_algorithm = -1;
|
||||
cs->kea = -1;
|
||||
cs->sig_algo = -1;
|
||||
cs->bulk_cipher_algorithm = INVALID_BYTE;
|
||||
cs->cipher_type = INVALID_BYTE;
|
||||
cs->mac_algorithm = INVALID_BYTE;
|
||||
cs->kea = INVALID_BYTE;
|
||||
cs->sig_algo = INVALID_BYTE;
|
||||
|
||||
cs->hash_size = 0;
|
||||
cs->static_ecdh = 0;
|
||||
@ -7110,15 +7110,17 @@ int SetCipherList(Suites* s, const char* list)
|
||||
b = input[i++];
|
||||
if (b) {
|
||||
byte cookie[MAX_COOKIE_LEN];
|
||||
byte cookieSz;
|
||||
|
||||
if (b > MAX_COOKIE_LEN)
|
||||
return BUFFER_ERROR;
|
||||
if (i + b > totalSz)
|
||||
return INCOMPLETE_DATA;
|
||||
cookieSz = EmbedGenerateCookie(cookie, COOKIE_SZ, ssl);
|
||||
if ((b != cookieSz) || XMEMCMP(cookie, input + i, b) != 0)
|
||||
if ((EmbedGenerateCookie(cookie, COOKIE_SZ, ssl)
|
||||
!= COOKIE_SZ)
|
||||
|| (b != COOKIE_SZ)
|
||||
|| (XMEMCMP(cookie, input + i, b) != 0)) {
|
||||
return COOKIE_ERROR;
|
||||
}
|
||||
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 {
|
||||
if (dtlsCtx != NULL
|
||||
&& dtlsCtx->peer.sz > 0
|
||||
&& peerSz != dtlsCtx->peer.sz
|
||||
&& peerSz != (XSOCKLENT)dtlsCtx->peer.sz
|
||||
&& memcmp(&peer, dtlsCtx->peer.sa, peerSz) != 0) {
|
||||
CYASSL_MSG(" Ignored packet from invalid peer");
|
||||
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);
|
||||
#ifdef CYASSL_DTLS
|
||||
if (ssl->options.dtls)
|
||||
c16toa(GetEpoch(ssl, verify), seq);
|
||||
c16toa((word16)GetEpoch(ssl, verify), seq);
|
||||
#endif
|
||||
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user