openbsd
3 years agoRemove the unused X509_CERT_PAIR struct and the assicated API.
tb [Sun, 31 Oct 2021 16:28:50 +0000 (16:28 +0000)]
Remove the unused X509_CERT_PAIR struct and the assicated API.

ok beck jsing

3 years agoRemove the unused X509_CERT_FILE_CTX struct.
tb [Sun, 31 Oct 2021 16:26:08 +0000 (16:26 +0000)]
Remove the unused X509_CERT_FILE_CTX struct.

ok beck jsing

3 years agoPrepare to provide X509_STORE_CTX_get_obj_by_subject(), a wrapper
tb [Sun, 31 Oct 2021 16:23:45 +0000 (16:23 +0000)]
Prepare to provide X509_STORE_CTX_get_obj_by_subject(), a wrapper
around X509_STORE_get_by_subject() that eliminates the need of
allocating an object on the heap by hand.

ok beck inoguchi jsing

3 years agoSwitch various X509 API to use the new X509_LOOKUP_TYPE to match
tb [Sun, 31 Oct 2021 16:20:37 +0000 (16:20 +0000)]
Switch various X509 API to use the new X509_LOOKUP_TYPE to match
OpenSSL's signatures.

ok beck inoguchi jsing

3 years agoProvide the X509_LOOKUP_TYPE enum.
tb [Sun, 31 Oct 2021 16:17:14 +0000 (16:17 +0000)]
Provide the X509_LOOKUP_TYPE enum.
Remove the now unused X509_LU_{RETRY,FAIL,PKEY}.

ok beck inoguchi jsing

3 years agoFurther improve load_file(). Always set an errno on errors and make sure
claudio [Sun, 31 Oct 2021 16:00:14 +0000 (16:00 +0000)]
Further improve load_file(). Always set an errno on errors and make sure
the errno is not clobbered in the error path. Check result from load_file()
and issue a warning and skip the file in queue_add_tal().
OK benno@ beck@

3 years agoWhen converting the TAL parser to use load_file and pass the file via
claudio [Sun, 31 Oct 2021 15:58:13 +0000 (15:58 +0000)]
When converting the TAL parser to use load_file and pass the file via
data/datasz element to the parser process I forgot to remove the old
buf argument that abused descr for that. Because of this rpki-client
can crash.
Found by benno@, OK benno@ beck@

3 years agoPrepare definitions X509_STORE_set_verify{,_cb}_func() that work with
tb [Sun, 31 Oct 2021 15:55:45 +0000 (15:55 +0000)]
Prepare definitions X509_STORE_set_verify{,_cb}_func() that work with
opaque structs.

ok beck inoguchi jsing

3 years agoPrepare to make various structs in x509_vfy.h opaque.
tb [Sun, 31 Oct 2021 15:54:08 +0000 (15:54 +0000)]
Prepare to make various structs in x509_vfy.h opaque.

ok beck inoguchi jsing

3 years agoDisable both TCP/UDP checksum offloading and VLAN HW tag offloading for now,
patrick [Sun, 31 Oct 2021 15:25:10 +0000 (15:25 +0000)]
Disable both TCP/UDP checksum offloading and VLAN HW tag offloading for now,
as we currently configure neither in the transmit code path.

Found by sf@

3 years agoImplement transmit and transmit completion path.
patrick [Sun, 31 Oct 2021 15:22:40 +0000 (15:22 +0000)]
Implement transmit and transmit completion path.

3 years agoExtend the SPI bus API a bit. The config structure gets an sc_cs_delay
kettenis [Sun, 31 Oct 2021 15:12:00 +0000 (15:12 +0000)]
Extend the SPI bus API a bit.  The config structure gets an sc_cs_delay
member to allow us to specify a delay between assert the CS# signal and
starting the clock.  And the transfer function gains a flags argument,
which can be used to specify a new SPI_KEEP_CS flag to keep CS# asserted
after the transfer.  This allows us to do another transfer immediately
afterwards without de-asserting CS# which is necessary for sending
commands to the upcoming Apple M1 keyboard/touchpad driver.

