summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2015-10-22 14:01:19 +0000
committerjsing <jsing@openbsd.org>2015-10-22 14:01:19 +0000
commit4ca414b6f3713217361bb49502e964e33f34cf93 (patch)
treeb0792a4dcc54a475b3e5b098bedba345cf0efe59
parentFix case where we wanted to test ASN1_TIME_set_string() but were testing (diff)
downloadwireguard-openbsd-4ca414b6f3713217361bb49502e964e33f34cf93.tar.xz
wireguard-openbsd-4ca414b6f3713217361bb49502e964e33f34cf93.zip
Fix case where we wanted to test ASN1_TIME_set_string() but were testing
ASN1_UTCTIME_set_string() twice instead.
-rw-r--r--regress/lib/libcrypto/asn1/rfc5280time.c8
1 files changed, 4 insertions, 4 deletions
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 <jsing@openbsd.org>
* Copyright (c) 2015 Bob Beck <beck@opebsd.org>
@@ -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;