forked from wolfSSL/wolfssl
fix opensslextra set_timeout assumes long > int
This commit is contained in:
@@ -8226,14 +8226,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
if (!ses || t < 0)
|
if (!ses || t < 0)
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
/* for cross library compatibility accept a long but convert it to a
|
time = t & 0xFFFFFFFF;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
ses->timeout = time;
|
ses->timeout = time;
|
||||||
|
|
||||||
|
@@ -4283,7 +4283,7 @@ int dh_test(void)
|
|||||||
fclose(file);
|
fclose(file);
|
||||||
#endif /* USE_CERT_BUFFERS */
|
#endif /* USE_CERT_BUFFERS */
|
||||||
|
|
||||||
(void)idx;
|
(void)idx;
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
(void)bytes;
|
(void)bytes;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user