ok patrick@

3 years agoMove the fill and the tail pointer change to a later point, to make sure
patrick [Sun, 31 Oct 2021 15:02:25 +0000 (15:02 +0000)]
Move the fill and the tail pointer change to a later point, to make sure
that the RDT is written, and that it is written not too early.  Doing it
before writing IGC_RXDCTL definitely doesn't work.

The tail pointer needs to be set to the next empty slot, so it has to be
"last desc filled + 1".

Make sure sure that the rss mapping does not happen in the middle of the
RX checksum block, and that it happens only if nqueues > 1.  Also disable
storing bad packets.

With this, igc(4) receives packets just fine.

ok kevlo@

3 years agoAdd igc(4), a driver for the Intel 2.5Gb Ethernet controllers.
patrick [Sun, 31 Oct 2021 14:52:57 +0000 (14:52 +0000)]
Add igc(4), a driver for the Intel 2.5Gb Ethernet controllers.

Ported by kevlo@
ok jmatthew@

3 years agoregen
patrick [Sun, 31 Oct 2021 14:41:53 +0000 (14:41 +0000)]
regen

3 years agoAdd another PCI id for Intel 2.5Gb adapters.
patrick [Sun, 31 Oct 2021 14:41:00 +0000 (14:41 +0000)]
Add another PCI id for Intel 2.5Gb adapters.

3 years agoMake athn(4) attach to the Sony UWA-BR100. Patch by martingot@protonmail
stsp [Sun, 31 Oct 2021 12:24:02 +0000 (12:24 +0000)]
Make athn(4) attach to the Sony UWA-BR100. Patch by martingot@protonmail

3 years agoregen
stsp [Sun, 31 Oct 2021 12:23:17 +0000 (12:23 +0000)]
regen

3 years agoAdd USB device ID for the Sony UWA-BR100. Patch by martingot@protonmail
stsp [Sun, 31 Oct 2021 12:22:48 +0000 (12:22 +0000)]
Add USB device ID for the Sony UWA-BR100. Patch by martingot@protonmail

3 years agoRaise SPL to IPL_NET in run_next_scan() to avoid splassert failures.
stsp [Sun, 31 Oct 2021 12:17:54 +0000 (12:17 +0000)]
Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures.

Problem found and fix tested by krw@.
ok krw@

3 years agoPrepare regress for opaque structs in x509*.h
tb [Sun, 31 Oct 2021 08:27:15 +0000 (08:27 +0000)]
Prepare regress for opaque structs in x509*.h

3 years agoAdd explicit CBS_contains_zero_byte() check in CBS_strdup().
jsing [Sun, 31 Oct 2021 06:48:54 +0000 (06:48 +0000)]
Add explicit CBS_contains_zero_byte() check in CBS_strdup().

If the CBS data contains a zero byte, then CBS_strdup() is only going to
return part of the data - add an explicit CBS_contains_zero_byte() and
treat such data as an error case.

ok tb@

3 years agosync
deraadt [Sun, 31 Oct 2021 01:15:31 +0000 (01:15 +0000)]
sync

3 years agoChange hw.perfpolicy=auto by default, at startup. If the system has AC
deraadt [Sat, 30 Oct 2021 23:24:46 +0000 (23:24 +0000)]
Change hw.perfpolicy=auto by default, at startup.  If the system has AC
power connected (default is yes when no driver differentiates) then default
to 100% performance. On battery, use the existing auto algorithm (which is
admittedly somewhat unrefined).
This change overrides the system/BIOS speed and puts OpenBSD in control.
As this happens very early during boot, besides speedups in all usage usage
patterns, some surprises: unhibernate and sysupgrade times are cut in half.
note: on a few architectures, the setperf fn pointer is changed late, and
thus the auto algorithm stops timeing out.  kettenis and i will look for
a solution.
in snaps for more than a week.
ok kettenis

