summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-04-21Prevent infinite for loop since i went from ssize_t to size_t. Patch fromDarren Tucker
eagleoflqj via OpenSSH github PR#178, ok djm@, feedback & ok millert@
2020-04-19Provide TLSv1.3 cipher suite aliases to match the names used in RFC 8446.Joel Sing
ok beck@ inoguchi@ tb@
2020-04-19spelling fix;Jason McIntyre
2020-04-19Mention SIO_DEVANY instead of nonexistent SIOCTL_DEVANY constantIngo Feinerer
OK ratchov@
2020-04-18When opening a completely empty file with gzopen(3), treat it as anIngo Schwarze
uncompressed file, such that the first gzread(3) results in Z_STREAM_END rather than in the misleading Z_BUF_ERROR. I checked that none of the many copies of libz in our tree suffer from the same bug, after deraadt@ asked. Bugfix patch from Olivier Taibi <oli at olitb dot net> on bugs@. OK millert@.
2020-04-18Fix wrapping/indentation.Joel Sing
2020-04-18Expose the peer ephemeral public key used for TLSv1.3 key exchange.Joel Sing
SSL_get_server_tmp_key() provides the peer ephemeral public key used for key exchange. In the case of TLSv1.3 this is essentially the peer public key from the key share used for TLSv1.3 key exchange, hence make it availaable via SSL_get_server_tmp_key(). ok inoguchi@ tb@
2020-04-18Tweak previous active cipher suite code.Joel Sing
Use a boolean value rather than using a counter, as suggested by tb@ during the previous review. ok tb@
2020-04-18Allow more key share groups for TLSv1.3.Joel Sing
The key share code previously only allowed for key shares to be generated using one of the groups in our default list (X25519, secp256r1, secp384r1). Relax this and allow key shares using any of the groups in our NID list. ok inoguchi@ tb@
2020-04-17Only include TLSv1.3 cipher suites if there are active cipher suites.Joel Sing
Revise the previous so that we only include TLSv1.3 cipher suites if the cipher rule string resulted in at least one active cipher suite. This more closely matches OpenSSL behaviour. Noted and fix tested by schwarze@ ok beck@ tb@
2020-04-17Generate client key share using our preferred group.Joel Sing
Generate a client key share using our preferred group, rather than always using X25519. This means that the key share group can be controlled via SSL{_CTX,}_set1_groups() and SSL{_CTX,}_set1_groups_list(). ok beck@
2020-04-16Remove AUTHORS section. This follows what is done in strstr.3Claudio Jeker
2020-04-16Replace the simple memmem() implementation with a version that is O(n)Claudio Jeker
based on code from musl and now similar to our strstr(). OK tb@ millert@
2020-04-16Resync our strstr.c with the musl version. Removes some debug code andClaudio Jeker
optimizes one statement in two-way string compare. OK tb@ millert@
2020-04-14Update in several respects:Ingo Schwarze
* mention TLSv1.3 * remove DSS, DES(56), RC4(64), and IDEA(128), which are no longer supported * remove ChaCha20-Poly1305-Old and STREEBOG512 which don't exist in LibreSSL * correct the instruction for printing the complete list OK jsing@
2020-04-14add the missing sentence "LibreSSL no longer provides any suchIngo Schwarze
cipher suites" to the DES entry and use the same wording for DSS; OK jsing@
2020-04-14Delete the three sentences listing the ciphers currently includedIngo Schwarze
in LOW, MEDIUM, and HIGH. That's going to change repeatedly and the extra maintenance effort for keeping it up to date is a waste because people can trivially run "openssl ciphers -v LOW" to look it up. Besides, updating it will usually be forgotten; the LOW entry was already wrong. Suggested by jsing@.
2020-04-11Document the TLSv1.3 control word, update the description of theIngo Schwarze
TLSv1 control word, and explain how TLSv1.3 cipher suites can be configured in LibreSSL and in OpenSSL. While here, also mention how users can inspect the DEFAULT list of cipher suites. Stimulus, feedback and OK from jsing@.
2020-04-10sync cert.pem with Mozilla's root ca list, ok beck@Stuart Henderson
2020-04-10Update ARG_MAX bytes countJeremie Courreges-Anglas
ok deraadt@
2020-04-10When printing the serialNumber, fall back to the colon separated hexTheo Buehler
bytes in case ASN1_INTEGER_get() failed. This happens more often since asn1/a_int.c -r1.34. Matches OpenSSL behavior. Issue in openssl x509 -text output reported by sthen ok jsing sthen
2020-04-09Include TLSv1.3 cipher suites unless cipher string references TLSv1.3.Joel Sing
OpenSSL has always taken the approach of enabling almost everything by default. As a result, if you wanted to run a secure TLS client/server you had to specify your own "secure" cipher string, rather than being able to trust the defaults as being sensible and secure. The problem is that with the introduction of TLSv1.3, most of these "secure" cipher strings result in the new TLSv1.3 cipher suites being excluded. The "work around" for this issue in OpenSSL was to add a new TLSv1.3 API (SSL_CTX_set_ciphersuites(), SSL_set_ciphersuites()) and have separate knobs for the pre-TLSv1.3 and TLSv1.3 cipher suites. This of course means that every application now needs to call two APIs, but it does mean that applications that only call SSL_CTX_set_cipher_list()/SSL_set_cipher_list() cannot remove TLSv1.3 cipher suites and prevent TLSv1.3 from working. We've taken a different approach and have allowed TLSv1.3 cipher suites to be manipulated via the existing SSL_set_cipher_list() API. However, in order to avoid problems with hardcoded cipher strings, change this behaviour so that we always include TLSv1.3 cipher suites unless the cipher string has a specific reference to the TLSv1.3 protocol or a TLSv1.3 cipher suite. This means that: $ openssl ciphers -v TLSv1.2:!TLSv1.3 still gives TLSv1.2 only cipher suites and: $ openssl ciphers -v AEAD-CHACHA20-POLY1305-SHA256 only lists a single TLSv1.3 cipher, however: $ openssl ciphers -v ECDHE-RSA-AES256-GCM-SHA384 now includes both TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 and all TLSv1.3 cipher suites (which also matches OpenSSL's openssl(1) behaviour). Issue encountered by kn@ with mumble. ok tb@
2020-04-09Tidy line wrapping and remove an extra blank line.Joel Sing
2020-04-09ssl_aes_is_accelerated() returns a boolean - treat it as such, rather thanJoel Sing
explicitly comparing against a value.
2020-04-08Ensure legacy session ID is persistent during client TLS session.Joel Sing
Generate an unpredictable 32-byte legacy session ID during client initialisation, rather than when the ClientHello message is being created. Otherwise in the case of a HelloRetryRequest the legacy session ID values will differ between the first and second ClientHello messages, which is not permitted by the RFC. Fixes an issue talking TLSv1.3 to smtp.mail.yahoo.com. ok beck@
2020-04-06Send a zero-length session identifier if TLSv1.3 is not enabled.Joel Sing
If the maximum version is less than TLSv1.3, send a zero-length session identifier (matching the behaviour of the legacy TLS stack), rather than a 32 byte random identifier. The 32 byte random identifier is only needed for "compatibility" mode in TLSv1.3. ok beck@
2020-04-06Update my email address.Paul Irofti
2020-04-04Make libcxxabi provide __register_frame, _Unwind_Backtrace and friendsJeremie Courreges-Anglas
on sparc64 Discrepancy spotted in http://build-failures.rhaalovely.net/sparc64/2020-04-03/devel/llvm,,-main.log Input from gkoehler@, ok kettenis@ deraadt@
2016-09-03Import libunwind 3.9.0Patrick Wildt
2020-04-04Implement __atomic_is_lock_free for powerpc. Needed because theMark Kettenis
architecture doesn't implement 64-bit atomic operations. This implementation is pessimistic and only flags naturally aligned operations up to and including 32-bit as lock free. tested by cwen@ ok gkoehler@
2020-04-04Fix powerpc libunwind for cpus without altivec.gkoehler
Defer saving the altivec registers until we need to access them (like how arm defers saving the VFP registers). This prevents a SIGILL on a G3 cpu when code throws a C++ exception. ok kettenis@
2020-04-03Clarify conditions in which pthread_mutex_destroy(3) returns EBUSY.Stefan Sperling
It happens not just if the mutex is locked by another thread, but also if any other threads refer to the mutex (e.g. by waiting for the lock). ok guenther
2020-04-02Makes libossaudio use sndio instead of the kernel mixer(4) interface.Alexandre Ratchov
Programs will see the device handled by sndiod (instead of the first one) and will always get access at least the sndiod master level control. If present, hardware master input and output volumes are exposed as well. feedback from landry and sthen, "do it" deraadt
2020-03-30"eventually" came and went back in 2004.Martijn van Duren
OK schwarze@
2020-03-30Void functions obviously do not return values; no need to elaborate.Ingo Schwarze
Patch from Martin Vahlensieck <academicsolutions dot ch>.
2020-03-29Void functions obviously do not return values; no need to elaborate.Ingo Schwarze
Patch from Martin Vahlensieck <academicsolutions dot ch>.
2020-03-28Be concise: do not say that void functions return no values, that's obvious.Ingo Schwarze
Useless text reported by Martin Vahlensieck (academicsolutions.ch) on tech@.
2020-03-24Fix ASN1 print functionsKinichiro Inoguchi
Check and print out boolean type properly. Based on OpenSSL commit ad72d9fdf7709ddb97a58d7d45d755e6e0504b96. Reduced unneeded parentheses from if condition. Check return value from i2s_ASN1_INTEGER. Based on OpenSSL commit 5e3553c2de9a365479324b8ba8b998f0cce3e527. Added if condition expression and return 0 if NULL is returned. ok tb@
2020-03-16Consistently spell 'unsigned' as 'unsigned int', as style(9) seemsTheo Buehler
to prefer that. No binary change except in d1_srtp.c where the generated assembly differs only in line numbers (due to a wrapped long line) and in s3_cbc.c where there is no change in the generated assembly. ok inoguchi jsing
2020-03-16The RFC is clear (section 5.3) that sequence number should never wrap.Theo Buehler
We currently throw an error on overflow, but still wrap. Check up front if we would need to wrap and only increment if that case is excluded. This simplifies the increment loop and makes the returns in this function less magic. ok jsing
2020-03-13Remove dtls1_enc().Joel Sing
Like much of the original DTLS code, dtls1_enc() is effectively a renamed copy of tls1_enc(). Since then tls1_enc() has been modified, however the non-AEAD code remains largely the same. As such, remove dtls1_enc() and instead call tls1_enc() from the DTLS code. The tls1_enc() AEAD code does not currently work correctly with DTLS, however this is a non-issue since we do not support AEAD cipher suites with DTLS currently. ok tb@
2020-03-13Correct TLSv1.3 sequence number increment and wrapping check.Joel Sing
Fix proposed by tb@
2020-03-13Ensure that CBB_add_space() always provides zeroed memory.Joel Sing
ok tb@
2020-03-13Anthony Steinhauser reports that 32-bit arm cpus have the same speculationTheo de Raadt
problems as 64-bit models. To resolve the syscall speculation, as a first step "nop; nop" was added after all occurances of the syscall ("swi 0") instruction. Then the kernel was changed to jump over the 2 extra instructions. In this final step, those pair of nops are converted into the speculation-blocking sequence ("dsb nsh; isb"). Don't try to build through these multiple steps, use a snapshot instead. Packages matching the new ABI will be out in a while... ok kettenis
2020-03-13typo in commentDamien Miller
spotted at https://fossies.org/linux/misc/openssh-8.2p1.tar.gz/codespell.html
2020-03-12Use calloc() rather than malloc() when allocating initial CBB buffer.Joel Sing
CBB uses recallocarray() to expand buffers, however was still using malloc() for the initial buffer, which could result in memory being leaked in incorrect use cases. While here also use calloc() to allocate internal structs. ok inoguchi@ tb@
2020-03-12Use calloc() rather than malloc() when allocating buffers.Joel Sing
This reduces the chance of accidently leaking stack memory. ok inoguchi@ tb@
2020-03-12Stop overloading the record type for padding length.Joel Sing
Currently the CBC related code stuffs the padding length in the upper bits of the type field... stop doing that and add a padding_length field to the record struct instead. ok inoguchi@ tb@
2020-03-12Use internal versions of SSL3_BUFFER, SSL3_RECORD and DTLS1_RECORD_DATA.Joel Sing
SSL3_BUFFER, SSL3_RECORD and DTLS1_RECORD_DATA are currently still in public headers, even though their usage is internal. This moves to using _INTERNAL suffixed versions that are in internal headers, which then allows us to change them without any potential public API fallout. ok inoguchi@ tb@
2020-03-11Anthony Steinhauser reports that 32-bit arm cpus have the same speculationTheo de Raadt
problems as 64-bit models. For the syscall instruction issue, add nop;nop after swi 0, in preparation for jumping over a speculation barrier here later.