summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_err.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-03-26Fix error message in case of write failure.tobias1-3/+3
ok djm
2015-03-26Check for short writes in fdpass(). Clean up while at it.tobias1-4/+3
ok djm
2015-03-26Sync camel case of "ProxyUseFdpass" with ssh_config(5).tobias1-3/+3
ok djm
2015-03-23Make rcmdsh(3) not fail if it is passed a non resolvable hostname.halex3-20/+16
Instead, silently ignore the fact and instead let the underlying ssh (or $RSH) command handle it. ok millert@
2015-03-22differentiate between a failed read, returning -1, and encounteringhalex1-2/+4
end-of-file, returning 0, in order not to print an unrelated strerror(errno) in the latter case ok millert@
2015-03-22sys/sysctl.h includes linux/sysctl.h, remove the extra unchecked includebcook2-4/+2
2015-03-22Since Windows needs BIO_sock_init() before you can call any networkingbcook2-12/+7
functions, and ocsp and s_time need networking enabled too, this just moves BIO_sock_init() up into main() as a catch-all for all of the commands. Of course, it is a no-op on any other platform. ok @guenther
2015-03-22unmute rcmd hostname lookup failurehalex1-3/+2
ok millert@ jung@
2015-03-21free the server certificate in tls_connect_fds(); fixes a memory leak withsthen1-1/+2
repeated use of tls_connect. ok jsing
2015-03-21Fix indentation that incorrectly implies a different control flow.doug6-16/+22
The actual control flow is intentional while the indenting is incorrect. This is intended to be a cosmetic change. Verified that each of these was part of a KNF commit that wasn't intending to change behavior. Also, double checked against the history of changes in OpenSSL and BoringSSL. Addresses Coverity CIDs: 78842, 78859, 78863. ok tedu@
2015-03-20Fix a memory leak in an error path.doug2-2/+6
From OpenSSL commit 5e5d53d341fd9a9b9cc0a58eb3690832ca7a511f. ok guenther@, logan@
2015-03-19zap #if 0'd code that's been dead since '96halex1-7/+0
ok todd@
2015-03-19Fix several crash causing defects from OpenSSL.tedu24-126/+324
These include: CVE-2015-0209 - Use After Free following d2i_ECPrivatekey error CVE-2015-0286 - Segmentation fault in ASN1_TYPE_cmp CVE-2015-0287 - ASN.1 structure reuse memory corruption CVE-2015-0289 - PKCS7 NULL pointer dereferences Several other issues did not apply or were already fixed. Refer to https://www.openssl.org/news/secadv_20150319.txt joint work with beck, doug, guenther, jsing, miod
2015-03-18In the neverending saga of enabling and disabling assembler code for shamiod2-10/+2
routines on hppa, the cause for sha512-parisc subtly misbehaving has been found: despite having fallback pa1.1 code when running on a 32-bit cpu, the shift constants used in the sigma computations in sha512 are >= 32 and are silently truncated to 5 bits by the assembler, so there is no chance of getting this code to work on a non-pa2.0 processor. However, the pa1.1 fallback code for sha256 is safe, as it never attempts to shift by more than 31, so reenable it again.
2015-03-15Avoid a NULL pointer deref when X509_get_pubkey() returns NULL.doug2-4/+8
A NULL pointer could be dereferenced when X509_REQ_set_pubkey() calls X509_PUBKEY_set() with pktmp. OpenSSL says it's the fix for CVE-2015-0288, but there aren't any public details yet to confirm. Either way, we should fix this. Based on OpenSSL commit 28a00bcd8e318da18031b2ac8778c64147cd54f9 and BoringSSL commit 9d102ddbc0f6ed835ed12272a3d8a627d6a8e728. "looks sane" beck@ ok miod@, bcook@
2015-03-15fix for regression test for strtol(). it failed (the wrong kind ofphessler1-2/+2
fail), on 64-bit systems. tested on 64-bit (amd64) and 32-bit (sparc). OK claudio@ deraadt@
2015-03-14remove incorrect statement. the standard *does* require calloc to checktedu1-7/+2
for overflow. stop talking about old broken systems, there's little use for such info.
2015-03-11delay EVP_MD_CTX_init so we don't forget to clean it up.tedu2-6/+8
spotted by miod. ok miod.
2015-03-08Reject DH keys sent by a server if they are considered too small; inspiredmiod3-40/+28
by a similar BoringSSL change, but raising the limit to 1024 bits. ok jsing@ markus@ guenther@ deraadt@
2015-03-05Do not use sha512-parisc for now, as it is subtly bugged - passes the shamiod2-2/+6
regress tests but causes tls ciphersuite using sha386 to fail; found the hard way by henning@. I can't see anything wrong in the generated assembly code yet, but building a libcrypto with no assembler code but sha512_block_data_order() is enough to trigger Henning's issue, so the bug lies there. No ABI change; ok deraadt@
2015-03-05subtraction is not comparison. the difference of two longs is not goodtedu1-1/+1
to place in an int. from Christian Neukirchen ok deraadt
2015-03-02Update comment to match code; Caspar Schutijserlibressl-v2.1.4millert1-2/+2
2015-03-02Fix a minor information leak that was introduced in t1_lib.c r1.71, wherebyjsing2-4/+4
an additional 28 bytes of .rodata (or .data) is provided to the network. In most cases this is a non-issue since the memory content is already public. Issue found and reported by Felix Groebert of the Google Security Team. ok bcook@ beck@
2015-03-02use correct formatter (int, because of type promotion after operations)bcook1-2/+2
ok jsing@
2015-02-28Reduce usage of predefined strings in manpages.bentley1-7/+7
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-26Prefix function parameter names with underscores in tls.h, since this makesjsing1-42/+44
them guaranteed to not conflict per POSIX. ok espie@ guenther@
2015-02-25No need to use O_DIRECTORY when opening ".", O_RDONLY will suffice.millert1-1/+1
OK guenther@
2015-02-25Fix CVE-2014-3570: properly calculate the square of a BIGNUM value.bcook7-1331/+672
See https://www.openssl.org/news/secadv_20150108.txt for a more detailed discussion. Original OpenSSL patch here: https://github.com/openssl/openssl/commit/a7a44ba55cb4f884c6bc9ceac90072dea38e66d0 The regression test is modified a little for KNF. ok miod@
2015-02-25Trivial fix for test progress output.bcook1-4/+7
Remove unneeded dangling else, compound statements on a single line.
2015-02-25Avoid NULL pointer deref in hashinfo_free() when calling from error paths.doug1-2/+3
Also, nuke debugging printfs per jsing and bcook. ok bcook@, jsing@
2015-02-25Fix CVE-2015-0205: Do not accept client authentication with Diffie-Hellmanbcook2-4/+4
certificates without requiring a CertificateVerify message. From OpenSSL commit: https://github.com/openssl/openssl/commit/1421e0c584ae9120ca1b88098f13d6d2e90b83a3 Thanks to Karthikeyan Bhargavan for reporting this. ok miod@
2015-02-24we don't let strtonum errors bleed through now.tedu1-4/+2
2015-02-24Set errno to EINVAL, instead of letting ERANGE escape out.tedu1-2/+4
Printing strerror() in that case will say result too large, even if rounds is actually too small. invalid is less specific, but less incorrect. ok millert
2015-02-23fourth batch of perlpod(1) to mdoc(7) conversionschwarze37-1276/+2521
2015-02-22While slick, this isn't accessing multiple directories concurrently, soguenther1-29/+35
using *at functions is equivalent to chdir()ing, which eases portability. Tested with mixes of absolute and relative paths. Eliminate a FILE leak too. prodded by jsing@
2015-02-22Bump libcrypto and libssl majors, due to various recent churn.jsing4-4/+4
Discussed with/requested by deraadt@ at the conclusion of s2k15.
2015-02-22Reluctantly add server-side support for TLS_FALLBACK_SCSV.jsing15-25/+159
This allows for clients that willingly choose to perform a downgrade and attempt to establish a second connection at a lower protocol after the previous attempt unexpectedly failed, to be notified and have the second connection aborted, if the server does in fact support a higher protocol. TLS has perfectly good version negotiation and client-side fallback is dangerous. Despite this, in order to maintain maximum compatability with broken web servers, most mainstream browsers implement this. Furthermore, TLS_FALLBACK_SCSV only works if both the client and server support it and there is effectively no way to tell if this is the case, unless you control both ends. Unfortunately, various auditors and vulnerability scanners (including certain online assessment websites) consider the presence of a not yet standardised feature to be important for security, even if the clients do not perform client-side downgrade or the server only supports current TLS protocols. Diff is loosely based on OpenSSL with some inspiration from BoringSSL. Discussed with beck@ and miod@. ok bcook@
2015-02-22There is not much point constructing an SSL_CIPHER, then callingjsing2-14/+6
ssl3_cipher_get_value() to get the cipher suite value that we just put in the struct - use the cipher suite value directly.
2015-02-22Remove IMPLEMENT_STACK_OF noops.jsing4-8/+4
2015-02-22Update for recent verify related naming changes.jsing2-28/+28
2015-02-22Bump libtls major due to symbol removal.jsing1-3/+2
2015-02-22Rename tls_config_insecure_noverifyhost() tojsing4-21/+20
tls_config_insecure_noverifyname(), so that it is more accurate and keeps inline with the distinction between DNS hostname and server name. Requested by tedu@ during s2k15.
2015-02-22Check return values when setting dheparams and ecdhecurve for the defaultjsing1-11/+14
configuration.
2015-02-22In the interests of being secure by default, make the default TLS ciphersjsing2-2/+17
be those that are TLSv1.2 with AEAD and PFS. Provide a "compat" mode that allows the previous default ciphers to be selected. Discussed with tedu@ during s2k15.
2015-02-21explain how tls_accept_socket works.tedu1-2/+9
2015-02-21tls_config_set_protocols is really void. Greg Martin.tedu1-3/+3
2015-02-21fill out docs a bit more, notably the read/write again behaviors.tedu1-3/+27
ok jsing
2015-02-19If BN_rand() or BN_pseudo_rand() are called with a NULL rnd argument,jsing2-6/+16
BN_bin2bn() will helpfully allocate a BN which is then leaked. Avoid this by explicitly checking for NULL at the start of the bnrand() function. Fixes Coverity ID 78831. ok miod@
2015-02-19BN_free() has its own NULL check.jsing1-14/+7
2015-02-19KNF.jsing1-766/+834