3 years agoKill the dead code from unp_drop().
mvs [Sat, 30 Oct 2021 16:35:31 +0000 (16:35 +0000)]
Kill the dead code from unp_drop().

The unp_drop() was removed from the 'PRU_ABORT' path in the previous
commit. Now it only remains in the unp_detach() where disconnects the
connected datagram sockets linked to the `unp_link' list. Such sockets
always have the associated file descriptor and never had been linked to
the `so_q0' or `so_q' of listening socket so their `so_head' is always
NULL.

ok millert@ sashan@ mpi@

3 years agoFix the UNIX domain sockets leak in soclose().
mvs [Sat, 30 Oct 2021 16:24:18 +0000 (16:24 +0000)]
Fix the UNIX domain sockets leak in soclose().

Each listening socket has two queues, the `so_q0' where partial connected
sockets linked and the `so_q' where connected but not yet accept(2)ed
sockets linked. Such sockets has no file descriptor allocated, so they
have no access from the userland. When the socket linked to `so_q0' or
`so_q' it has it's `so_head' pointed to the listening socket. The userland
receive sockets from `so_q' by accept(2) which allocates the file
descriptor to the socket.

When userland close(2) listening socket, soclose() should release the
sockets linked to `so_q0' and `so_q' because it's the only place where
they are referenced. It removes the socket from the queue by soqremque().
Since socket is not in the queue it's `so_head' is NULL. Then the socket
passed to soabort() which should destroy it by (*pr_usrreq)() call with
'PRU_ABORT' request.

In UNIX domain sockets layer the unp_drop() only disconnects passed socket
and doesn't destroy it because it's `so_head' is NULL. This socket has the
only access by the UNIX domain sockets garbage collector which leaves it
alive, so the socket is permanently leaked.

This leak was introduced in the revision 1.26 of sys/uipc_socket.c when
soqremque() was placed before soabort(). To fix this the unp_drop() was
replaced by unp_detach() and sofree() in the 'PRU_ABORT' path. unp_drop()
only sets the error and disconnects passed socket. We don't expose this
error and unp_detach() also disconnects the socket before destroy it's
protocol control block. sofree() destroys the rest.

The socket passed to soabort() has no vnode(9) associated, so unp_detach()
don't release `unp_lock'. Also this socket never had associated file
descriptor so it already has 'SS_NOFDREF' flag set.

This diff was also applied to 6.9 and 7.0 branches as errata.

3 years agonew manual page X509_CRL_METHOD_new(3)
schwarze [Sat, 30 Oct 2021 16:20:35 +0000 (16:20 +0000)]
new manual page X509_CRL_METHOD_new(3)
documenting five functions to customize CRL handling

3 years agoAdd GPIO functionality (including support for using GPIOs as interrupt pins).
kettenis [Sat, 30 Oct 2021 14:50:54 +0000 (14:50 +0000)]
Add GPIO functionality (including support for using GPIOs as interrupt pins).
Needed for upcoming Apple M1 laptop keyboard support.

ok patrick@

3 years agodocument (hopefully) near future directions
espie [Sat, 30 Oct 2021 13:44:34 +0000 (13:44 +0000)]
document (hopefully) near future directions

3 years agoFix build break caused by accidental keystroke during last commit
ratchov [Sat, 30 Oct 2021 12:48:11 +0000 (12:48 +0000)]
Fix build break caused by accidental keystroke during last commit

3 years agoDisestablish softintrs upon detach (missed in last commit)
ratchov [Sat, 30 Oct 2021 12:40:55 +0000 (12:40 +0000)]
Disestablish softintrs upon detach (missed in last commit)

During detach, we can't rely on softintrs to signal processes blocked
in read, write or poll, so we need to explicitely call wakeup
functions in the detach method, as other drivers do.

3 years agoDefer selwakeup() calls to a softintr
ratchov [Sat, 30 Oct 2021 12:26:26 +0000 (12:26 +0000)]
Defer selwakeup() calls to a softintr

