summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-18nc: pass protocol name to connection_info()Theo Buehler
Avoids repeated use of ternary operator on globals.
2022-12-18nc: factor printing of connection info into a functionTheo Buehler
This simply moves a chunk of code in this spaghetti mess into its own function with minimal changes. idea from a diff by mpf
2022-12-18acme-client: rename cc to sign_len in op_sign()Theo Buehler
requested by jsing
2022-12-18acme-client: fix openssl includes in acctproc.cTheo Buehler
We don't do PEM or random in here, but we use BN, EC, ECDSA, so include the relevant headers. errno.h was also missing.
2022-12-18acme-client: check EC signature lengthTheo Buehler
Make sure the size_t containing EC signature length is not truncated when passing it to d2i_ECDSA_SIG() as a long. This won't happen, but documents API quirks... requested by jsing
2022-12-18acme-client: simplify elliptic curve signaturesTheo Buehler
We can get the correct size of the signature using EVP_PKEY_bits() which uses the order instead of the (strictly speaking incorrect) degree. Grab the (r, s) out of the ECDSA signature with ECDSA_SIG_get0_{r,s}(), which is a saner interface than EVP_SIG_get0(). Finally, do the zero padding using BN_bn2binpad() which is simpler than the currently rather fiddly solution. ok jsing
2022-12-18acme-client: switch op_sign() to EVP_DigestSign()Theo Buehler
EVP_DigestSign() is a bit more ergonomic than the old EVP_Sign* family, it takes size_t instead of int and and it also allows allocating the memory needed instead of relying on some weird estimate. This again gets rid of a few stupid else if. ok jsing
2022-12-18acme-client: simplify op_thumbprint()Theo Buehler
We can EVP_Digest() into an array on the stack rather than doing a long dance and song with lots of ugly else if. ok jsing
2022-12-18acme-client: inline a confusing and useless defineTheo Buehler
2022-12-18acme-client: encode unexpected SANs before printingTheo Buehler
If a SAN isn't configured, it could be anything, so make printing it safe using strvisx(). If it is configured but duplicate, printing it should be fine, so don't bother. This removes two XXX added in the previous commit. ok florian
2022-12-18regenMark Kettenis
2022-12-18Add Union Memory NVMe devices.Mark Kettenis
ok jsg@
2022-12-18Disable the keyboard on the Samsung Galaxy Book Go until we can fix theMarcus Glocker
resulting interrupt storm. It's causing bad system performance, and breaks the installer.
2022-12-18Do not try to create physical interfacesKlemens Nanni
vifscreate() always creates all virtual interfaces up-front. To check whether a given interface exists, ifstart() uses ifcreate() which tries to create nonexistent ones. Virtual ones are guaranteed to be present and physical ones cannot be created, so replace the ifcreate() call with a simpler ifconfig test and clarify the comment. OK martijn afresh1
2022-12-18Use volatile sig_atomic_t for flag set in signal handlerTheo Buehler
2022-12-17Switch to using BN_zero() instead of BN_zero_ex()Theo Buehler
2022-12-17Move benchmark target up a bit and mark it phonyTheo Buehler
2022-12-17Zap some whitespaceTheo Buehler
2022-12-17Merge documentation of UI_null() from OpenSSL 1.1Theo Buehler
jsing doesn't like it, but it's better than nothing. ok jsing
2022-12-17Document BIO_set_flags(3), BIO_clear_flags(3), BIO_test_flags(3),Ingo Schwarze
and BIO_get_flags(3).
2022-12-17Link ui_null.c to buildTheo Buehler
2022-12-17Prepare to provide UI_null()Theo Buehler
xmlsec needs this, nothing else. Our linkers link libxmlsec1-openssl, only warns and since nothing uses this library in ports, this wasn't noticed for a long time. Reported by Thomas Mitterfellner ok jsing
2022-12-17syncTheo de Raadt
2022-12-17Provide regress coverage for BN shift functions.Joel Sing
Provide regress coverage for BN_lshift1(), BN_rshift1(), BN_lshift() and BN_rshift(), along with basic benchmarking functionality (run via 'make benchmark').
2022-12-17Revise cipher list regress coverage of SSL_set_security_level().Joel Sing
A SSL_set_security_level() call was added to the cipher list regress, which expects a failure - however, it should succeed and fails for a completely unrelated reason. Rework this regress so that it actually passes and tests for the expected behaviour.
2022-12-17Provide BN_zero()/BN_one() as functions and make BN_zero() always succeed.Joel Sing
BN_zero() is currently implemented using BN_set_word(), which means it can fail, however almost nothing ever checks the return value. A long time ago OpenSSL changed BN_zero() to always succeed and return void, however kept BN_zero as a macro that calls a new BN_zero_ex() function, so that it can be switched back to the "can fail" version. Take a simpler approach - change BN_zero()/BN_one() to functions and make BN_zero() always succeed. This will be exposed in the next bump, at which point we can hopefully also remove the BN_zero_ex() function. ok tb@
2022-12-17add arch to Dt;Jason McIntyre
2022-12-17acme-client: fix SAN-handling insanityTheo Buehler
The revoke process, which does a lot more than revoking a cert, wants to know the SANs in the cert to be revoked or renewed and check them against the ones configured in the config file. To find out which ones are, it prints the SAN extension to a BIO using X509V3_EXT_print(), slurps that into a buffer, tokenizes the undocumented output string and plucks out the "DNS:" names. This is reminiscent of node's hilarious CVE-2021-44532 and on about the same level of crazy, but fortunately not security relevant. Get the SAN extension as a GENERAL_NAMES from libcrypto, then we have an actual data structure to work with, which allows us to access the DNS names without problems. This simplifies things quite a bit, but the actual logic in this file remains unmodified. Be careful about ASN1_IA5STRINGs and do not assume they are C strings. Tested by florian, millert, Renaud Allard, thanks! ok florian jsing
2022-12-17regen after minherit(2) unlockKlemens Nanni
2022-12-17Unlock minherit(2)Klemens Nanni
struct uvm_map's .addr is protected by the map's lock and .{min,max}_offset are immutable. uvm_map_inherit() locks the VM map upon entry, sets the desired inheritance mode for the given address range (validated outside the lock) and unlocks the map itself. fork(2), i.e. uvm_mapent_forkcopy(), first locks both old and new maps and then copies entries over as per the inheritance type. futex(2), another user of struct vm_map_entry's .inheritance member, also locks the map accordingly. OK mpi
2022-12-17X509_check_purpose.3: incorporate feedback from jsingTheo Buehler
2022-12-17aplefuse(4)Mark Kettenis
2022-12-17Add aplefuse(4), a driver for the eFuses on Apple Silicon SoCs.Mark Kettenis
ok patrick@
2022-12-17Make nvmem_read_cell() and nvmem_write_cell() work for hardware thatMark Kettenis
requires word-sized access. ok patrick@
2022-12-16In bio.h rev. 1.54, jsing@ and tb@ provided BIO_callback_fn_ex(3),Ingo Schwarze
BIO_set_callback_ex(3), BIO_get_callback_ex(3), and BIO_callback_fn(3). Document them, in part by merging from the OpenSSL 1.1.1 branch, which is still under a free license, but heavily tweaked by me, in particular: * mention that BIO_set_callback_arg(3) is misnamed; * keep our more detailed explanation of the "ret" argument; * make the list of callback invocations more readable; * and update the HISTORY section.
2022-12-16qcpdc(4)'s establish routine needs to return the wrapped cookie, not thePatrick Wildt
cookie it received from establishing the interrupt.
2022-12-16Document extension caching of X509_check_purpose()Theo Buehler
The overwhelming majority of callers of X509_check_purpose() in our tree pass a purpose of -1. In this case X509_check_purpose() acts as a wrapper of x509v3_cache_extensions() which makes sanity checks like non-negativity of ASN.1 integers or canonicity of RFC 3779 extensions as well as checking uniqueness of extensions. from schwarze who beat an initial diff of mine into shape
2022-12-16zap double space and needless line breakKlemens Nanni
2022-12-16drop a total of 93 trailing spaces from three linesTheo Buehler
2022-12-16add a CAVEATS section warning the user to not create cycles;Ingo Schwarze
OK tb@
2022-12-16top(1): always recount number of online CPUsScott Soule Cheloha
If hw.smt is toggled while top(1) is running in "combined" mode the CPU count on the CPU state line is incorrect. We always need to recount the number of online CPUs.
2022-12-16Prevent KASSERT in iwm(4) if firmware image is missing or corrupt.Stefan Sperling
Same fix as for iwx(4) in CVS commit YakAvDYHWiUF3c4m, r1.113 if_iwx.c. ok deraadt, mpi
2022-12-16Revert BIO_push(3) cycle prevention (bio_lib.c rev. 1.42).Ingo Schwarze
jsing@ worries that cycle prevention might increase risk because software that is not checking return values (and indeed, not checking is likely common in practice) might silently behave incorrectly with cycle prevention whereas without, it will likely either crash right away through infinite recursion or at least hang in an infinite loop when trying to use the cyclic chain, in both cases making it likely that the bug will be found and fixed. Besides, tb@ points out that BIO_set_next(3) ought to behave as similarly as possible to BIO_push(3), but adding cycle prevention to BIO_set_next(3) would be even less convincing because that function does not provide a return value, encouraging users to expect that it will always succeed. While a safe idiom for checking the success of BIO_set_next(3) could easily be designed, let's be realistic: application software would be highly unlikely to pick up such an idiom.
2022-12-16Downgrade riscv64-specific LTO error to a warningJeremie Courreges-Anglas
Error happens when mixing some PIC and non-PIC code in an LTO build/link ld: error: linking module flags 'SmallDataLimit': IDs have conflicting values in '<REDACTED>.o' and 'ld-temp.o' and affects a few ports now. Issue reported upstream where the proposed fix uses llvm::Module::Min, which we don't have and would require a backport. For now, work around this issue by downgrading to a warning, which should have the intended effect in most cases (use the value of the first module, which is smaller than the defaults value used by ld-temp.o). ok kettenis@
2022-12-16Do not escape tabs in output (iTerm2 needs them). GitHub issue 3414.Nicholas Marriott
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2022-12-16Make U+FE0F VARIATION SELECTOR-16 change the width from 1 to 2. GitHubNicholas Marriott
issue 3409.
2022-12-16Add send-keys -K to handle keys directly as if typed (so look up in keyNicholas Marriott
table). GitHub issue 3361.
2022-12-16Mention that scp uses the SFTP protocol and remove reference toDamien Miller
legacy flag. Spotted by, feedback and ok jmc@
2022-12-16Clear signal mask early in main(); sshd may have been started withDamien Miller
one or more signals masked (sigprocmask(2) is not cleared on fork/exec) and this could interfere with various things, e.g. the login grace timer. Execution environments that fail to clear the signal mask before running sshd are clearly broken, but apparently they do exist. Reported by Sreedhar Balasubramanian; ok dtucker@