| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
---
Relax parsing of TLS key share extensions on the server.
The RFC does not require X25519 and it also allows clients to send an empty
key share when the want the server to select a group. The current behaviour
results in handshake failures where the client supports TLS 1.3 and sends a
TLS key share extension that does not contain X25519.
---
(this fixes server side in some cases with TLS 1.3 clients with what
would normally be unusual config - however triggered by recent Firefox
packages on Fedora, https://bugzilla.redhat.com/show_bug.cgi?id=1713777)
|
|
|
|
|
|
|
|
|
|
|
|
| |
it is an encrypted extension. Include it in the server hello for now.
This will have to be revisited once TLSv1.3 gets there. Fixes SRTP
negotiation.
Problem found by two rust-openssl regress failures reported by mikeb.
with & ok beck
OpenBSD 6.5 errata 002
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
There are cases where the old_priv_decode() function can fail but consume
bytes. This will result in the pp pointer being advanced, which causes
d2i_PKCS8_PRIV_KEY_INFO() to be called with an advanced pointer and
incorrect length.
Fixes oss-fuzz #13803 and #14142.
ok deraadt@ tb@
|
|
|
|
|
|
|
| |
SSL_CTX_add_extra_chain_cert(3).
From Dr. Stephen Henson <steve at openssl dot org>
via OpenSSL commit a4339ea3 Jan 3 22:38:03 2014 +0000
which is still under a free license.
|
|
|
|
|
|
|
| |
From Kurt Roeckx <kurt at roeckx dot be>
via OpenSSL commit 57fd5170 May 13 11:24:11 2018 +0200
which is still under a free license.
While here, polish awkward wording and reduce duplication.
|
|
|
|
| |
From Michael Scovetta, PR #108
|
|
|
|
|
|
|
|
|
|
|
| |
In this code, just because something is cast to a type doesn't mean it is
necessarily that type - in this case we cannot check the length of the
ASN1_STRING here, since it might be another data type and later handled
as an int (for example, in the V_ASN1_BOOLEAN case).
We will revisit this post release.
ok tb@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
the spec. To avoid the obvious loop in the RFC's state machine, we added
a CLIENT_HELLO_RETRY state which is a second ClientHello with special
rules. There is, however, no state to react to this second client hello.
This adds a matching SERVER_HELLO_RETRY state to the handshakes table.
This means in particular that the WITH_HRR state cannot be set in
tls13_server_hello_recv(), so remove this now dead check.
ok jsing
|
|
|
|
|
|
|
|
|
| |
under a free license, omitting functions we don't have and tweaked by me;
the functions were provided by jsing@ in ssl.h rev. 1.166.
While here, also document SSL_CTX_get_extra_chain_certs(3) because
it is closely related to companion functions are already documented
and the API is kind of incomplete without it.
|
|
|
|
|
|
| |
record_type member of the tls13_handshake_action struct.
ok jsing
|
| |
|
|
|
|
|
|
|
| |
If the Server Hello received indicates that the server did not negotiate
TLS 1.3, fallback to the original TLS client implementation.
ok bcook@, tb@
|
|
|
|
|
|
|
|
|
|
| |
The original implementation allows for libcrypto to be compiled without a
given algorithm and libssl then detects that ciphers or digests are
unavailable so that it can disable the associated cipher suites.
This is unnecessary since we do not compile out algorithms.
ok beck@, tb@ (a while back)
|
| |
|
|
|
|
| |
This avoids ever having a non-zero len with a NULL pointer.
|
|
|
|
|
|
|
| |
While PTHREAD_MUTEX_INITIALIZER can be used on OpenBSD, some other
platforms do not like it.
Noted by bcook@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These allow for chains to be managed on a per-certificate basis rather than
as a single "extra certificates" list. Note that "chain" in this context
does not actually include the leaf certificate however, unlike
SSL_CTX_use_certificate_chain_{file,mem}().
Thanks to sthen@ for running this through a bulk ports build.
ok beck@ tb@
|
| |
|
|
|
|
| |
ok millert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The plen variable can be NO_PAYLOAD_LENGTH == (size_t)-1, so doing
tls_aad[plen-4] is no good. Also check that the length of the AAD
set via the control interface is equal to 13 since the whole file
is written with that case in mind.
Note that we no longer use this code in LibreSSL/OpenBSD. We
eliminated the use of these control interfaces and stitched cipher
modes in libssl a while ago.
Problem found by Guido Vranken with his cryptofuzz - thanks!
input & ok beck, jsing
|
| |
|
| |
|
|
|
|
| |
Diff from Steven Roberts <sroberts at fenderq dot com> - thanks!
|
|
|
|
|
|
|
|
| |
This makes libtls more friendly for multithreaded use - otherwise we can
end up with incorrect refcounts and end up freeing when we should not be
(or not freeing when we should be).
ok beck@
|
|
|
|
| |
ok beck@, tb@
|
|
|
|
|
|
|
| |
BIO_print() returns -1 on failure, whereas the ASN print functions need to
return 0.
ok beck@, tb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an ASN.1 item provides its own ASN1_PRIMITIVE_FUNCS functions, require
all functions to be provided (currently excluding prim_clear). This avoids
situations such as having a custom allocator that returns a specific struct
but then is then printed using the default primative print functions, which
interpret the memory as a different struct.
Found by oss-fuzz, fixes issue #13799.
ok beck@, tb@
|
| |
|
|
|
|
|
| |
checking the curve.
ok jsing@ tb@
|
|
|
|
|
|
|
|
|
|
| |
- Be consistent with _len naming.
- Use size_t where possible/appropriate.
- Group the CBB code.
- Use EVP_MAX_MD_SIZE consistently, instead of "magic" values.
- Switch GOST to EVP_DigestSign*, making it similar to sigalgs.
ok tb@ a while back.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Reported by oss-fuzz, really fixes issue #13805.
ok beck@ tb@
|
|
|
|
| |
ok jsing
|
| |
|
|
|
|
| |
From phrocker via github.
|
| |
|
|
|
|
|
|
| |
These are no longer used now that we defer signature algorithm selection.
ok beck@
|
|
|
|
| |
ok beck@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the signature algorithm was selected when the TLS extension was
parsed (or the client received a certificate request), however the actual
certificate to be used is not known at this stage. This leads to various
problems, including the selection of a signature algorithm that cannot be
used with the certificate key size (as found by jeremy@ via ruby regress).
Instead, store the signature algorithms list and only select a signature
algorithm when we're ready to do signature generation.
Joint work with beck@.
|
|
|
|
|
|
|
|
|
|
| |
This means that any additional CA certificates end up on the per
certificate chain, rather than the single/shared extra_certs.
Also simplify this code and in particular, avoid setting the return value
to indicate success until we've actually succeeded.
ok beck@ tb@
|
|
|
|
| |
ok beck@ tb@
|