claudio [Mon, 12 Jun 2023 15:27:52 +0000 (15:27 +0000)]
Reduce issues with types by switching iosz and totalsz from off_t to size_t.
In rpki-client the maximum file size is limited to 2GB so even on 32bit
archs size_t is large enough.
This solves some of the signed vs unsigned issues between bufsz/bufpos
and iosz.
OK tb@
claudio [Mon, 12 Jun 2023 14:56:38 +0000 (14:56 +0000)]
Add content-encoding compression support (just gzip and deflate).
This will allow servers to send compressed XML which saves around 50%.
The uncompressed output is limited to MAX_CONTENTLEN bytes so the
impact of decompression bombs is limited.
With and OK job@ tb@
claudio [Mon, 12 Jun 2023 12:48:07 +0000 (12:48 +0000)]
Use attr_writebuf() instead of hand rolling a more complicated version
for IMSG_CTL_SHOW_RIB_ATTR. Also drop the attr_optlen() usage in
imsg_create() since it is not stricly needed. With this attr_optlen
follows the path of the dodo.
OK tb@
claudio [Mon, 12 Jun 2023 12:10:17 +0000 (12:10 +0000)]
Use data != NULL to be more explicit. No functional change.
OK tb@
jsg [Mon, 12 Jun 2023 11:30:55 +0000 (11:30 +0000)]
add Mercusys MW150US V2
tested by Daeil Lee
jsg [Mon, 12 Jun 2023 11:27:30 +0000 (11:27 +0000)]
match Mercusys MW150US V2
from Daeil Lee
jsg [Mon, 12 Jun 2023 11:26:54 +0000 (11:26 +0000)]
regen
jsg [Mon, 12 Jun 2023 11:26:24 +0000 (11:26 +0000)]
add Mercusys MW150US V2
from Daeil Lee
claudio [Mon, 12 Jun 2023 09:02:31 +0000 (09:02 +0000)]
Use stdio open_memstream(3) to build up log strings instead of trying to
abuse ibufs for that. Using stdio for this has the benefit of using any
stdio function to build up strings including fprintf().
With and OK tb@
jsg [Mon, 12 Jun 2023 01:13:13 +0000 (01:13 +0000)]
regen
jsg [Mon, 12 Jun 2023 01:12:33 +0000 (01:12 +0000)]
add more Navi 31 device ids
Radeon Pro W7800 and Radeon Pro W7900
from Radeon Software for Linux 23.10.1 (5.5.1) libdrm-amdgpu-common
kettenis [Sun, 11 Jun 2023 21:42:01 +0000 (21:42 +0000)]
Disable PAC with the architected algorithm for now, but leave it enabled
when the hardware uses an implementation defined algorithm. There are
issues with PAC on the x13s (but not on the windows dev kit) which uses
the architected algorithm as it uses a core designed by ARM. This leaves
PAC enabled on Apple hardware.
ok deraadt@
tb [Sun, 11 Jun 2023 19:01:01 +0000 (19:01 +0000)]
Convert legacy server kex to one-shot sign/verify
This converts ssl3_{get,send}_server_key_exchange() to EVP_DigestVerify()
and EVP_DigestSign(). In order to do this, build the full signed_params
up front and rework the way the key exchange parameters are constructed.
This way we can do the verify and sign steps in one go and at the same
use a more idiomatic approach with CBB/CBS.
with/ok jsing
tb [Sun, 11 Jun 2023 18:50:51 +0000 (18:50 +0000)]
Easy EVP_Digest{Sign,Verify} conversions for legacy stack
Convert ssl3_send_client_verify_{sigalgs,gost}() to EVP_DigestSign() and
ssl3_get_cert_verify() to EVP_DigestVerify().
ok jsing
krw [Sun, 11 Jun 2023 14:00:04 +0000 (14:00 +0000)]
No need to check for DTYPE_FLOPPY. If there is neither a GPT nor
an MBR then install biosboot in sector 0.
Without the check for DTYPE_FLOPPY there is no need for
FSDISKTYPE=floppy3 and therefore flip the last two Makefiles to
the "echo '/ *' | disklabel -wAT-" idiom.
Feedback/fix from kn@
jsg [Sun, 11 Jun 2023 13:02:10 +0000 (13:02 +0000)]
remove unused args_st struct
ok tb@
jsg [Sun, 11 Jun 2023 12:35:00 +0000 (12:35 +0000)]
remove chopup_args() unused since apps.c rev 1.31
ok tb@
tb [Sun, 11 Jun 2023 12:06:08 +0000 (12:06 +0000)]
openssl enc: drop a few parens and unwrap a few lines
No binary change on amd64
tb [Sun, 11 Jun 2023 11:54:44 +0000 (11:54 +0000)]
openssl enc: small style fixup after ZLIB unifdef
op [Sun, 11 Jun 2023 10:30:10 +0000 (10:30 +0000)]
fix typo: 'hash buffer to small' -> too small
tb [Sun, 11 Jun 2023 05:45:20 +0000 (05:45 +0000)]
Unifdef ZLIB
This is very dead code: the openssl app was never compiled with -DZLIB
after January 1, 2015.
tb [Sun, 11 Jun 2023 05:35:43 +0000 (05:35 +0000)]
Unifdef ZLIB
This has long been unused code and compilation with -DZLIB was broken
for a long time after BIO was made opaque.
ok jsing
kettenis [Sat, 10 Jun 2023 19:30:48 +0000 (19:30 +0000)]
Implement support for pointer authentication (PAC) in userland. With PAC
it is possible to "sign" pointers with a hidden key. The signature is
placed in unused bits of the pointer and can be checked later. This can
be used to provide "tail CFI" that is similar to what retguard provides.
Debuggers need to be aware of the fact that pointers can be signed. For
this purpose a new PT_PACMASK ptrace(2) request is introduced that returns
as mask that indicates the bits used for the signature. Separate masks
are provided for code and data pointers even though the masks are identical
in the current implementation. These masks are also written into a special
note section in the core dump.
ok patrick@
patrick [Sat, 10 Jun 2023 18:31:38 +0000 (18:31 +0000)]
Add qcpas(4), a driver for the Peripheral Authentication Service found on
Qualcomm SoCs.
The immediate task for this driver is to provide firmware to the auxiliary
cores and to bring them up. This is accomplished by parsing the ELF files
and providing the data in certain memory regions, and telling qcscm(4) to
check and execute the firmware on the auxiliary cores.
With the cores up we can now talk to the firmware. The glink-edge subnode
indicates that we can talk to it using the GLINK protocol over shared memory
provided by qcsmem(4). This interface is essentially a channel multiplexer,
with each channel identified through an ASCII string.
One of those channels connects to a PMIC router, which allows us to talk to
the battery manager service that contains information about the charging and
battery states.
ok drahn@ kettenis@
tb [Sat, 10 Jun 2023 15:34:36 +0000 (15:34 +0000)]
Convert EVP_Digest{Sign,Verify}* to one-shot for TLSv1.3
Using one-shot EVP_DigestSign() and EVP_DigestVerify() is slightly shorter
and is needed for
Ed25519 support.
ok jsing
deraadt [Sat, 10 Jun 2023 15:16:43 +0000 (15:16 +0000)]
sync
op [Sat, 10 Jun 2023 07:24:21 +0000 (07:24 +0000)]
ksh: remove broken special handling of test -t
Drop the vestiges of the pre-POSIX support of `test -t' defaulting to fd
1. It doesn't work and it always succeed since "-t" is treated as a
string by default when no argument (fd) is specified.
diff by Lucas (lucas [at] sexy [dot] is) with minor change by me.
ok millert@
op [Sat, 10 Jun 2023 07:19:39 +0000 (07:19 +0000)]
test: fix description of -t: it has no default
-t always requires the fd number as argument, there's no default. With
only one argument -t is equivalent to `test -n -t' and so banally always
true.
diff from Lucas (lucas [at] sexy [dot] is)
ok millert@
tb [Sat, 10 Jun 2023 05:00:58 +0000 (05:00 +0000)]
File new test-bleichenbacher-timing-pregenerate.py under failing tests
until someone finds time and motivation to figure out how to use this.
deraadt [Fri, 9 Jun 2023 15:31:44 +0000 (15:31 +0000)]
we always create keys 2 releases into the future
kn [Fri, 9 Jun 2023 12:22:01 +0000 (12:22 +0000)]
Readd "-wgpsk", accidentially dropped in r1.465 adding "wgdescr"
Noticed by Bradley Latus
Diff from Jane Johansson
OK tb
beck [Thu, 8 Jun 2023 22:02:40 +0000 (22:02 +0000)]
Remove dead code.
must_be_ca can no longer be 0 after the proxy cert code got nuked,
so change this to an if. must_be_ca is now -1 for a leaf, or 1 for
a non leaf.
ok tb@
nicm [Thu, 8 Jun 2023 11:17:28 +0000 (11:17 +0000)]
Fix mismatch between function prototype and definition, from Anindya
Mukherjee.
schwarze [Thu, 8 Jun 2023 09:40:17 +0000 (09:40 +0000)]
From the description of "openssl verify", delete the duplicate and
outdated list of error messages. Instead, refer to the master copy
of that list in X509_STORE_CTX_get_error(3).
Suggested by and OK tb@, and beck@ also agrees with the idea.
espie [Thu, 8 Jun 2023 08:57:02 +0000 (08:57 +0000)]
add tests related to --libs-only-l and the likes
remove extraneous spaces from reference output now that we're closer
to the original pkg-config
espie [Thu, 8 Jun 2023 08:55:27 +0000 (08:55 +0000)]
move to perl use v5.36
also fix a discrepancy wrt the "original" pkg-config
thanks to tb@ for testing.
bluhm [Wed, 7 Jun 2023 18:42:40 +0000 (18:42 +0000)]
Rename ifconfig tcprecvoffload to tcplro. It is shorter and
more consistent.
discussed with jan@ mvs@ chris@ claudio@ dlg@
job [Wed, 7 Jun 2023 16:23:02 +0000 (16:23 +0000)]
Document CMS signing-time <> mod-time trick
espie [Wed, 7 Jun 2023 15:09:01 +0000 (15:09 +0000)]
do not pass @_ to code snippets, prepare for 5.36
found out by aja@
aoyama [Wed, 7 Jun 2023 12:56:22 +0000 (12:56 +0000)]
Add portable version and m88k-specific version lb() function, because
unfortunately gcc3 does not have __builtin_clz().
ok miod@ otto@
tb [Wed, 7 Jun 2023 11:09:08 +0000 (11:09 +0000)]
Cosmetic tweak for previous
Once we expect ASPA version 1 and someone sends us version 0, make that
explicit instead of complaining about ASN1_INTEGER_get_uint64() failing.
ok job
schwarze [Wed, 7 Jun 2023 10:53:30 +0000 (10:53 +0000)]
Refer to the field "thisUpdate" instead of the non-existent "lastUpdate".
Similar to X509_get0_notBefore(3) rev. 1.6.
Requested by and OK tb@.
job [Wed, 7 Jun 2023 10:46:34 +0000 (10:46 +0000)]
In anticipation of a bump of the ASPA eContent profile version, update
valid_econtent_version() to allow for non-zero versions.
OK tb@
deraadt [Wed, 7 Jun 2023 04:46:09 +0000 (04:46 +0000)]
upon resume, fpureset() was being called prematurely (before cpu_init,
which does not matter today, but will matter a lot in near future).
But actually it isn't needed at all, cpu_init() does it again.
So remove the call.
ok guenther
schwarze [Tue, 6 Jun 2023 16:20:13 +0000 (16:20 +0000)]
In 1995, Eric A. Young chose a confusing name for the "lastUpdate" field
of the X509_CRL_INFO object. It should have been called "thisUpdate"
like in RFC 5280 section 5.1 (and in its precursor RFC 2459). Then again,
RFC 2459 was only published in 1999, so maybe the terminology wasn't
firmly established yet when Young wrote his code several years earlier -
just guessing, neither we nor the OpenSSL folks appear to know the real
reasons...
Anyway, we have been stuck with the "lastUpdate" names in the API for
more than two decades now, so clarify in the documentation what they
refer to and what they really mean.
Requested by and OK tb@.
tb [Tue, 6 Jun 2023 16:10:56 +0000 (16:10 +0000)]
Fix typo in comment: exta -> extra
claudio [Tue, 6 Jun 2023 16:09:35 +0000 (16:09 +0000)]
Use same pattern to work with offset by using a uint8_t pointer that
is loaded with ibuf_data(). This is by no means better but allows to
switch ibuf_data() to return void *.
OK tb@
beck [Tue, 6 Jun 2023 15:16:52 +0000 (15:16 +0000)]
Make the tlsv1.0 and tlsv1.1 options in relayd do nothing
Also document that fact, and that the existing ssl3 option
does nothing. This changes relayd to no longer request tls1.0
or tls1.1 in preparation for the upcoming deprecation of these
out of data protocols
ok jsing@ bluhm@ tb@ claudio@ benno@
claudio [Tue, 6 Jun 2023 13:27:49 +0000 (13:27 +0000)]
Use ibuf_seek() instead of ibuf_data() + offset constructs. Effect is
the same in these cases.
OK tb@
kn [Tue, 6 Jun 2023 09:35:44 +0000 (09:35 +0000)]
Fold disk crypto question '?' text into prompt
Since this question moved after the root disk one and '?' stopped listing disks,
hoist the implementation details in order to drop the custom answer and reuse
existing ask_yn(), thus
Encrypt the root disk? (yes, no or '?' for details) [no] ?
Create a passphrase protected CRYPTO softraid volume to be used as root disk.
Encrypt the root disk? (yes, no or '?' for details) [no]
becomes
Encrypt the root disk? (passphrase CRYPTO softraid) [no]
Prodded by afresh1
dlg [Tue, 6 Jun 2023 01:40:04 +0000 (01:40 +0000)]
don't need mcx_uptime() now that we have nsecuptime()
ok jmatthew@
job [Mon, 5 Jun 2023 18:32:06 +0000 (18:32 +0000)]
Fix copy+paste error in x509 asn regress
job [Mon, 5 Jun 2023 17:17:23 +0000 (17:17 +0000)]
Improve the description of CMS_get0_signers()
Suggestion from Małgorzata Olszówka, they noted:
"The original wording suggests that it is required to execute
CMS_get0_signers() after CMS_verify(), while it is CMS_get0_signers()
that requires prior successful invocation of CMS_verify()."
OK tb@
claudio [Mon, 5 Jun 2023 16:24:05 +0000 (16:24 +0000)]
Sync json.c with rpki-client rev 1.3:
Add an extra argument compact to json_do_object() to instruct the parser
to dump this object on a single line.
While one can select on an object to object basis for arrays the compact
setting is inherited from the surrounding object.
OK tb@
claudio [Mon, 5 Jun 2023 14:19:13 +0000 (14:19 +0000)]
Add an extra argument compact to json_do_object() to instruct the parser
to dump this object on a single line.
While one can select on an object to object basis for arrays the compact
setting is inherited from the surrounding object.
Requested by job@, OK job@ tb@
millert [Mon, 5 Jun 2023 13:24:36 +0000 (13:24 +0000)]
Store timeouts as int, not u_int as they are limited to INT_MAX.
Fixes sign compare warnings systems with 32-bit time_t due to type
promotion. OK djm@
bluhm [Mon, 5 Jun 2023 11:35:46 +0000 (11:35 +0000)]
Do not calculate IP, TCP, UDP checksums on loopback interface.
Packets sent over loopback got their checksums calculated twice.
In the output path they were filled in and during TCP/IP input all
checksums were calculated again to be compared with the previous
result.
Avoid this by claiming that lo(4) supports hardware checksum
offloading. For each packet convert the flag that the checksum
should be calculated to the flag that it has been checked successfully.
Keep the flag that it should be calculated for the case that it may
be bridged or forwarded later.
A drawback is that "tcpdump -ni lo0 -v" reports invalid checksum.
But that is the same with physical interfaces and hardware offloading.
OK dlg@
sashan [Mon, 5 Jun 2023 08:45:20 +0000 (08:45 +0000)]
pfsync_update_state() is too paranoid about pf_state::pfsync_state.
For example it should not be surprised if caller asks to remove
state from pfsync queue which has been removed already. That kind
of race is sorted out later when pfsync_update_state() calls to
pfsync_q_ins()/pfsync_q_del(). Change relaxes pfsync_update_state()
to panic on sync_state value which is unknown.
OK dlg@
sashan [Mon, 5 Jun 2023 08:37:27 +0000 (08:37 +0000)]
pf_remove_state() should not attempt to remove state which
is already removed.
OK dlg@
op [Mon, 5 Jun 2023 08:07:18 +0000 (08:07 +0000)]
use getline(3) instead of fgetln(3)
while here simplify the "From " check too.
ok millert@
tb [Sun, 4 Jun 2023 17:28:35 +0000 (17:28 +0000)]
Reinstate bn_isqrt.c r1.8 and crypto_lock.c r1.3
This traded local copies of CTASSERT() to the one in crypto_internal.h.
This change was backed out due to SHA-512 breakage on STRICT_ALIGNMENT
architectures still using Fred Flintstone's gcc without asm sha512.
Original commit message:
Use crypto_internal.h's CTASSERT()
Now that this macro is available in a header, let's use that version
rather than copies in several .c files.
discussed with jsing
millert [Sun, 4 Jun 2023 17:27:27 +0000 (17:27 +0000)]
Correct the comment in get_range() describing the range syntax.
tb [Sun, 4 Jun 2023 11:33:45 +0000 (11:33 +0000)]
Make ruby-openssl cope with default ruby change
tb [Sun, 4 Jun 2023 07:14:47 +0000 (07:14 +0000)]
bn_mod_inverse tweaks
Provide prototype that is hidden behind LIBRESSL_INTERNAL for portable
and or in result for future extensibility.
otto [Sun, 4 Jun 2023 06:58:33 +0000 (06:58 +0000)]
More thorough write-afetr-free checks.
On free, chunks (the pieces of a pages used for smaller allocations)
are junked and then validated after they leave the delayed free
list. So after free, a chunk always contains junk bytes. This means
that if we start with the right contents for a new page of chunks,
we can *validate* instead of *write* junk bytes when (re)-using a
chunk.
With this, we can detect write-after-free when a chunk is recycled,
not justy when a chunk is in the delayed free list. We do a little
bit more work on initial allocation of a page of chunks and when
re-using (as we validate now even on junk level 1).
Also: some extra consistency checks for recallocaray(3) and fixes
in error messages to make them more consistent, with man page bits.
Plus regress additions.
krw [Sat, 3 Jun 2023 21:37:53 +0000 (21:37 +0000)]
Remove declarations of unused local variables, an unused function
(get_long) and add missing {} in devsw[1] initialization.
Most from 2011 NetBSD commit by tsutui.
No functional change.
Build tested and ok kn@
tb [Sat, 3 Jun 2023 21:20:29 +0000 (21:20 +0000)]
Add regress coverage for BN_mod_inverse()
This would detect the aliasing issue reported by Guido Vranken fixed
in bn_gcd.c r1.28. Most testcases are from BoringSSL's regress test.
op [Sat, 3 Jun 2023 15:19:38 +0000 (15:19 +0000)]
drop `uptodate()' check from hack(6)
hack(6) scrapes $PATH to find its executable and compare the mtime to
the save file and bone file. If the game is newer than those, they're
not loaded.
Drop this feature. /usr/games is not in the default $PATH anymore, and
the format for those file didn't change since the import.
Diff from Anton Konyahin (me [at] konyahin [dot] xyz)
cheloha [Fri, 2 Jun 2023 17:44:29 +0000 (17:44 +0000)]
pledge(2): stdio: permit restricted profil(2) for moncontrol(3)
Currently, pledged '-pg' binaries get killed in _mcleanup() when they
try to disable profil(2) via moncontrol(3).
Disabling profil(2) is harmless. Add profil(2) to the "stdio"
pledge(2) promise and permit profil(2) calls when the scale argument
is zero. Enabling profil(2) remains forbidden in pledged processes.
This gets us one step closer to making '-pg' binaries compatible with
pledge(2). The next step is to decide how to exfiltrate the profiling
data from the process during _mcleanup().
Prompted by semarie@. Cleaned up by deraadt@. With input from
deraadt@, espie@, and semarie@.
"Looks good" deraadt@
pledge(2) pieces ok semarie@
tb [Fri, 2 Jun 2023 17:15:30 +0000 (17:15 +0000)]
Fix variable reuse in BN_mod_inverse()
The somewhat strange calculation m = a^{-1} (mod m) can return 0. This
breaks because of BN_nnmod() having delicate semantics of which variable
can be reused. BN_nnmod(a, a, m, ctx) works and the library relies on that.
Here, the code ends up doing BN_nnmod(m, a, m, ctx) and this doesn't work.
If the result of the initial BN_mod() is negative, then BN_nnmod() will
return 0.
Problem reported by Guido Vranken in
https://github.com/openssl/openssl/issues/21110
This code is well covered by regress, but it does not currently have
explicit test coverage. Such will be added soon.
ok beck jsing
tb [Fri, 2 Jun 2023 08:35:10 +0000 (08:35 +0000)]
fix typo
krw [Fri, 2 Jun 2023 00:10:25 +0000 (00:10 +0000)]
Missed a trailing space.
kn [Thu, 1 Jun 2023 18:57:53 +0000 (18:57 +0000)]
Add support for wireguard peer descriptions
"wgdescr[iption] foo" to label one peer (amongst many) on a wg(4) interface,
"-wgdescr[iption]" or "wgdescr ''" to remove the label, completely analogous
to existing interface discriptions.
Idea/initial diff from Mikolaj Kucharski (OK sthen)
Tests/prodded by Hrvoje Popovski
Tweaks/manual bits from me
Feedback deraadt sthen mvs claudio
OK claudio
krw [Thu, 1 Jun 2023 17:24:56 +0000 (17:24 +0000)]
Expunge a bunch of eye searing trailing whitespace.
claudio [Thu, 1 Jun 2023 10:21:26 +0000 (10:21 +0000)]
Change wakeup_proc() to no longer grab the SCHED_LOCK() instead it must
be called with SCHED_LOCK() held. Also add an extra argument to update
the process flags p_flag so that the timeout handler can set the
P_TIMEOUT flag before making the process runnable.
OK mpi@
claudio [Thu, 1 Jun 2023 09:47:34 +0000 (09:47 +0000)]
Check the F_NEXTHOP flag on the right kroute6 object.
On multipath routes the check ended up checking the wrong route for the
nexthop update. This resulted in a use-after-free in kroute_detach_nexthop().
This only affects IPv6 in the IPv4 code path the right object was already used.
Thanks to sthen@ for providing the debug information to track this down.
OK sthen@ tb@
tb [Thu, 1 Jun 2023 09:46:00 +0000 (09:46 +0000)]
Remove the speed test again
It takes too much time and we now know that all covered ciphers can cope
with unaligned input and output on all tested architectures.
jan [Thu, 1 Jun 2023 09:05:33 +0000 (09:05 +0000)]
Enable forwarding of ix(4) LRO Pakets via TSO
Also fix ip6_forwarding of TSO packets with tcp_if_output_tso().
With a lot of testing from Hrvoje Popovski
and a lot of tweaks from bluhm@
ok bluhm@
tb [Thu, 1 Jun 2023 07:32:25 +0000 (07:32 +0000)]
Rework tls_check_subject_altname() error handling
Default to having rv = -1 and explicitly goto done to set rv = 0.
This matches other code better.
ok jsing
tb [Thu, 1 Jun 2023 07:29:15 +0000 (07:29 +0000)]
Check for X509_get_ext_d2i() failure
X509_get_ext_d2i() (or rather X509V3_get_d2i()) can return NULL for
various reasons. If it fails because the extension wasn't found, it
sets *crit = -1. In any other case, e.g., the cert is bad or we ran
out of memory in X509V3_EXT_d2i(), crit is set to something else, so
we should actually error.
ok jsing
tb [Thu, 1 Jun 2023 02:34:23 +0000 (02:34 +0000)]
Avoid a potentially overflowing check
This doesn't actually overflow, but still is poor style.
Speaking of which: this is now the second time I get to fix something
reported by Nicky Mouha by way of a blog post. The first time was the
actual SHA-3 buffer overflow in Python where it is not entirely clear
who screwed up and how. Hopefully next time proper communication will
happen and work.
ok jsing
op [Wed, 31 May 2023 16:51:46 +0000 (16:51 +0000)]
add missing include of time.h
spotted after a report on OpenSMTPD-portable. While here include
sys/time.h in smtpd.h, as noted in event_init(3), since it includes
event.h.
ok millert@
jeremy [Wed, 31 May 2023 15:27:45 +0000 (15:27 +0000)]
Update to reflect that default Ruby version in ports is now 3.2
krw [Wed, 31 May 2023 13:49:56 +0000 (13:49 +0000)]
Remove declarations for unused search_label() local variables
error, i, p and poff. Fewer complaints from gcc -Wall.
The same was done to the NetBSD version in 2011 by tsutui.
Remove two more recent load_disklabel() comments implying that
search_label() checks MBR partitions. It doesn't and never has
despite the enticing names/types of the above unused variables.
No functional change.
dlg [Tue, 30 May 2023 23:55:42 +0000 (23:55 +0000)]
add net_tq_barriers
this waits once for something to end in all the net tqs.
ok claudio@
bluhm [Tue, 30 May 2023 19:32:57 +0000 (19:32 +0000)]
Use generic checksum calculation for TCP SYN+ACK packets.
Our syn cache did checksum calculation by hand, instead of the
established mechanism in ip output. The software-checksummed counter
increased once per incoming TCP connection.
Just set the flag M_TCP_CSUM_OUT in syn_cache_respond() and let
in_proto_cksum_out() do the work later. Then hardware checksumming
is used where available. Also remove redundant code. The unhandled
af case is handled in the first switch statement of the function.
tested by Hrvoje Popovski; OK mvs@
op [Tue, 30 May 2023 16:44:16 +0000 (16:44 +0000)]
fail when an argument is given on 'id -R'
from Lucas (lucas [at] sexy [dot] is).
ok millert@
job [Tue, 30 May 2023 16:02:28 +0000 (16:02 +0000)]
Fixup file modification timestamps to optimize failover from RRDP to RSYNC
In the RSYNC protocol a file's last modification time and its size are
used to determine whether sending a (partial) copy over the wire is needed.
Previously, when RRDP data structures are serialized to disk, the mtime of
files in DIR_VALID ended up being UTIME_NOW.
Thus, the mtimes of files obtained through RRDP will never match the mtimes
of the same files available through RSYNC - causing each and every file to
be added to the file transfer list.
Instead, use the internal timestamps of RPKI files as the last modified
timestamp. Specifically, for Signed Objects (ROAs, MFTs, GBRs, TAKs, ASPAs)
the CMS signing-time, for .cer files the X.509 notBefore, and for .crl files
the CRL lastUpdate. This results in a surprising optimization for the number
files which have to be transfered.
OK claudio@
job [Tue, 30 May 2023 15:56:47 +0000 (15:56 +0000)]
Add json.c to linker instructions
krw [Tue, 30 May 2023 15:10:39 +0000 (15:10 +0000)]
sparc64 disklabel(8) must be compiled with SUN_CYLCHECK and SUN_AAT0.
sparc64 auto allocation during install does not use fdisk(8).
Add *.sparc64.ok files that reflect sparc64 reality.
Should fix disklabel(8) regression on sparc64.
Requested by & ok bluhm@
aisha [Tue, 30 May 2023 14:04:53 +0000 (14:04 +0000)]
fix markups in character classes
ok jmc@
claudio [Tue, 30 May 2023 12:14:48 +0000 (12:14 +0000)]
Revert commitid ANSBO0rBvIUtTi45:
Make rpki-client choose the verification time of the time it is invoked
rather than always getting the current system time for every certificate
verification. This will result in output that is not variable on run-time.
Using the time of invocation does not work well with fast publishing CAs. It
can take a few minutes to reach a repo and that CA may have issued certificates
that are not yet valid if that startup time of rpki-client is used to validate.
This still keeps the -P option to specify a fixed validation time.
OK beck@ job@ tb@
claudio [Tue, 30 May 2023 12:12:06 +0000 (12:12 +0000)]
Split cleanup into cleanup and repository cleanup and show how many files
are kept / removed in the repository temporary storage.
After a discussion with tb@ and job@
claudio [Tue, 30 May 2023 12:02:22 +0000 (12:02 +0000)]
Convert all of filemode to use the json API as well.
Output is mostly the same apart from some space differences.
OK tb@ job@
tb [Tue, 30 May 2023 11:09:08 +0000 (11:09 +0000)]
Use error check to ensure we have SignedData in CMS
CMS_get0_SignerInfos() only returns a non-NULL pointer if the CMS object
contains SignedData. The subsequent assert can trigger if we parse an
object that is not of this type. Nothing ensures this up to this point,
so we have no way of knowing that the assertion is actually true. If we
get a CMS object without SignedData, we should ignore it, not abort the
rpki-client run. With this check in place it is also clear that we
actually check point 1a of the list of things to check in RFC 6488,
section 3.
ok claudio job
claudio [Tue, 30 May 2023 08:41:15 +0000 (08:41 +0000)]
Replace the one use of ibuf_prepend() using a similar ibuf_new() + ibuf_cat()
method but instead of overwriting ibuf internals replace the buf a level up.
Users of ikev2_msg_send() are not allowed to hold and reuse a pointer to
msg_data (which is another footgun to disarm at some point).
OK tb@
jsg [Tue, 30 May 2023 08:30:00 +0000 (08:30 +0000)]
spelling
ok jmc@ guenther@ tb@
op [Tue, 30 May 2023 07:37:34 +0000 (07:37 +0000)]
fix some nits on previous
- move a sentence out of a Bd block
- add some .Pp for spacing
- avoid a double colon on a sentence and the usage of second person
- mark STORE_CTX with .Vt
- change one Vt -> Dv (done after this has been ok'd by beck)
ok beck@
espie [Tue, 30 May 2023 04:42:21 +0000 (04:42 +0000)]
Due to the way make is designed, not being able to read a makefile
is basically silent.
Record errors due to missing permissions and other oddities, and display them
when we error out due to lack of targets, as a quality-of-life diagnostic.
Based on a remark from sthen@, with some feedback and tweaks from op@
okay op@, kn@
guenther [Tue, 30 May 2023 02:02:00 +0000 (02:02 +0000)]
Add IBT support to the retpoline+znow PLTs
ok kettenis@