diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-02-18 17:13:30 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-02-18 17:13:30 +0000 |
commit | bfd6efe4ae68340ed42eaf138cd9d175ed270c92 (patch) | |
tree | b9f4d28e3a9f32f7ecf1ef1de0a67c049055de22 /regress/lib | |
parent | 363873041c62d26e4b455d7057a2005558f90c79 (diff) |
Tweak previous
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libcrypto/asn1/asn1time.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/regress/lib/libcrypto/asn1/asn1time.c b/regress/lib/libcrypto/asn1/asn1time.c index f764df12d59..3fe9f8df3d6 100644 --- a/regress/lib/libcrypto/asn1/asn1time.c +++ b/regress/lib/libcrypto/asn1/asn1time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1time.c,v 1.23 2024/02/18 16:56:33 tb Exp $ */ +/* $OpenBSD: asn1time.c,v 1.24 2024/02/18 17:13:29 tb Exp $ */ /* * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> * Copyright (c) 2024 Google Inc. @@ -649,17 +649,16 @@ asn1_time_overflow(void) "leave copy of max_time unmodified\n"); goto err; } - if (OPENSSL_gmtime_adj(&max_time, 0, 1)) { + if (OPENSSL_gmtime_adj(©, 0, 1)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by 1 sec didn't " "fail for maximum time\n"); goto err; } - if (memcmp(&zero, &max_time, sizeof(max_time)) != 0) { + if (memcmp(&zero, ©, sizeof(copy)) != 0) { fprintf(stderr, "FAIL: failing OPENSSL_gmtime_adj didn't " "zero out max_time\n"); goto err; } - max_time = copy; min_time.tm_year = 0 - 1900; min_time.tm_mon = 1 - 1; @@ -679,18 +678,18 @@ asn1_time_overflow(void) "leave copy of min_time unmodified\n"); goto err; } - if (OPENSSL_gmtime_adj(&min_time, 0, -1)) { + if (OPENSSL_gmtime_adj(©, 0, -1)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by 1 sec didn't " "fail for minimum time\n"); goto err; } - if (memcmp(&zero, &min_time, sizeof(min_time)) != 0) { + if (memcmp(&zero, ©, sizeof(copy)) != 0) { fprintf(stderr, "FAIL: failing OPENSSL_gmtime_adj didn't " "zero out max_time\n"); goto err; } - min_time = copy; + copy = min_time; /* Test that we can offset by the valid minimum and maximum times. */ if (!OPENSSL_gmtime_adj(©, 0, valid_time_range)) { fprintf(stderr, "FAIL: OPENSSL_gmtime_adj by maximum range " |