mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #1963 from SparkiDev/ct_signed
GCC ARM compiler requires explicit signed declaration
This commit is contained in:
@ -356,7 +356,8 @@ STATIC WC_INLINE byte ctMaskSel(byte m, byte a, byte b)
|
|||||||
/* Constant time - select integer a when mask is set and integer b otherwise. */
|
/* Constant time - select integer a when mask is set and integer b otherwise. */
|
||||||
STATIC WC_INLINE int ctMaskSelInt(byte m, int a, int b)
|
STATIC WC_INLINE int ctMaskSelInt(byte m, int a, int b)
|
||||||
{
|
{
|
||||||
return (b & (~(int)(char)m)) | (a & ((int)(char)m));
|
return (b & (~(signed int)(signed char)m)) |
|
||||||
|
(a & ( (signed int)(signed char)m));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Constant time - bit set when a <= b. */
|
/* Constant time - bit set when a <= b. */
|
||||||
|
@ -2232,7 +2232,7 @@ static int RsaPrivateDecryptEx(byte* in, word32 inLen, byte* out,
|
|||||||
if (rsa_type == RSA_PUBLIC_DECRYPT && ret > (int)outLen)
|
if (rsa_type == RSA_PUBLIC_DECRYPT && ret > (int)outLen)
|
||||||
ret = RSA_BUFFER_E;
|
ret = RSA_BUFFER_E;
|
||||||
else if (ret >= 0 && pad != NULL) {
|
else if (ret >= 0 && pad != NULL) {
|
||||||
char c;
|
signed char c;
|
||||||
|
|
||||||
/* only copy output if not inline */
|
/* only copy output if not inline */
|
||||||
if (outPtr == NULL) {
|
if (outPtr == NULL) {
|
||||||
|
Reference in New Issue
Block a user