summaryrefslogtreecommitdiff
path: root/lib/libssl
AgeCommit message (Collapse)Author
2014-09-22Refactor and simplify the ECC extension handling. The existing codeJoel Sing
effectively built two "static" data structures - instead of doing this, just use static data structures to start with. From OpenSSL (part of a larger commit). ok miod@
2014-09-22Also check the result from final_finish_mac() against finish_mac_length inJoel Sing
ssl3_send_finished(). While this previously checked against a zero return value (which could occur on failure), we may as well test against the expected length, since we already know what that is.
2014-09-22It is possible (although unlikely in practice) for peer_finish_md_len toJoel Sing
end up with a value of zero, primarily since ssl3_take_mac() fails to check the return value from the final_finish_mac() call. This would then mean that an SSL finished message with a zero-byte payload would successfully match against the calculated finish MAC. Avoid this by checking the length of peer_finish_md_len and the SSL finished message payload, against the known length already stored in the SSL3_ENC_METHOD finish_mac_length field (making use of a previously unused field). ok miod@ (a little while back)
2014-09-21Move the TLS padding extension under an SSL_OP_TLSEXT_PADDING option, whichJoel Sing
is off by default (instead of being enabled unconditionally). The TLS padding extension was added as a workaround for a bug in F5 SSL terminators, however appears to trigger bugs in IronPort SMTP appliances. Now the SSL client gets to choose which of these devices it wants to trigger bugs in... Ported from OpenSSL. Discussed with many. ok miod@
2014-09-19Add CHACHA20 as a cipher symmetric encryption alias.Joel Sing
From Ming <gzchenym at 126.com>
2014-09-19remove obfuscating parens. man operator is your friend.Ted Unangst
2014-09-07Remove SSL_kDHr, SSL_kDHd and SSL_aDH. No supported ciphersuites use them,Joel Sing
nor do we plan on supporting them. ok guenther@
2014-08-24Replace the remaining uses of ssl3_put_cipher_by_char() with s2n and aJoel Sing
ssl3_cipher_get_value() helper function, which returns the cipher suite value for the given cipher. ok miod@
2014-08-23Remove non-standard GOST cipher suites (which are not compiled inJoel Sing
currently). From Dmitry Eremin-Solenikov.
2014-08-23Replace the remaining ssl3_get_cipher_by_char() calls with n2s() andJoel Sing
ssl3_get_cipher_by_id(). ok bcook@
2014-08-11Check the return value of sk_SSL_CIPHER_new_null(), since it allocatesJoel Sing
memory and can return NULL. ok miod@
2014-08-11Unchecked memory allocation and potential leak upon error inMiod Vallat
ssl3_get_cert_verify(). ok guenther@ jsing@
2014-08-11Remove now-unused SSL2_STATE as well as ssl2-specific state machine values.Miod Vallat
ok guenther@ jsing@
2014-08-11Currently, ssl3_put_char_by_bytes(NULL, NULL) is just a long handed wayJoel Sing
of writing "2". Add a define for the SSL3_CIPHER_VALUE_SIZE (rather than using a less-readable hardcoded constant everywhere) and replace the ssl3_put_char_by_bytes(NULL, NULL) calls with it. ok bcook@ miod@
2014-08-11Provide a ssl3_get_cipher_by_id() function that allows ciphers to be lookedJoel Sing
up by their ID. For one, this avoids an ugly mess in ssl_sess.c, where the cipher value is manually written into a buffer, just so the cipher can be located using ssl3_get_cipher_by_char(). ok bcook@ miod@
2014-08-10Tweak cipher list comments and add missing cipher value comments.Joel Sing
2014-08-10Remove disabled (weakened export and non-ephemeral DH) cipher suites fromJoel Sing
the cipher list. This reduces code size, saves data segment space and prevents them from being turned back on at runtime by flipping a bit in memory. ok guenther@
2014-08-10Since we no longer need to support SSLv2-style cipher lists, startJoel Sing
unravelling the maze of function pointers and callbacks by directly calling ssl3_{get,put}_cipher_by_char() and removing the ssl_{get,put}_cipher_by_char macros. Prompted by similar changes in boringssl. ok guenther.
2014-08-08Fix CVE-2014-3507, avoid allocating and then leaking a fresh fragmentPhilip Guenther
structure when a zero-length fragment is received. Based on https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=d0a4b7d1a2948fce38515b8d862f43e7ba0ebf74 diff by miod@, ok guenther@ bcook@ deraadt@
2014-08-07Correct test reversed during merge of fix for CVE-2014-3509Philip Guenther
pointed out by Watson Ladd (watson (at) matasano.com) ok deraadt@
2014-08-07Fix CVE-2014-3506, DTLS handshake message size checks. FromPhilip Guenther
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=1250f12613b61758675848f6600ebd914ccd7636 with comment/whitespace style tweaks ok bcook@ miod@
2014-08-07Oops, revert changes commited by mistake. The previous commit was supposedMiod Vallat
to only apply to s23_srvr.c.
2014-08-07When you expect a function to return a particular value, don't put a commentMiod Vallat
saying that you expect it to return that value and compare it against zero because it is supposedly faster, for this leads to bugs (especially given the high rate of sloppy cut'n'paste within ssl3 and dtls1 routines in this library). Instead, compare for the exact value it ought to return upon success. ok deraadt@
2014-08-07Fix CVE-2014-3511; TLS downgrade, verbatim diffTheo de Raadt
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=280b1f1ad12131defcd986676a8fc9717aaa601b ok guenther miod
2014-08-07merge CVE-2014-3510; Fix DTLS anonymous EC(DH) denial of serviceTheo de Raadt
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=17160033765480453be0a41335fa6b833691c049 ok bcook
2014-08-06merge fix for CVE-2014-3509 -- basically a missing s->hit check; ok guentherTheo de Raadt
2014-08-06Prevent a possible use after free by mimicing the s3_srvr.c fixes contributed byMiod Vallat
Adam Langley close to three years ago, which were commited in https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e7928282d0148af5f28fa3437a625a2006af0214 ok jsing@
2014-07-28The RSA, DH, and ECDH temporary key callbacks expect the number of keybitsPhilip Guenther
for the key (expressed in RSA key bits, which makes *no sense* for ECDH) as their second argument, not zero. (jsing@ notes that the RSA callback is only invoked for 'export' ciphers, which have been removed from LibreSSL, and for the SSL_OP_EPHEMERAL_RSA option, which is makes the application non-compliant. More fuel for the tedu fire...) jasper@ noted the breakage and bisected it down to the diff that broke this ok jsing@ miod@
2014-07-17avoid sys/param.h; Jonas TermansenTheo de Raadt
2014-07-17Missing bounds check in ssl3_get_certificate_request(), was not spotted inMiod Vallat
1.78; reported by Ilja Van Sprundel.
2014-07-14Fix memory leak upon error in ssl_parse_clienthello_use_srtp_ext().Miod Vallat
From BoringSSL.
2014-07-14whitespaceTheo de Raadt
2014-07-13Stop leaking internal library pointers in error messages.Joel Sing
Requested by miod@
2014-07-13Explicitly initialise slen - this was not previously done due to a missingJoel Sing
M_ASN1_D2I_begin macro.
2014-07-13Convert error handling to SSLerr and ERR_asprintf_error_data.Joel Sing
2014-07-13Convert d2i_SSL_SESSION to ASN1 primitives, instead of the horrificJoel Sing
asn1_mac.h macros. This still needs a lot of improvement, but immediately becomes readable. ok miod@ (sight unseen!)
2014-07-13Remove license introduced with the PSK code, which has since been removed.Joel Sing
ok deraadt@
2014-07-13Another compression remnant.Joel Sing
2014-07-13Expand the tlsext_sigalg macros. The end result is about the same numberJoel Sing
of lines and much more readable. ok miod@
2014-07-13Rewrite i2d_SSL_SESSION to use the ASN1 primitives, rather than using theJoel Sing
horrific macros from asn1_mac.h. This is a classic example of using macros to obfuscate code, in an attempt to reduce the line count. The end result is so ridiculously convoluted that it is completely unreadable and it takes hours to deconstruct the macros and figure out what is actually going on behind the scenes. ok miod@
2014-07-13The bell tolls for BUF_strdup - Start the migration to usingBob Beck
intrinsics. This is the easy ones, a few left to check one at a time. ok miod@ deraadt@
2014-07-13KNF and some code cleaning.Joel Sing
2014-07-13Another large dose of KNF.Joel Sing
2014-07-12Apply a large dose of KNF.Joel Sing
2014-07-12The correct name for EDH is DHE, likewise EECDH should be ECDHE.Joel Sing
Based on changes to OpenSSL trunk. ok beck@ miod@
2014-07-12remove double brackets. fixes build with clang.Jonathan Gray
ok jsing@
2014-07-12Provide ssl_version_string() function, which uses one of those modern CJoel Sing
constructs (a switch statement) and returns the appropriate string defined by SSL_TXT_* for the given version, including support for DTLSv1 and DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print(). ok beck@
2014-07-12Remove extra parenthesis.Joel Sing
2014-07-12need_cert is now always true, so remove the variable and associatedJoel Sing
conditionals. ok miod@
2014-07-12if (x) FOO_free(x) -> FOO_free(x).Miod Vallat
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@