Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Self code review
  • Loading branch information
vcsjones committed Feb 1, 2024
commit b622f5012b8196299704ff5777cec3f8dc529687
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ int local_BN_is_zero(const BIGNUM* a)

int local_BN_is_one(const BIGNUM* a)
{
return BN_abs_is_word(a, 1) && !a->neg;
return BN_abs_is_word(a, 1) && !a->neg;
}

int local_BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ static int32_t QuickRsaCheck(const RSA* rsa, bool isPublic)
goto done;
}

ctx = BN_CTX_new();

// Setup the scratch integers
if ((x = BN_new()) == NULL || (y = BN_new()) == NULL || (p1 = BN_new()) == NULL || (q1 = BN_new()) == NULL)
// Set up the scratch integers
if ((ctx = BN_CTX_new()) == NULL ||
(x = BN_new()) == NULL ||
(y = BN_new()) == NULL ||
(p1 = BN_new()) == NULL ||
(q1 = BN_new()) == NULL)
{
goto done;
}
Expand Down