selwakeup() needs to be protected by KERNEL_LOCK, but we're not
allowed to grab KERNEL_LOCK on interrupt context because midi runs at
IPL_AUDIO with the audio_lock held. Furthermore, doing so is a locking
order bug: syscall code-path grabs KERNEL_LOCK first while interrupt
code-path does the opposite when calling selwakeup().

ok visa

3 years agoRevert previous commit as it's causing panic when devices are detached
ratchov [Sat, 30 Oct 2021 11:56:19 +0000 (11:56 +0000)]
Revert previous commit as it's causing panic when devices are detached

ok sthen, anton

3 years agomatch on Intel 600 Series
jsg [Sat, 30 Oct 2021 03:27:35 +0000 (03:27 +0000)]
match on Intel 600 Series

3 years agoenable snooping on Intel 600 Series
jsg [Sat, 30 Oct 2021 03:24:59 +0000 (03:24 +0000)]
enable snooping on Intel 600 Series

3 years agoregen
jsg [Sat, 30 Oct 2021 03:22:44 +0000 (03:22 +0000)]
regen

3 years agoadd Intel 600 Series and Alder Lake S ids
jsg [Sat, 30 Oct 2021 03:22:08 +0000 (03:22 +0000)]
add Intel 600 Series and Alder Lake S ids

described in
648364-001 Intel 600 Series Chipset Family Platform Controller Hub Datasheet
655258-001 12th Generation Intel Core Processors Datasheet

3 years agoIf the test fails, do not hang forever. Abort with a 10 seconds
bluhm [Fri, 29 Oct 2021 20:15:03 +0000 (20:15 +0000)]
If the test fails, do not hang forever.  Abort with a 10 seconds
timeout.

3 years agoTweak code to make it clear that MBR_init() uses just the boot code and
krw [Fri, 29 Oct 2021 18:38:19 +0000 (18:38 +0000)]
Tweak code to make it clear that MBR_init() uses just the boot code and
partition 0 information from the default MBR.

loongson and macppc provide partition 0 information but no boot code.

amd64, i386, landisk provide boot code but no partition 0 information.

Other arch's get by w/o a default MBR (a.k.a. /usr/mdec/mbr).

No functional change.

3 years agosync
deraadt [Fri, 29 Oct 2021 18:09:26 +0000 (18:09 +0000)]
sync

3 years agothe list of devices which can be created it getting unwieldy and keep getting
jmc [Fri, 29 Oct 2021 16:42:57 +0000 (16:42 +0000)]
the list of devices which can be created it getting unwieldy and keep getting
out of date: remove it (sthen) and add a pointer to -C (dlg);

ok sthen

3 years agopoll needs similar treatment as select recently gained in order to not
anton [Fri, 29 Oct 2021 15:52:44 +0000 (15:52 +0000)]
poll needs similar treatment as select recently gained in order to not
mask failed kqueue_register() attempts which in turn causes the thread to
end up sleeping as opposed of propagating the failure to user space.

Regression introduced in the recent switch to implement poll on top of
kqueue.

Thanks to Larry Hynes <larry at larryhynes dot com> for reporting and
Leah Neukirchen <leah at vuxu dot org> for providing a reproducer; which
also already made its way into regress.

ok mpi@

3 years agoA USB HID report ID must be represented using a single byte ranging
anton [Fri, 29 Oct 2021 15:43:55 +0000 (15:43 +0000)]
A USB HID report ID must be represented using a single byte ranging
between 1-255 where 0 is reserved. The pseudo report ID
UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid
report ID 255. Therefore crank it which gets rid of the collision and
increase the related fields in order to cope with larger integers.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and
testing.

3 years agoIn x509/x509_purp.c rev. 1.11, tb@ fixed X509_check_purpose(3)
schwarze [Fri, 29 Oct 2021 14:29:24 +0000 (14:29 +0000)]
In x509/x509_purp.c rev. 1.11, tb@ fixed X509_check_purpose(3)
to fail if parsing of a certificate extension failed.
Adjust the documentation accordingly.
OK tb@

