diff --git a/src/ssl.c b/src/ssl.c index ffad2ddfc..416053d3e 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -52994,10 +52994,8 @@ static WOLFSSL_BN_ULONG wolfSSL_BN_get_word_1(mp_int *mp) { WOLFSSL_BN_ULONG ret = 0UL; int digit_i; - for (digit_i = 0; digit_i < mp->used; ++digit_i) { - ret <<= (WOLFSSL_BN_ULONG)DIGIT_BIT; - ret |= (WOLFSSL_BN_ULONG)mp->dp[digit_i]; - } + for (digit_i = 0; digit_i < mp->used; ++digit_i) + ret |= ((WOLFSSL_BN_ULONG)mp->dp[digit_i]) << (DIGIT_BIT * digit_i); return ret; #endif diff --git a/tests/api.c b/tests/api.c index 4b4bf0076..4d0cd1755 100644 --- a/tests/api.c +++ b/tests/api.c @@ -48551,7 +48551,6 @@ static void test_wolfSSL_ASN1_INTEGER_get_set(void) AssertIntEQ(ASN1_INTEGER_get(a), val); ASN1_INTEGER_free(a); -#ifndef TIME_T_NOT_64BIT /* int max (2147483647) */ a = ASN1_INTEGER_new(); val = 2147483647; @@ -48567,7 +48566,6 @@ static void test_wolfSSL_ASN1_INTEGER_get_set(void) AssertIntEQ(ret, 1); AssertIntEQ(ASN1_INTEGER_get(a), val); ASN1_INTEGER_free(a); -#endif printf(resultFmt, passed); #endif