From e0194c3e7db2bc2b4a1fd4fef6af3bfa0592db20 Mon Sep 17 00:00:00 2001 From: purplerain Date: Fri, 31 May 2024 15:25:42 +0000 Subject: [PATCH] sync with OpenBSD -current --- distrib/sets/lists/comp/mi | 1 - etc/daily | 4 +- regress/lib/libcrypto/asn1/asn1object.c | 77 ++++++++++++++++++++++--- share/man/man8/ssl.8 | 63 +------------------- sys/arch/arm64/arm64/cpu.c | 5 +- sys/arch/i386/i386/pmapae.c | 4 +- sys/kern/kern_fork.c | 8 +-- sys/kern/kern_lock.c | 5 +- sys/kern/sched_bsd.c | 28 ++++----- sys/sys/sched.h | 40 +++---------- usr.bin/cvs/rcs.c | 3 +- usr.sbin/bgpd/rde_update.c | 4 +- usr.sbin/rpki-client/repo.c | 16 ++--- usr.sbin/rpki-client/rrdp_delta.c | 5 +- usr.sbin/rpki-client/rrdp_snapshot.c | 5 +- 15 files changed, 121 insertions(+), 147 deletions(-) diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi index 187a2d1df..303d095ce 100644 --- a/distrib/sets/lists/comp/mi +++ b/distrib/sets/lists/comp/mi @@ -418,7 +418,6 @@ ./usr/include/dev/ipmivar.h ./usr/include/dev/isa ./usr/include/dev/isa/ad1848var.h -./usr/include/dev/isa/cs4231var.h ./usr/include/dev/isa/elink.h ./usr/include/dev/isa/essreg.h ./usr/include/dev/isa/essvar.h diff --git a/etc/daily b/etc/daily index 77210e71e..5463c72fc 100644 --- a/etc/daily +++ b/etc/daily @@ -1,5 +1,5 @@ # -# $OpenBSD: daily,v 1.98 2024/05/16 11:33:59 solene Exp $ +# $OpenBSD: daily,v 1.99 2024/05/30 14:29:05 sthen Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # # For local additions, create the file /etc/daily.local. @@ -50,7 +50,7 @@ if [ -d /tmp -a ! -L /tmp ]; then find -x . \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ -o -path './tmux-*' \) -prune -o \ - -type f -and ! -path './*.shm' -atime +7 -delete 2>/dev/null + -type f -and ! -path './*.s[eh]m' -atime +7 -delete 2>/dev/null find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ ! -path ./.ICE-unix ! -name . \ -delete >/dev/null 2>&1; } diff --git a/regress/lib/libcrypto/asn1/asn1object.c b/regress/lib/libcrypto/asn1/asn1object.c index 539c6aa95..242881af0 100644 --- a/regress/lib/libcrypto/asn1/asn1object.c +++ b/regress/lib/libcrypto/asn1/asn1object.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1object.c,v 1.10 2022/11/26 16:08:56 tb Exp $ */ +/* $OpenBSD: asn1object.c,v 1.14 2024/05/29 17:23:05 tb Exp $ */ /* * Copyright (c) 2017, 2021, 2022 Joel Sing * @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -25,9 +26,14 @@ #include "asn1_local.h" static void -hexdump(const unsigned char *buf, size_t len) +hexdump(const unsigned char *buf, int len) { - size_t i; + int i; + + if (len <= 0) { + fprintf(stderr, "\n", len); + return; + } for (i = 1; i <= len; i++) fprintf(stderr, " 0x%02hhx,%s", buf[i - 1], i % 8 ? "" : "\n"); @@ -223,6 +229,7 @@ do_asn1_object_test(struct asn1_object_test *aot) ASN1_OBJECT *aobj = NULL; uint8_t buf[1024]; const uint8_t *p; + uint8_t *der = NULL; uint8_t *q; int err, ret; int failed = 1; @@ -268,6 +275,15 @@ do_asn1_object_test(struct asn1_object_test *aot) aot->der_len)) goto failed; + der = NULL; + ret = i2d_ASN1_OBJECT(aobj, &der); + if (!asn1_compare_bytes("ASN1_OBJECT DER", der, ret, aot->der, + aot->der_len)) + goto failed; + + free(der); + der = NULL; + ASN1_OBJECT_free(aobj); aobj = NULL; @@ -300,6 +316,7 @@ do_asn1_object_test(struct asn1_object_test *aot) failed: ASN1_OBJECT_free(aobj); + free(der); return failed; } @@ -332,7 +349,7 @@ asn1_object_bad_content_test(void) int failed = 1; p = asn1_object_bad_content1; - len = sizeof(asn1_object_bad_content1); + len = sizeof(asn1_object_bad_content1); if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) { fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad " "content 1\n"); @@ -340,7 +357,7 @@ asn1_object_bad_content_test(void) } p = asn1_object_bad_content2; - len = sizeof(asn1_object_bad_content2); + len = sizeof(asn1_object_bad_content2); if ((aobj = c2i_ASN1_OBJECT(NULL, &p, len)) != NULL) { fprintf(stderr, "FAIL: c2i_ASN1_OBJECT() succeeded with bad " "content 2\n"); @@ -455,12 +472,11 @@ asn1_object_large_oid_test(void) ASN1_OBJECT *aobj = NULL; uint8_t buf[1024]; const uint8_t *p; + uint8_t *der = NULL; uint8_t *q; int ret; int failed = 1; - failed = 0; - p = asn1_large_oid_der; aobj = d2i_ASN1_OBJECT(NULL, &p, sizeof(asn1_large_oid_der)); if (aobj == NULL) { @@ -475,6 +491,52 @@ asn1_object_large_oid_test(void) sizeof(asn1_large_oid_der))) goto failed; + der = NULL; + ret = i2d_ASN1_OBJECT(aobj, &der); + if (!asn1_compare_bytes("ASN1_OBJECT DER", der, ret, asn1_large_oid_der, + sizeof(asn1_large_oid_der))) + goto failed; + + failed = 0; + + failed: + ASN1_OBJECT_free(aobj); + free(der); + + return failed; +} + +static int +asn1_object_i2d_errors(void) +{ + ASN1_OBJECT *aobj = NULL; + int ret; + int failed = 1; + + if ((ret = i2d_ASN1_OBJECT(NULL, NULL)) > 0) { + fprintf(stderr, "FAIL: i2d_ASN1_OBJECT(NULL, NULL) returned %d, " + "want <= 0\n", ret); + goto failed; + } + + if ((aobj = OBJ_nid2obj(NID_undef)) == NULL) { + fprintf(stderr, "FAIL: OBJ_nid2obj() failed\n"); + goto failed; + } + + if (OBJ_get0_data(aobj) != NULL) { + fprintf(stderr, "FAIL: undefined obj didn't have NULL data\n"); + goto failed; + } + + if ((ret = i2d_ASN1_OBJECT(aobj, NULL)) > 0) { + fprintf(stderr, "FAIL: i2d_ASN1_OBJECT() succeeded on undefined " + "object\n"); + goto failed; + } + + failed = 0; + failed: ASN1_OBJECT_free(aobj); @@ -490,6 +552,7 @@ main(int argc, char **argv) failed |= asn1_object_bad_content_test(); failed |= asn1_object_txt_test(); failed |= asn1_object_large_oid_test(); + failed |= asn1_object_i2d_errors(); return (failed); } diff --git a/share/man/man8/ssl.8 b/share/man/man8/ssl.8 index 16badb164..98ebc1186 100644 --- a/share/man/man8/ssl.8 +++ b/share/man/man8/ssl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssl.8,v 1.69 2021/02/12 14:19:11 sthen Exp $ +.\" $OpenBSD: ssl.8,v 1.70 2024/05/30 14:06:23 tb Exp $ .\" .\" Copyright (c) 1999 Theo de Raadt, Bob Beck .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: February 12 2021 $ +.Dd $Mdocdate: May 30 2024 $ .Dt SSL 8 .Os .Sh NAME @@ -173,62 +173,3 @@ You can also sign the key yourself, using the command: .Xr smtpd 8 , .Xr sshd 8 , .Xr starttls 8 -.Sh HISTORY -Prior to Sept 21, 2000, -there were problems shipping fully functional implementations of these -protocols, as such shipment would include shipping -.Em into -the United States. -RSA Data Security Inc (RSADSI) held the patent on the RSA algorithm in the -United States, and because of this, free implementations of RSA were -difficult to distribute and propagate. -(The RSA patent was probably more effective at preventing the adoption of -widespread international integrated crypto than the much maligned ITAR -restrictions were.) -Prior to -.Ox 2.8 , -these libraries shipped without the RSA algorithm -- all such functions -were stubbed to fail. -Since RSA is a key component of SSL version 2, this meant that SSL version -2 would not work at all. -SSL version 3 and TLS version 1 allow for the exchange of keys via -mechanisms that do not involve RSA, and would work with the shipped version -of the libraries, assuming both ends could agree to a cipher suite and key -exchange that did not involve RSA. -Likewise, the SSH1 protocol in -.Xr ssh 1 -uses RSA, so it was similarly encumbered. -.Pp -For instance, another typical alternative is DSA, which is not encumbered -by commercial patents (and lawyers). -.Pp -The HTTPS protocol used by web browsers (in modern incarnations) allows for -the use of SSL version 3 and TLS version 1, which in theory allows for -encrypted web transactions without using RSA. -Unfortunately, all the popular web browsers buy their cryptographic code -from RSADSI. -Predictably, RSADSI would prefer that web browsers used their patented -algorithm, and thus their libraries do not implement any non-RSA cipher and -keying combination. -The result of this was that while the HTTPS protocol allowed for many -cipher suites that did not require the use of patented algorithms, it was -very difficult to use these with the popular commercially available -software. -Prior to version 2.8, -.Ox -allowed users to download RSA enabled versions of the shared libssl and -libcrypto libraries which allowed users to enable full functionality without -recompiling the applications. -This method is now no longer needed, as the fully functional -libraries ship with the system. -However, this entire debacle is worth remembering when choosing -software and vendors. -.Pp -Due to multiple flaws in the protocols, SSL version 2 was removed in -.Ox 5.2 -and SSL version 3 was disabled in -.Ox 5.7 . -Users and programs should use TLS version 1.2 instead. -.Pp -This document first appeared in -.Ox 2.5 . diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 1abc8b2e6..60f020f91 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.117 2024/05/29 15:32:06 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.118 2024/05/30 04:16:25 tb Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -1485,13 +1485,14 @@ cpu_unidle(struct cpu_info *ci) #endif +int cpu_suspended; + #ifdef SUSPEND void cpu_hatch_primary(void); void (*cpu_suspend_cycle_fcn)(void) = cpu_wfi; label_t cpu_suspend_jmpbuf; -int cpu_suspended; void cpu_suspend_cycle(void) diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c index 37e77ecbc..c88ec8ffe 100644 --- a/sys/arch/i386/i386/pmapae.c +++ b/sys/arch/i386/i386/pmapae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmapae.c,v 1.71 2023/05/30 08:30:01 jsg Exp $ */ +/* $OpenBSD: pmapae.c,v 1.72 2024/05/30 10:56:24 mpi Exp $ */ /* * Copyright (c) 2006-2008 Michael Shalayeff @@ -990,7 +990,7 @@ pmap_pinit_pd_pae(struct pmap *pmap) if (cpu_meltdown) { int i; - va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_nowait); + va = (vaddr_t)km_alloc(4 * NBPG, &kv_any, &kp_zero, &kd_waitok); if (va == 0) panic("%s: kernel_map out of virtual space!", __func__); if (!pmap_extract(pmap_kernel(), diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 27e043cb1..7d9188261 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.258 2024/05/20 10:32:20 claudio Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.259 2024/05/29 18:55:45 claudio Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -688,12 +688,8 @@ proc_trampoline_mi(void) struct proc *p = curproc; SCHED_ASSERT_LOCKED(); - clear_resched(curcpu()); - -#if defined(MULTIPROCESSOR) - __mp_unlock(&sched_lock); -#endif + mtx_leave(&sched_lock); spl0(); SCHED_ASSERT_UNLOCKED(); diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 19f441bd5..fb3821092 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.73 2024/03/26 18:18:30 bluhm Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.74 2024/05/29 18:55:45 claudio Exp $ */ /* * Copyright (c) 2017 Visa Hankala @@ -97,9 +97,6 @@ ___mp_lock_init(struct __mp_lock *mpl, const struct lock_type *type) if (mpl == &kernel_lock) mpl->mpl_lock_obj.lo_flags = LO_WITNESS | LO_INITIALIZED | LO_SLEEPABLE | (LO_CLASS_KERNEL_LOCK << LO_CLASSSHIFT); - else if (mpl == &sched_lock) - mpl->mpl_lock_obj.lo_flags = LO_WITNESS | LO_INITIALIZED | - LO_RECURSABLE | (LO_CLASS_SCHED_LOCK << LO_CLASSSHIFT); WITNESS_INIT(&mpl->mpl_lock_obj, type); #endif } diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c index 25b221c1e..1cfd32746 100644 --- a/sys/kern/sched_bsd.c +++ b/sys/kern/sched_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sched_bsd.c,v 1.91 2024/03/30 13:33:20 mpi Exp $ */ +/* $OpenBSD: sched_bsd.c,v 1.92 2024/05/29 18:55:45 claudio Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /*- @@ -57,9 +57,7 @@ uint64_t roundrobin_period; /* [I] roundrobin period (ns) */ int lbolt; /* once a second sleep address */ -#ifdef MULTIPROCESSOR -struct __mp_lock sched_lock; -#endif +struct mutex sched_lock; void update_loadavg(void *); void schedcpu(void *); @@ -351,12 +349,11 @@ mi_switch(void) struct proc *nextproc; struct process *pr = p->p_p; struct timespec ts; + int oldipl, s; #ifdef MULTIPROCESSOR int hold_count; - int sched_count; #endif - assertwaitok(); KASSERT(p->p_stat != SONPROC); SCHED_ASSERT_LOCKED(); @@ -365,7 +362,6 @@ mi_switch(void) /* * Release the kernel_lock, as we are about to yield the CPU. */ - sched_count = __mp_release_all_but_one(&sched_lock); if (_kernel_lock_held()) hold_count = __mp_release_all(&kernel_lock); else @@ -411,6 +407,9 @@ mi_switch(void) nextproc = sched_chooseproc(); + /* preserve old IPL level so we can switch back to that */ + oldipl = MUTEX_OLDIPL(&sched_lock); + if (p != nextproc) { uvmexp.swtch++; TRACEPOINT(sched, off__cpu, nextproc->p_tid + THREAD_PID_OFFSET, @@ -426,18 +425,13 @@ mi_switch(void) SCHED_ASSERT_LOCKED(); - /* - * To preserve lock ordering, we need to release the sched lock - * and grab it after we grab the big lock. - * In the future, when the sched lock isn't recursive, we'll - * just release it here. - */ -#ifdef MULTIPROCESSOR - __mp_unlock(&sched_lock); -#endif + /* Restore proc's IPL. */ + MUTEX_OLDIPL(&sched_lock) = oldipl; + SCHED_UNLOCK(s); SCHED_ASSERT_UNLOCKED(); + assertwaitok(); smr_idle(); /* @@ -468,8 +462,8 @@ mi_switch(void) */ if (hold_count) __mp_acquire_count(&kernel_lock, hold_count); - __mp_acquire_count(&sched_lock, sched_count + 1); #endif + SCHED_LOCK(s); } /* diff --git a/sys/sys/sched.h b/sys/sys/sched.h index ac6dad2a8..593bd3e60 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sched.h,v 1.70 2024/01/24 19:23:38 cheloha Exp $ */ +/* $OpenBSD: sched.h,v 1.71 2024/05/29 18:55:45 claudio Exp $ */ /* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */ /*- @@ -199,52 +199,30 @@ void remrunqueue(struct proc *); func(); \ } while (0) -#if defined(MULTIPROCESSOR) -#include - -/* - * XXX Instead of using struct lock for the kernel lock and thus requiring us - * XXX to implement simplelocks, causing all sorts of fine-grained locks all - * XXX over our tree to be activated, the sched_lock is a different kind of - * XXX lock to avoid introducing locking protocol bugs. - */ -extern struct __mp_lock sched_lock; +extern struct mutex sched_lock; #define SCHED_ASSERT_LOCKED() \ do { \ - splassert(IPL_SCHED); \ - KASSERT(__mp_lock_held(&sched_lock, curcpu())); \ + MUTEX_ASSERT_LOCKED(&sched_lock); \ } while (0) #define SCHED_ASSERT_UNLOCKED() \ do { \ - KASSERT(__mp_lock_held(&sched_lock, curcpu()) == 0); \ + MUTEX_ASSERT_UNLOCKED(&sched_lock); \ } while (0) -#define SCHED_LOCK_INIT() __mp_lock_init(&sched_lock) +#define SCHED_LOCK_INIT() mtx_init(&sched_lock, IPL_SCHED) #define SCHED_LOCK(s) \ do { \ - s = splsched(); \ - __mp_lock(&sched_lock); \ + (s) = 0; /* XXX cleanup useless argument */ \ + mtx_enter(&sched_lock); \ } while (/* CONSTCOND */ 0) #define SCHED_UNLOCK(s) \ do { \ - __mp_unlock(&sched_lock); \ - splx(s); \ + (void)s; /* XXX cleanup useless argument */ \ + mtx_leave(&sched_lock); \ } while (/* CONSTCOND */ 0) -#else /* ! MULTIPROCESSOR */ - -#define SCHED_ASSERT_LOCKED() splassert(IPL_SCHED); -#define SCHED_ASSERT_UNLOCKED() /* nothing */ - -#define SCHED_LOCK_INIT() /* nothing */ - -#define SCHED_LOCK(s) s = splsched() -#define SCHED_UNLOCK(s) splx(s) - -#endif /* MULTIPROCESSOR */ - #endif /* _KERNEL */ #endif /* _SYS_SCHED_H_ */ diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 7744b9f32..56639ff19 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.321 2022/12/26 19:16:00 jmc Exp $ */ +/* $OpenBSD: rcs.c,v 1.322 2024/05/30 10:25:58 jsg Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -2581,6 +2581,7 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) follow = 0; free(brev); + brev = NULL; } if (cvs_specified_date != -1) diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index 2c81bbe21..e9c51b7a7 100644 --- a/usr.sbin/bgpd/rde_update.c +++ b/usr.sbin/bgpd/rde_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_update.c,v 1.167 2024/05/29 10:41:12 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.168 2024/05/30 08:29:30 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker @@ -464,7 +464,7 @@ up_get_nexthop(struct rde_peer *peer, struct filterstate *state, uint8_t aid) break; case AID_INET6: case AID_VPN_IPv6: - if (peer->local_v4_addr.aid == AID_INET6) + if (peer->local_v6_addr.aid == AID_INET6) peer_local = &peer->local_v6_addr; break; case AID_FLOWSPECv4: diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index 43432cfd8..15ff513f0 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.58 2024/05/20 15:51:43 claudio Exp $ */ +/* $OpenBSD: repo.c,v 1.59 2024/05/30 12:33:15 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -1787,17 +1787,19 @@ repo_cleanup_entry(FTSENT *e, struct filepath_tree *tree, int cachefd) } break; case FTS_D: - if (e->fts_level == FTS_ROOTLEVEL) + if (e->fts_level == FTS_ROOTLEVEL) { fts_state.type = BASE_DIR; + fts_state.rp = NULL; + } if (e->fts_level == 1) { /* rpki.example.org or .rrdp / .rsync */ - if (strcmp(".rsync", e->fts_name) == 0) { + if (strcmp(".rsync", e->fts_name) == 0) fts_state.type = RSYNC_DIR; - fts_state.rp = NULL; - } else if (strcmp(".rrdp", e->fts_name) == 0) { + else if (strcmp(".rrdp", e->fts_name) == 0) fts_state.type = RRDP_DIR; - fts_state.rp = NULL; - } + else + fts_state.type = BASE_DIR; + fts_state.rp = NULL; } if (e->fts_level == 2) { /* rpki.example.org/repository or .rrdp/hashdir */ diff --git a/usr.sbin/rpki-client/rrdp_delta.c b/usr.sbin/rpki-client/rrdp_delta.c index 7b38669ad..6ee7e803b 100644 --- a/usr.sbin/rpki-client/rrdp_delta.c +++ b/usr.sbin/rpki-client/rrdp_delta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rrdp_delta.c,v 1.13 2024/03/22 03:38:12 job Exp $ */ +/* $OpenBSD: rrdp_delta.c,v 1.14 2024/05/30 09:54:59 job Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2021 Claudio Jeker @@ -220,7 +220,8 @@ delta_content_handler(void *data, const char *content, int length) if (dxml->scope == DELTA_SCOPE_PUBLISH) if (publish_add_content(dxml->pxml, content, length) == -1) - PARSE_FAIL(p, "parse failed - content too big"); + PARSE_FAIL(p, "parse failed, delta element for %s too " + "big", dxml->pxml->uri); } static void diff --git a/usr.sbin/rpki-client/rrdp_snapshot.c b/usr.sbin/rpki-client/rrdp_snapshot.c index 47c4380fd..bc1b18401 100644 --- a/usr.sbin/rpki-client/rrdp_snapshot.c +++ b/usr.sbin/rpki-client/rrdp_snapshot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rrdp_snapshot.c,v 1.9 2024/03/22 03:38:12 job Exp $ */ +/* $OpenBSD: rrdp_snapshot.c,v 1.10 2024/05/30 09:54:59 job Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2021 Claudio Jeker @@ -200,7 +200,8 @@ snapshot_content_handler(void *data, const char *content, int length) if (sxml->scope == SNAPSHOT_SCOPE_PUBLISH) if (publish_add_content(sxml->pxml, content, length) == -1) - PARSE_FAIL(p, "parse failed - content too big"); + PARSE_FAIL(p, "parse failed, snapshot element for %s " + "too big", sxml->pxml->uri); } static void