summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/rsc.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-11-02 10:04:42 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-11-02 10:04:42 +0000
commit9ebf01525d764141a5d3ebd642a0278c26e4de4a (patch)
tree398e671f6108e672dbc96f37587f541081177a97 /usr.sbin/rpki-client/rsc.c
parent880920b192ec79b6d85854dcc3d30c3a6a9a2d79 (diff)
Fix x509_get_time() error checks
Like most x509_* functions, x509_get_time() returns 0/1 on error/success, not -1/0. ok claudio job
Diffstat (limited to 'usr.sbin/rpki-client/rsc.c')
-rw-r--r--usr.sbin/rpki-client/rsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/rsc.c b/usr.sbin/rpki-client/rsc.c
index edc727527c2..80adec93058 100644
--- a/usr.sbin/rpki-client/rsc.c
+++ b/usr.sbin/rpki-client/rsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsc.c,v 1.16 2022/10/13 04:43:32 job Exp $ */
+/* $OpenBSD: rsc.c,v 1.17 2022/11/02 10:04:41 tb Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2022 Job Snijders <job@fastly.com>
@@ -408,7 +408,7 @@ rsc_parse(X509 **x509, const char *fn, const unsigned char *der, size_t len)
warnx("%s: X509_get0_notAfter failed", fn);
goto out;
}
- if (x509_get_time(at, &p.res->expires) == -1) {
+ if (!x509_get_time(at, &p.res->expires)) {
warnx("%s: ASN1_time_parse failed", fn);
goto out;
}