From: jsing Date: Thu, 22 Oct 2015 14:01:19 +0000 (+0000) Subject: Fix case where we wanted to test ASN1_TIME_set_string() but were testing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ca414b6f3713217361bb49502e964e33f34cf93;p=openbsd Fix case where we wanted to test ASN1_TIME_set_string() but were testing ASN1_UTCTIME_set_string() twice instead. --- diff --git a/regress/lib/libcrypto/asn1/rfc5280time.c b/regress/lib/libcrypto/asn1/rfc5280time.c index 7ef4929e862..eb018ed7989 100644 --- a/regress/lib/libcrypto/asn1/rfc5280time.c +++ b/regress/lib/libcrypto/asn1/rfc5280time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rfc5280time.c,v 1.2 2015/09/30 14:11:22 beck Exp $ */ +/* $OpenBSD: rfc5280time.c,v 1.3 2015/10/22 14:01:19 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -80,7 +80,7 @@ struct rfc5280_time_test rfc5280_invtime_tests[] = { .str = "aaaaaaaaaaaaaaZ", }, { - /* Must be a UTC time per RFC 5280*/ + /* Must be a UTC time per RFC 5280 */ .str = "19700101000000Z", .data = "19700101000000Z", .time = 0, @@ -234,8 +234,8 @@ rfc5280_invtime_test(int test_no, struct rfc5280_time_test *att) goto done; } } - if (ASN1_UTCTIME_set_string(ut, att->str) != 0) { - if (X509_cmp_time(ut, &now) != 0) { + if (ASN1_TIME_set_string(t, att->str) != 0) { + if (X509_cmp_time(t, &now) != 0) { fprintf(stderr, "FAIL: test %i - successfully parsed as UTCTIME " "string '%s'\n", test_no, att->str); goto done;