summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/x509.c
diff options
context:
space:
mode:
authorJob Snijders <job@cvs.openbsd.org>2024-03-22 03:38:13 +0000
committerJob Snijders <job@cvs.openbsd.org>2024-03-22 03:38:13 +0000
commitca99ddc00ae293d3d1a35b7fbcdb8200440d788b (patch)
treeece24d2e8a33e59ffbe9e512d7665b737e55064f /usr.sbin/rpki-client/x509.c
parentb477caf1aa0002822f1ad3071cd5c5ce7d12f380 (diff)
Replace protocol literal strings and strlen() calls with defined constants
OK tb@ claudio@
Diffstat (limited to 'usr.sbin/rpki-client/x509.c')
-rw-r--r--usr.sbin/rpki-client/x509.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/rpki-client/x509.c b/usr.sbin/rpki-client/x509.c
index 962cd829d68..a2257ccf9bb 100644
--- a/usr.sbin/rpki-client/x509.c
+++ b/usr.sbin/rpki-client/x509.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.c,v 1.83 2024/03/20 04:36:30 job Exp $ */
+/* $OpenBSD: x509.c,v 1.84 2024/03/22 03:38:12 job Exp $ */
/*
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -535,8 +535,8 @@ x509_get_sia(X509 *x, const char *fn, char **sia)
if (rsync_found)
continue;
- if (strncasecmp(*sia, "rsync://", 8) == 0) {
- const char *p = *sia + strlen("rsync://");
+ if (strncasecmp(*sia, RSYNC_PROTO, RSYNC_PROTO_LEN) == 0) {
+ const char *p = *sia + RSYNC_PROTO_LEN;
size_t fnlen, plen;
rsync_found = 1;
@@ -773,7 +773,7 @@ x509_get_crl(X509 *x, const char *fn, char **crl)
crl))
goto out;
- if (strncasecmp(*crl, "rsync://", 8) == 0) {
+ if (strncasecmp(*crl, RSYNC_PROTO, RSYNC_PROTO_LEN) == 0) {
rsync_found = 1;
goto out;
}