3 years agomatch more Prolific HXN ids
jsg [Fri, 29 Oct 2021 14:25:05 +0000 (14:25 +0000)]
match more Prolific HXN ids
tested by robert@ on PL2303GT
ok deraadt@ robert@ patrick@

3 years agoregen
jsg [Fri, 29 Oct 2021 14:23:07 +0000 (14:23 +0000)]
regen

3 years agomore Prolific HXN ids
jsg [Fri, 29 Oct 2021 14:22:26 +0000 (14:22 +0000)]
more Prolific HXN ids
ok deraadt@ robert@ patrick@

3 years agoDon't grab audio_lock in filt_midi{read,write} if NOTE_SUBMIT is set.
ratchov [Fri, 29 Oct 2021 13:24:50 +0000 (13:24 +0000)]
Don't grab audio_lock in filt_midi{read,write} if NOTE_SUBMIT is set.

Fixes panics caused by attempts to grab audio_lock twice in the
interrupt code path: once in the low-lever interrupt handler and once
in selwakeup()

This is exactly how audio(4) handles this problem.

ok mpi

3 years agoHook poll tests.
mpi [Fri, 29 Oct 2021 13:13:20 +0000 (13:13 +0000)]
Hook poll tests.

3 years agoTest that poll(2) returns POLLNVAL for an already closed fd.
mpi [Fri, 29 Oct 2021 13:13:04 +0000 (13:13 +0000)]
Test that poll(2) returns POLLNVAL for an already closed fd.

poll(2) rewrite on top of kqueue is currently blocking instead of
returning.  Regression reported by Larry Hynes with a reproducer
from Leah Neukirchen, thanks a lot!

3 years agoActually error in X509_check_purpose() if x509v3_cache_extensions()
tb [Fri, 29 Oct 2021 12:11:13 +0000 (12:11 +0000)]
Actually error in X509_check_purpose() if x509v3_cache_extensions()
indicates failure. The previous "error return" X509_V_ERR_UNSPECIFIED
translates to 1, i.e., success. This changes to the intended behavior
of x509_purp.c r1.3 and matches OpenSSL. This will need various
adjustments in the documentation.

ok jsing

3 years agodocument the horrifying function X509_TRUST_set_default(3)
schwarze [Fri, 29 Oct 2021 11:25:37 +0000 (11:25 +0000)]
document the horrifying function X509_TRUST_set_default(3)

3 years agoadd missing .h file include
deraadt [Fri, 29 Oct 2021 10:54:33 +0000 (10:54 +0000)]
add missing .h file include
from Emil Engler

3 years agorpki-client 7.4 is imminent, bump version
claudio [Fri, 29 Oct 2021 10:36:55 +0000 (10:36 +0000)]
rpki-client 7.4 is imminent, bump version

3 years agodocument X509_EXTENSION_dup(3);
schwarze [Fri, 29 Oct 2021 10:22:00 +0000 (10:22 +0000)]
document X509_EXTENSION_dup(3);
while here, add the missing const qualifier to the obj argument of
X509_EXTENSION_create_by_OBJ(3) and correct a typo in the argument
name of X509_EXTENSION_get_data(3)

3 years agonew manual page X509_REQ_print_ex(3),
schwarze [Fri, 29 Oct 2021 09:42:07 +0000 (09:42 +0000)]
new manual page X509_REQ_print_ex(3),
also documenting X509_REQ_print(3) and X509_REQ_print_fp(3)

3 years agoEnsure that RRDP snapshot and delta files are fetched from the same host
claudio [Fri, 29 Oct 2021 09:27:36 +0000 (09:27 +0000)]
Ensure that RRDP snapshot and delta files are fetched from the same host
as the notification file.
OK tb@ job@

3 years agoLimit the HTTP requests to 2GB of data. This is enforced via a quick
claudio [Fri, 29 Oct 2021 08:51:20 +0000 (08:51 +0000)]
Limit the HTTP requests to 2GB of data. This is enforced via a quick
check of the content-lenght header and also with a check when writing
data out so that chunked encoding can not bypass the limit.
OK beck@ job@

