diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-03-06 12:57:09 +1000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-03-11 14:47:00 +0100 |
commit | 191570d0b94c88fa95b3c223456863448d697fce (patch) | |
tree | 7864f7a6ee2bd3b581d051f6886fff95090e0891 /test | |
parent | d38ef8c89e11ed5b033a911a7d40b833992c6e09 (diff) |
fix truncation of integers on 32bit AIX
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8417)
(cherry picked from commit 98f29466dc1ed7f80b9b8750309a41b5a1150d25)
Diffstat (limited to 'test')
-rw-r--r-- | test/asn1_encode_test.c | 4 | ||||
-rw-r--r-- | test/bioprinttest.c | 8 | ||||
-rw-r--r-- | test/ct_test.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/test/asn1_encode_test.c b/test/asn1_encode_test.c index 6a64bf904b..31b2163358 100644 --- a/test/asn1_encode_test.c +++ b/test/asn1_encode_test.c @@ -396,7 +396,7 @@ static ASN1_INT64_DATA int64_expected[] = { CUSTOM_EXPECTED_FAILURE, /* t_8bytes_3_pad (illegal padding) */ CUSTOM_EXPECTED_SUCCESS(INT64_MIN, INT64_MIN), /* t_8bytes_4_neg */ CUSTOM_EXPECTED_FAILURE, /* t_8bytes_5_negpad (illegal padding) */ - CUSTOM_EXPECTED_SUCCESS(0x1ffffffff, 0x1ffffffff), /* t_5bytes_1 */ + CUSTOM_EXPECTED_SUCCESS(0x1ffffffffULL, 0x1ffffffffULL), /* t_5bytes_1 */ CUSTOM_EXPECTED_SUCCESS(0x80000000, 0x80000000), /* t_4bytes_1 */ CUSTOM_EXPECTED_SUCCESS(INT32_MAX - 1, INT32_MAX -1), /* t_4bytes_2 */ CUSTOM_EXPECTED_FAILURE, /* t_4bytes_3_pad (illegal padding) */ @@ -446,7 +446,7 @@ static ASN1_UINT64_DATA uint64_expected[] = { CUSTOM_EXPECTED_FAILURE, /* t_8bytes_3_pad */ CUSTOM_EXPECTED_FAILURE, /* t_8bytes_4_neg */ CUSTOM_EXPECTED_FAILURE, /* t_8bytes_5_negpad */ - CUSTOM_EXPECTED_SUCCESS(0x1ffffffff, 0x1ffffffff), /* t_5bytes_1 */ + CUSTOM_EXPECTED_SUCCESS(0x1ffffffffULL, 0x1ffffffffULL), /* t_5bytes_1 */ CUSTOM_EXPECTED_SUCCESS(0x80000000, 0x80000000), /* t_4bytes_1 */ CUSTOM_EXPECTED_SUCCESS(INT32_MAX - 1, INT32_MAX -1), /* t_4bytes_2 */ CUSTOM_EXPECTED_FAILURE, /* t_4bytes_3_pad (illegal padding) */ diff --git a/test/bioprinttest.c b/test/bioprinttest.c index d35bffa840..c243bd572d 100644 --- a/test/bioprinttest.c +++ b/test/bioprinttest.c @@ -146,14 +146,14 @@ typedef struct j_data_st { } j_data; static j_data jf_data[] = { - { 0xffffffffffffffffU, "%ju", "18446744073709551615" }, - { 0xffffffffffffffffU, "%jx", "ffffffffffffffff" }, - { 0x8000000000000000U, "%ju", "9223372036854775808" }, + { 0xffffffffffffffffULL, "%ju", "18446744073709551615" }, + { 0xffffffffffffffffULL, "%jx", "ffffffffffffffff" }, + { 0x8000000000000000ULL, "%ju", "9223372036854775808" }, /* * These tests imply two's-complement, but it's the only binary * representation we support, see test/sanitytest.c... */ - { 0x8000000000000000U, "%ji", "-9223372036854775808" }, + { 0x8000000000000000ULL, "%ji", "-9223372036854775808" }, }; static int test_j(int i) diff --git a/test/ct_test.c b/test/ct_test.c index de374764ef..ae754825f6 100644 --- a/test/ct_test.c +++ b/test/ct_test.c @@ -63,7 +63,7 @@ static CT_TEST_FIXTURE *set_up(const char *const test_case_name) if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) goto end; fixture->test_case_name = test_case_name; - fixture->epoch_time_in_ms = 1473269626000; /* Sep 7 17:33:46 2016 GMT */ + fixture->epoch_time_in_ms = 1473269626000ULL; /* Sep 7 17:33:46 2016 GMT */ if (!TEST_ptr(fixture->ctlog_store = CTLOG_STORE_new()) || !TEST_int_eq( CTLOG_STORE_load_default_file(fixture->ctlog_store), 1)) @@ -423,7 +423,7 @@ static int test_verify_fails_for_future_sct(void) SETUP_CT_TEST_FIXTURE(); if (fixture == NULL) return 0; - fixture->epoch_time_in_ms = 1365094800000; /* Apr 4 17:00:00 2013 GMT */ + fixture->epoch_time_in_ms = 1365094800000ULL; /* Apr 4 17:00:00 2013 GMT */ fixture->certs_dir = certs_dir; fixture->certificate_file = "embeddedSCTs1.pem"; fixture->issuer_file = "embeddedSCTs1_issuer.pem"; |