mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Merge branch 'master' of github.com:wolfSSL/wolfssl
This commit is contained in:
@@ -5857,8 +5857,7 @@ static INLINE int Encrypt(WOLFSSL* ssl, byte* out, const byte* input, word16 sz)
|
|||||||
out + sz - ssl->specs.aead_mac_size,
|
out + sz - ssl->specs.aead_mac_size,
|
||||||
ssl->specs.aead_mac_size,
|
ssl->specs.aead_mac_size,
|
||||||
additional, AEAD_AUTH_DATA_SZ);
|
additional, AEAD_AUTH_DATA_SZ);
|
||||||
if (ret == 0)
|
AeadIncrementExpIV(ssl);
|
||||||
AeadIncrementExpIV(ssl);
|
|
||||||
ForceZero(nonce, AEAD_NONCE_SZ);
|
ForceZero(nonce, AEAD_NONCE_SZ);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -5902,8 +5901,6 @@ static INLINE int Encrypt(WOLFSSL* ssl, byte* out, const byte* input, word16 sz)
|
|||||||
out + sz - ssl->specs.aead_mac_size,
|
out + sz - ssl->specs.aead_mac_size,
|
||||||
ssl->specs.aead_mac_size,
|
ssl->specs.aead_mac_size,
|
||||||
additional, AEAD_AUTH_DATA_SZ);
|
additional, AEAD_AUTH_DATA_SZ);
|
||||||
if (ret != 0)
|
|
||||||
return ret;
|
|
||||||
AeadIncrementExpIV(ssl);
|
AeadIncrementExpIV(ssl);
|
||||||
ForceZero(nonce, AEAD_NONCE_SZ);
|
ForceZero(nonce, AEAD_NONCE_SZ);
|
||||||
}
|
}
|
||||||
|
@@ -989,6 +989,12 @@ top:
|
|||||||
goto LBL_ERR;
|
goto LBL_ERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* too big */
|
||||||
|
while (mp_cmp_mag(&D, b) != MP_LT) {
|
||||||
|
if ((res = mp_sub(&D, b, &D)) != MP_OKAY) {
|
||||||
|
goto LBL_ERR;
|
||||||
|
}
|
||||||
|
}
|
||||||
mp_exch (&D, c);
|
mp_exch (&D, c);
|
||||||
c->sign = neg;
|
c->sign = neg;
|
||||||
res = MP_OKAY;
|
res = MP_OKAY;
|
||||||
|
@@ -950,6 +950,10 @@ top:
|
|||||||
while (D.sign == FP_NEG) {
|
while (D.sign == FP_NEG) {
|
||||||
fp_add (&D, b, &D);
|
fp_add (&D, b, &D);
|
||||||
}
|
}
|
||||||
|
/* too big */
|
||||||
|
while (fp_cmp_mag(&D, b) != FP_LT) {
|
||||||
|
fp_sub(&D, b, &D);
|
||||||
|
}
|
||||||
fp_copy (&D, c);
|
fp_copy (&D, c);
|
||||||
c->sign = neg;
|
c->sign = neg;
|
||||||
return FP_OKAY;
|
return FP_OKAY;
|
||||||
|
Reference in New Issue
Block a user