summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-30Remove non-portable use of .Pf that doesn't work with groff;Ingo Schwarze
found because the groff_mdoc(7) macros warn about it.
2014-11-27Ensure that sess_cert is not NULL at the start ofJoel Sing
ssl3_send_client_key_exchange(), rather than checking it in the key exchange algorithm specific code. ok beck@ miod@
2014-11-27Avoid a double-free in an error path.Joel Sing
Reported by Felix Groebert of the Google Security Team. ok beck@ miod@
2014-11-27Avoid a NULL dereference in the DTLS client that can be triggered by aJoel Sing
crafted server response used in conjunction with an anonymous DH or anonymous ECDH ciphersuite. Fixes CVE-2014-3510, which is effectively a repeat of CVE-2014-3470 in copied code. Reported by Felix Groebert of the Google Security Team. ok beck@ miod@
2014-11-26remove superflous gettimeofday wrapper.Brent Cook
ok beck@ tedu@ miod@ guenther@ doug@ deraadt@
2014-11-26memset like a normal human.Brent Cook
ok beck@ tedu@ miod@
2014-11-26normalize set/getsockopt usage.Brent Cook
Remove the remaining random casts on optval. Fixups for this can be handled by the portability layer all in once place. Remove remaining fake socklen_t unions, though beck@ points out that this also removes support for socklen_t changing its length at runtime. RIP. ok tedu@ beck@ miod@ deraadt@
2014-11-26Linux has had IP_MTU since 2005, don't force it.Brent Cook
ok beck@ miod@ tedu@ deraadt@
2014-11-22mop up a barely started project... getting in the way of grepping the tree!Theo de Raadt
2014-11-22Fix incorrect escape.Anthony J. Bentley
2014-11-21MPE support, begone. ok teduTheo de Raadt
2014-11-19Nuke yet more obvious #include duplications.Kenneth R Westerback
ok deraadt@
2014-11-19include camellia.h using the public include pathBrent Cook
2014-11-19Fix a memory leak with pkey in client key exchangeDoug Hogan
Based on boringssl commit: 1df112448b41c3568477f3fcd3b8fc820ce80066 ok miod@ jsing@
2014-11-18Argh, another bug introduced in r1.3; Dmitry Eremin-SolenikovMiod Vallat
2014-11-18Update the GOST code in libssl, as contributed by Dmitry Eremin-Solenikov.Miod Vallat
This causes a libssl major version bump as this affects the layout of some internal-but-unfortunately-made-visible structs.
2014-11-18Enable the build of GOST routines in libcrypto. Riding upon the CammeliaMiod Vallat
libcrypto minor bump.
2014-11-18More missing error checks I forgot to commit last week, part of the largeMiod Vallat
cleanup diff.
2014-11-18Return success in param_copy_gost01() if there is no private key to copy;Miod Vallat
broken in r1.3. Spotted by Dmitry Eremin-Solenikov
2014-11-18further BUF_strdup conversion: these places should be safe to rely onTed Unangst
the function argument not being NULL
2014-11-17Add the Cammelia cipher to libcrypto.Miod Vallat
There used to be a strong reluctance to provide this cipher in LibreSSL in the past, because the licence terms under which Cammelia was released by NTT were free-but-not-in-the-corners, by restricting the right to modify the source code, as well retaining the right to enforce their patents against anyone in the future. However, as stated in http://www.ntt.co.jp/news/news06e/0604/060413a.html , NTT changed its mind and made this code truly free. We only wish there had been more visibility of this, for we could have had enabled Cammelia earlier (-: Licence change noticed by deraadt@. General agreement from the usual LibreSSL suspects. Crank libcrypto.so minor version due to the added symbols.
2014-11-17Make the ECDSA_SIG bowels public. This matches RSA_SIG and DSA_SIG, and weMiod Vallat
expect a good use for this knowledge in the tree in the near future. Contributed by Vincent Gross, thanks!
2014-11-16Sort and group includes.Joel Sing
2014-11-13Add many missing error checks (probably not exhaustive, but a good start):Miod Vallat
- make VKO_compute_key() no longer void so that it can return failure. - fix unchecked allocations in too many routines to mention /-: - fix unchecked BN operations in gost2001_do_sign(), gost2001_do_verify(), VKO_compute_key(). - fix the gost2001_do_sign() interface violation by having its sole caller free the BIGNUM it passes to that function by itself, instead of having the callee do this. Reviewed (except for the last item) by Dmitry Eremin-Solenikov.
2014-11-13Sacrifice this code to the KNF deities.Miod Vallat
2014-11-12Fix GOST TC26-B curve description.Miod Vallat
2014-11-11f{read,write} take a number of items and an item size as arguments, andMiod Vallat
return the number of items read of written. When you intend to return the number of bytes actually processed, it is wise to pass 1 as the item size and the size as the number of items. But in *some* places, the OpenSSL does the opposite, and has extra logic to change a successful return of 1 (item processed) into the real size. And, guess why it does that? Because of old VMS, for they (used to) have a substandard stdio implementation. Note that this change causes the return values of BIO_dump_fp() and BIO_dump_indent_fp() to no longer be useless (actual number of callback calls), but actual bytes output. Given the irrelevance of the return value before, it is unlikely that anything depends upon it (and if something does, it probably has other problems in need for a fix...) ok tedu@ beck@ jsing@
2014-11-11correct the failure case for getentropy on win32Brent Cook
CryptAcquireContext and CryptGenRandom returns zero (FALSE) if fails. From: Dongsheng Song <dongsheng.song@gmail.com>
2014-11-11Don't free garbage in ec_wNAF_mul() if wNAF could be allocated butPhilip Guenther
other allocations in the same block couldn't. problem pointed out by David Ramos on the openssl-dev list ok miod@ doug@
2014-11-09KNF (when not conflicting with other cleanup changes in progress)Miod Vallat
2014-11-09Remove DEBUG_SIGN code. Make sure gost_key_unwrap_crypto_pro() returns failureMiod Vallat
instead of a printf and a success return, when the operation fails.
2014-11-09Rename internal yet public key_{un,}wrap_crypto_pro symbols by prepending aMiod Vallat
`gost_' prefix to them, so that we do not pollute the global namespace too much.
2014-11-09Replace RAND_bytes() usage with arc4random_buf().Miod Vallat
2014-11-09GOST crypto algorithms (well, most of them), ported from the removed GOSTMiod Vallat
engine to regular EVP citizens, contributed by Dmitry Eremin-Solenikov; libcrypto bits only for now. This is a verbatim import of Dmitry's work, and does not compile in this state; the forthcoming commits will address these issues. None of the GOST code is enabled in libcrypto yet, for it still gets compiled with OPENSSL_NO_GOST defined. However, the public header gost.h will be installed.
2014-11-09Introduce EVP_MD_CTX_ctrl(), to allow for fine control of a given digest.Miod Vallat
This functionality was already available (and optional), and used in the bowels of the ASN.1 code. This exposes it as a public interface, which will be used by the upcoming GOST code. Crank libcrypto minor version. From Dmitry Eremin-Solenikov.
2014-11-09Allow digest routines to provide their own HASH_FINAL routine; will beMiod Vallat
necessary for upcoming GOST code. From Dmitry Eremin-Solenikov
2014-11-08Clean up more SSLv2 remnants.Joel Sing
2014-11-03only call SRTP (whatever that is) functions when the connection type isTed Unangst
DTLS (whatever that is) instead of for TLS too. ok jsing.
2014-11-03minor cleanup of zlib code. DSO is gone. ok jsing.Ted Unangst
2014-11-03Add hooks to override native arc4random_buf on FreeBSD.Brent Cook
The FreeBSD-native arc4random_buf implementation falls back to weak sources of entropy if the sysctl fails. Remove these dangerous fallbacks by overriding locally. Unfortunately, pthread_atfork() is also broken on FreeBSD (at least 9 and 10) if a program does not link to -lthr. Callbacks registered with pthread_atfork() simply fail silently. So, it is not always possible to detect a PID wraparound. I wish we could do better. This improves arc4random_buf's safety compared to the native FreeBSD implementation. Tested on FreeBSD 9 and 10.
2014-11-02Remove remnants from RC2 and SEED - there are no longer any cipher suitesJoel Sing
that use these algorithms (and SEED was removed from libcrypto some time ago). ok doug@
2014-10-31Remove an outdated comment re EDH vs DHE - DHE is now used consistently andJoel Sing
there are backwards compatible names/aliases for EDH.
2014-10-31Update comments for TLS ExtensionType values - many of the referencedJoel Sing
drafts are now RFCs. Also add the TLS extension type for ALPN and be consistent with RFC reference formatting.
2014-10-31Crank libssl major due to recent additions, removals and changes.Joel Sing
2014-10-31Remove now unused remnants from public structs.Joel Sing
2014-10-31Add support for automatic DH ephemeral keys.Joel Sing
This allows an SSL server to enable DHE ciphers with a single setting, which results in an DH key being generated based on the server key length. Partly based on OpenSSL.
2014-10-31Remove support for ephemeral/temporary RSA private keys.Joel Sing
The only use for these is via SSL_OP_EPHEMERAL_RSA (which is effectively a standards violation) and for RSA sign-only, should only be possible if you are using an export cipher and have an RSA private key that is more than 512 bits in size (however we no longer support export ciphers). ok bcook@ miod@
2014-10-28deregister; no binary changeJonathan Gray
ok jsing@ miod@
2014-10-28Check the result of sk_*_push() operations for failure.Miod Vallat
ok doug@ jsing@
2014-10-22In PKCS12_setup_mac(), do not assign p12->mac->salt->length until the allocationMiod Vallat
of p12->mac->salt->data has actually succeeded. In one of my trees for a long time already...