summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-06-08 13:35:00 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-06-08 13:35:00 +0000
commitc089636a500c45fb7bfbb015a8153658c36ed080 (patch)
treee4a55dd9482c4c0e866a36d51397e8bf10c8b644 /usr.sbin/rpki-client
parent6199d48e6b602f53986b466c8d3b80d28e30d30f (diff)
Improve the check for is_ta in filemode
Instead of checking for EXFLAG_SS use the more accurate information we already gathered. ok job
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r--usr.sbin/rpki-client/filemode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/filemode.c b/usr.sbin/rpki-client/filemode.c
index 71dcc5c5342..689817c7c1b 100644
--- a/usr.sbin/rpki-client/filemode.c
+++ b/usr.sbin/rpki-client/filemode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filemode.c,v 1.44 2024/06/08 13:31:38 tb Exp $ */
+/* $OpenBSD: filemode.c,v 1.45 2024/06/08 13:34:59 tb Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -404,7 +404,7 @@ proc_parser_file(char *file, unsigned char *buf, size_t len)
cert = cert_parse_pre(file, buf, len);
if (cert == NULL)
break;
- is_ta = X509_get_extension_flags(cert->x509) & EXFLAG_SS;
+ is_ta = (cert->purpose == CERT_PURPOSE_TA);
if (!is_ta)
cert = cert_parse(file, cert);
if (cert == NULL)