3 years agoProperly implement --max-size and --min-size.
claudio [Fri, 29 Oct 2021 08:00:59 +0000 (08:00 +0000)]
Properly implement --max-size and --min-size.
This uses scan_scaled(3) from libutil which is very similar to how rsync
behaves. Not implemented are the +/-1 math and the 1000 vs 1024 multipliers.
OK benno@ job@

3 years agossh-keygen: make verify-time argument parsing optional
djm [Fri, 29 Oct 2021 03:20:46 +0000 (03:20 +0000)]
ssh-keygen: make verify-time argument parsing optional

From Fabian Stelzer

3 years agosshsig: add tests for signing key validity and find-principals
djm [Fri, 29 Oct 2021 03:03:06 +0000 (03:03 +0000)]
sshsig: add tests for signing key validity and find-principals

- adds generic find-principals tests (this command had none before)
- tests certs with a timeboxed validity both with and without a
  restriced lifetime for the CA
- test for a revoked CA cert

by Fabian Stelzer

3 years agoavoid signedness warning; spotted in -portable
djm [Fri, 29 Oct 2021 02:48:19 +0000 (02:48 +0000)]
avoid signedness warning; spotted in -portable

3 years agoSync output at end of run with output inside the openbgpd output file.
claudio [Thu, 28 Oct 2021 19:02:36 +0000 (19:02 +0000)]
Sync output at end of run with output inside the openbgpd output file.
With and OK tb@

3 years agoDo not force the cursor to move if it is in the automargin space at EOL
nicm [Thu, 28 Oct 2021 18:57:06 +0000 (18:57 +0000)]
Do not force the cursor to move if it is in the automargin space at EOL
and that is where we want it to be, GitHub issue 2956.

3 years agoAllow detach even if suspend flag set, GitHub issue 2932.
nicm [Thu, 28 Oct 2021 18:54:33 +0000 (18:54 +0000)]
Allow detach even if suspend flag set, GitHub issue 2932.

3 years agoExpand command as a format, GitHub issue 2920.
nicm [Thu, 28 Oct 2021 18:39:15 +0000 (18:39 +0000)]
Expand command as a format, GitHub issue 2920.

3 years agodocument X509_REQ_to_X509(3)
schwarze [Thu, 28 Oct 2021 15:30:54 +0000 (15:30 +0000)]
document X509_REQ_to_X509(3)

3 years agoflesh out veb(4)/vport description a bit, spell out in more words what
sthen [Thu, 28 Oct 2021 15:06:36 +0000 (15:06 +0000)]
flesh out veb(4)/vport description a bit, spell out in more words what
is meant by "independently of the host network stack"

feedback jmc dlg

3 years agounwrap a line
tb [Thu, 28 Oct 2021 14:24:08 +0000 (14:24 +0000)]
unwrap a line

3 years agoLimit how many FileAndHash entries a single manifest may contain
job [Thu, 28 Oct 2021 13:51:42 +0000 (13:51 +0000)]
Limit how many FileAndHash entries a single manifest may contain

OK claudio@

3 years agoDon't fetch files larger than 2MB
job [Thu, 28 Oct 2021 13:50:29 +0000 (13:50 +0000)]
Don't fetch files larger than 2MB

OK claudio@

3 years agodocument X509_to_X509_REQ(3)
schwarze [Thu, 28 Oct 2021 13:23:19 +0000 (13:23 +0000)]
document X509_to_X509_REQ(3)

3 years agosort
tb [Thu, 28 Oct 2021 13:13:03 +0000 (13:13 +0000)]
sort

3 years agoProvide --max-size and --min-size arguments. Currently ignored but
claudio [Thu, 28 Oct 2021 13:07:43 +0000 (13:07 +0000)]
Provide --max-size and --min-size arguments. Currently ignored but
rpki-client wants --max-size and this will unblock that work.
With job@

