diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/asn1/asn1time.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1time.c b/src/regress/lib/libcrypto/asn1/asn1time.c index bb58f61722..10533d62e9 100644 --- a/src/regress/lib/libcrypto/asn1/asn1time.c +++ b/src/regress/lib/libcrypto/asn1/asn1time.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1time.c,v 1.20 2023/10/02 11:14:15 tb Exp $ */ | 1 | /* $OpenBSD: asn1time.c,v 1.21 2023/10/05 07:59:41 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -21,6 +21,8 @@ | |||
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <string.h> | 22 | #include <string.h> |
| 23 | 23 | ||
| 24 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); | ||
| 25 | |||
| 24 | struct asn1_time_test { | 26 | struct asn1_time_test { |
| 25 | const char *str; | 27 | const char *str; |
| 26 | const char *data; | 28 | const char *data; |
| @@ -527,10 +529,15 @@ asn1_time_compare_families(const struct asn1_time_test *fam1, size_t fam1_size, | |||
| 527 | comparison_failure |= 1; | 529 | comparison_failure |= 1; |
| 528 | } | 530 | } |
| 529 | 531 | ||
| 530 | /* | 532 | time_cmp = ASN1_UTCTIME_cmp_time_t(t1, att2->time); |
| 531 | * XXX - add ASN1_UTCTIME_cmp_time_t later. Don't want | 533 | if (t1->type != V_ASN1_UTCTIME) |
| 532 | * to mess with LIBRESSL_INTERNAL right before lock. | 534 | asn1_cmp = -2; |
| 533 | */ | 535 | if (time_cmp != asn1_cmp) { |
| 536 | fprintf(stderr, "%s vs. %lld: want %d, got %d\n", | ||
| 537 | att1->str, (long long)att2->time, | ||
| 538 | asn1_cmp, time_cmp); | ||
| 539 | comparison_failure |= 1; | ||
| 540 | } | ||
| 534 | } | 541 | } |
| 535 | } | 542 | } |
| 536 | 543 | ||
