summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-12-16Now that we have Camellia support in libcrypto, bring in the SHA256 flavour ofMiod Vallat
the Camellia ciphersuites for TLS 1.2 introduced in RFC 5932. From OpenSSL HEAD.
2014-12-15Add error handling for EVP_DigestInit_ex().Doug Hogan
A few EVP_DigestInit_ex() calls were left alone since reporting an error would change the public API. Changed internal ssl3_cbc_digest_record() to return a value due to the above change. It will also now set md_out_size=0 on failure. This is based on part of BoringSSL's commit to fix malloc crashes: https://boringssl.googlesource.com/boringssl/+/69a01608f33ab6fe2c3485d94aef1fe9eacf5364 ok miod@
2014-12-14unconditionally align SSL payloadsBrent Cook
Remove support for conditional payload alignment, since we would never want to turn it off. Also, consistently use size_t for calculating the alignment. ok miod@
2014-12-14Convert all of the straight forward client handshake handling code to useJoel Sing
the new handshake functions. ok miod@
2014-12-14Provide functions for starting, finishing and writing SSL handshakeJoel Sing
messages. This will allow for removal of repeated/duplicated code. Additionally, DTLS was written by wholesale copying of the SSL/TLS code, with some DTLS specifics being added to the duplicated code. Since these SSL handshake message functions know how to handle both SSL/TLS and DTLS, upon conversion the duplicate versions will become identical (or close to), at which point the DTLS versions can be removed and the SSL/TLS versions used for both protocols. Partially based on similar changes in OpenSSL. ok miod@
2014-12-14Remove trailing whitespace.Joel Sing
2014-12-14unifdef OPENSSL_NO_NEXTPROTONEG, which is one of the last standing #ifndefJoel Sing
mazes in libssl. NPN is being replaced by ALPN, however it is still going to be around for a while yet. ok miod@
2014-12-14unifdef NETSCAPE_HANG_BUG from the DTLS code. The code is not currentlyJoel Sing
enabled and I would hope that no one is using client certificates with DTLS and Netscape, assuming it even supported it... ok bcook@ miod@
2014-12-10ssl3_init_finished_mac() calls BIO_new() which can fail since it in turnJoel Sing
calls malloc(). Instead of silently continuing on failure, check the return value of BIO_new() and propagate failure back to the caller for appropriate handling. ok bcook@
2014-12-10Remove support for GOST R 34.10-94 signature authentication, along withJoel Sing
the two ciphersuites that use it. GOST94 public/private keys have been long obsoleted and libcrypto does not have support for them anyway. Discussed with Dmitry Eremin-Solenikov.
2014-12-10libssl major++Joel Sing
2014-12-10Add support for ALPN.Joel Sing
Based on OpenSSL and BoringSSL. ok bcook@
2014-12-10add stdint.h to ssl.h.Brent Cook
ok jsing@
2014-12-08Use platform-defined method of printing a pointer.Brent Cook
Casting a pointer to an unsigned long discards bits on an LLP64 system. ok deraadt@
2014-12-07Make GOST compile with a strict C compiler - in this case incrementing aJoel Sing
void pointer is undefined and initialising an array with {} is a syntax error. Based on a diff from kinichiro inoguchi.
2014-12-07Correctly output the result in STREEBOG512_Final() when running on a big-endianMiod Vallat
system. *blush*
2014-12-07Make sure to load absolute symbol address with `dla' instead of `la' whenMiod Vallat
generating code for 64-bit mips userland.
2014-12-07Revert to the use of C code for the basic BN routines (bn_add_words,Miod Vallat
bn_div_words, bn_mul_add_words, bn_mul_words, bn_sqr_words, bn_sub_words) on sgi, because the generated assembly code isn't R4000-safe.
2014-12-07Remove OPENSSL_FIPSCANISTER mentions.Miod Vallat
2014-12-07Remove get_optional_pkey_id() - it is a hack that existed due to GOSTJoel Sing
only sometimes being available... and when it was available it was via the crypto engine. GOST is now part of libcrypto proper. Instead of trying to do EVP PKEY lookups via string literals and the ASN1 interfaces, lookup the methods directly using the appropriate NID. ok bcook@
2014-12-06fix manual names that clash with other manualsIngo Schwarze
2014-12-06Avoid modifying input on failure in X509_(TRUST|PURPOSE)_add.Doug Hogan
If X509_TRUST_add() or X509_PURPOSE_add() fail, they will leave the object in an inconsistent state since the name is already freed. This commit avoids changing the original name unless the *_add() call will succeed. Based on BoringSSL's commit: ab2815eaff6219ef57aedca2f7b1b72333c27fd0 ok miod@
2014-12-06Remove now bogus comment that got missed in the GOST commit.Joel Sing
2014-12-06Fix some horrible style(9) violations...Joel Sing
2014-12-06Remove client handling of RSA in ServerKeyExchange messages, along withJoel Sing
the associated peer_rsa_tmp goop. This was only needed for export cipher handling and intentional RFC violations. The export cipher suites have already been removed and previous cleanup means that we will never send ServerKeyExchange messages from the server side for RSA.
2014-12-06Use appropriate internal types for EC curves and formats, rather thanJoel Sing
storing and processing in wire encoded form. Inspired by boringssl. ok miod@
2014-12-06Ensure that the client specified EC curve list length is a multiple of two.Joel Sing
The EC curve handling code assumes this to be the case and will read one byte off the end of the curve list during processing, in the case where it is not. ok miod@
2014-12-06Fix two cases where it is possible to read one or two bytes past the end ofJoel Sing
the buffer. The later size check would catch this, however reading first and checking later is less than ideal. ok miod@
2014-12-04add missing .Fn macros in the SYNOPSIS; found with mandoc.db(5)Ingo Schwarze
2014-12-03Move Windows OS-specific functions to make porting easier.Brent Cook
Several functions that need to be redefined for a Windows port are right in the middle of other code that is relatively portable. This patch isolates the functions that need Windows-specific implementations so they can be built conditionally in the portable tree. ok jsing@ deraadt@
2014-12-03We're not supporting 16-bit Windows, remove cast.Brent Cook
ok jsing@ deraadt@
2014-12-03handle the (impossible) situation of a size_t - 1 buffer fromTheo de Raadt
EC_POINT_point2oct so that later allocation does not overflow with miod
2014-12-03Spotted another opportunity to use reallocarray().Theo de Raadt
ok miod
2014-12-02Add brainpool curves to eccurves_default[], accidentally missing from 1.32;Miod Vallat
from OpenSSL HEAD via Thomas Jakobi.
2014-12-02add some openbsd tags, and a first pass at cleanup;Jason McIntyre
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