3 years agosync
sthen [Thu, 28 Oct 2021 12:01:56 +0000 (12:01 +0000)]
sync

3 years agoLimit the size of the base64 blob inside the RRDP XML to be less than
claudio [Thu, 28 Oct 2021 11:57:00 +0000 (11:57 +0000)]
Limit the size of the base64 blob inside the RRDP XML to be less than
MAX_FILE_SIZE after base64 decoding it. This way hostile RRDP servers
do less damage.
OK beck@ tb@

3 years agoMechanical KNF in preparation for changing
beck [Thu, 28 Oct 2021 11:55:43 +0000 (11:55 +0000)]
Mechanical KNF in preparation for changing

3 years agoAdd headers normally contained in include/openssl, verbatim from 1.1.1
beck [Thu, 28 Oct 2021 11:23:07 +0000 (11:23 +0000)]
Add headers normally contained in include/openssl, verbatim from 1.1.1

3 years agoImport Certificate Transparency verbatim from OpenSSL 1.1.1
beck [Thu, 28 Oct 2021 11:21:03 +0000 (11:21 +0000)]
Import Certificate Transparency verbatim from OpenSSL 1.1.1

This is not yet hooked up and will not compile. Follow on commits
will KNF and then make it build.

ok jsing@ tb@

3 years agoopenssl-ruby tests: rework for x509_alt.c r1.3 and r1.5.
tb [Thu, 28 Oct 2021 11:01:19 +0000 (11:01 +0000)]
openssl-ruby tests: rework for x509_alt.c r1.3 and r1.5.

ruby can no longer generate certs with bogus wildcards in it to check
that they will fail to verify when creating TLS connections. It will
throw an error. This change needs openssl-ruby-tests-20211024p0 or later
to work.

3 years agoBring back r1.3, ok beck
tb [Thu, 28 Oct 2021 10:58:23 +0000 (10:58 +0000)]
Bring back r1.3, ok beck

Original commit message from beck:

Validate Subject Alternate Names when they are being added to certificates.

With this change we will reject adding SAN DNS, EMAIL, and IP addresses
that are malformed at certificate creation time.

ok jsing@ tb@

3 years agoAccept server replies from any server port
kn [Thu, 28 Oct 2021 09:44:49 +0000 (09:44 +0000)]
Accept server replies from any server port

There is no requirement other than replying to client port 68/udp
as per RFC 2131, so drop the 67/udp check.

Same conclusion from florian
Reported and tested by Roc Vallès < vallesroc AT gmail DOT com>, thanks!

3 years agoDon't exit in certain cases on failures to parse x509 objects.
beck [Thu, 28 Oct 2021 09:02:19 +0000 (09:02 +0000)]
Don't exit in certain cases on failures to parse x509 objects.

In most cases we already warn and continue if someone sends us malformed
x509 objects. This makes this consistent behaviour in all places
so that if someone passes in bogus X509, We end up failing their entry
and continuing rather than exiting.

We still exit on memory/system failures so that a future run of rpki
client can simply do better when the machine is perhaps less hammered
on

ok job@ claudio@

3 years agoadd proper declaration for addr in dt_prov_kprobe_hook
jasper [Thu, 28 Oct 2021 08:47:40 +0000 (08:47 +0000)]
add proper declaration for addr in dt_prov_kprobe_hook

3 years agoincrement SSH_SK_VERSION_MAJOR to match last change
djm [Thu, 28 Oct 2021 02:55:30 +0000 (02:55 +0000)]
increment SSH_SK_VERSION_MAJOR to match last change

3 years agoWhen downloading resident keys from a FIDO token, pass back the
djm [Thu, 28 Oct 2021 02:54:18 +0000 (02:54 +0000)]
When downloading resident keys from a FIDO token, pass back the
user ID that was used when the key was created and append it to
the filename the key is written to (if it is not the default).

Avoids keys being clobbered if the user created multiple
resident keys with the same application string but different
user IDs.

feedback Pedro Martelletto; ok markus

