fix opensslextra set_timeout assumes long > int

This commit is contained in:
toddouska
2015-03-29 12:00:04 -07:00
parent c90977c7a5
commit 500ee73be4
2 changed files with 2 additions and 9 deletions

View File

@@ -8226,14 +8226,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
if (!ses || t < 0)
return BAD_FUNC_ARG;
/* for cross library compatibility accept a long but convert it to a
word32 (unsigned 32 bit) for wolfSSL sessions */
if ( (t >> 32) > 0) {
WOLFSSL_MSG("Session time is to large");
return BAD_FUNC_ARG;
} else {
time = t & 0xFFFFFFFF;
}
time = t & 0xFFFFFFFF;
ses->timeout = time;

View File

@@ -4283,7 +4283,7 @@ int dh_test(void)
fclose(file);
#endif /* USE_CERT_BUFFERS */
(void)idx;
(void)idx;
(void)tmp;
(void)bytes;