NB. increments SSH_SK_VERSION_MAJOR

3 years agoFix HISTORY section: 6.9 -> 7.0
tb [Wed, 27 Oct 2021 22:11:21 +0000 (22:11 +0000)]
Fix HISTORY section: 6.9 -> 7.0

3 years agoAdd limits on size of certain untrusted inputs
beck [Wed, 27 Oct 2021 21:56:58 +0000 (21:56 +0000)]
Add limits on size of certain untrusted inputs

ok job@

3 years agocreate directory for libxcvt headers
matthieu [Wed, 27 Oct 2021 21:31:31 +0000 (21:31 +0000)]
create directory for libxcvt headers

3 years agoextend checks of ensuring there's valid CTF data before attempting to use it.
jasper [Wed, 27 Oct 2021 21:21:35 +0000 (21:21 +0000)]
extend checks of ensuring there's valid CTF data before attempting to use it.

3 years agoLimit length on URIs
job [Wed, 27 Oct 2021 18:09:08 +0000 (18:09 +0000)]
Limit length on URIs

OK beck@

3 years agoThe crypto layer needs the kernel lock. ah_zeroize() takes it when
bluhm [Wed, 27 Oct 2021 16:58:44 +0000 (16:58 +0000)]
The crypto layer needs the kernel lock.  ah_zeroize() takes it when
called from tdb_walk().  tdb_walk() needs mutex tdb_sadb_mtx to
protect the loop traversal.  First take the kernel lock in tdb_walk()
to preserve lock order.
found by witness
OK tobhe@ mvs@

3 years agouse db_get_probe_addr() instead of handrolling the expression wrapped in ifdef
jasper [Wed, 27 Oct 2021 15:18:12 +0000 (15:18 +0000)]
use db_get_probe_addr() instead of handrolling the expression wrapped in ifdef

ok mpi@

3 years agonew manual page X509_REQ_add_extensions(3)
schwarze [Wed, 27 Oct 2021 14:54:07 +0000 (14:54 +0000)]
new manual page X509_REQ_add_extensions(3)
documenting six functions for extensions in certification requests

3 years agoReplace 'DIAGNOSTIC' block within soqinsque() by KASSERT(9).
mvs [Wed, 27 Oct 2021 13:41:09 +0000 (13:41 +0000)]
Replace 'DIAGNOSTIC' block within soqinsque() by KASSERT(9).

ok sashan@

3 years agoadd some .Xrs involving recently added pages
schwarze [Wed, 27 Oct 2021 11:24:47 +0000 (11:24 +0000)]
add some .Xrs involving recently added pages

3 years agominor tweaks to wording and punctuation,
schwarze [Wed, 27 Oct 2021 11:22:57 +0000 (11:22 +0000)]
minor tweaks to wording and punctuation,
and add .Xrs to relevant objects

3 years agoMinor tweaks:
schwarze [Wed, 27 Oct 2021 10:35:43 +0000 (10:35 +0000)]
Minor tweaks:
* Say "number of bytes" instead of "length of bytes".
* Remove mention of a BUGS section that exists neither here nor in OpenSSL.
* List all authors who contributed Copyright-worthy amounts of text.
* Remove years from the Copyright line that saw no non-trivial changes.
* Add the year 2014: that's when Emilia wrote the i2d_re_X509_tbs() text.
* Improve merge comments.

3 years agoRevert version 1.3 - not allowing the creation of bogus certificates
beck [Wed, 27 Oct 2021 10:22:08 +0000 (10:22 +0000)]
Revert version 1.3 - not allowing the creation of bogus certificates
breaks the ruby regression tests that expect to make bogus certificates
and see that they are rejected :(

I am reverting this for now to make the regress tests pass, and will
bring it back if we decide to patch the regress tests to remove the
problem cases

3 years agoFix to correctly parse the 'to' time into the to_tm
beck [Wed, 27 Oct 2021 09:56:43 +0000 (09:56 +0000)]
Fix to correctly parse the 'to' time into the to_tm