1. 08 3月, 2016 2 次提交
    • M
      Add an ability to set the SSL read buffer size · dad78fb1
      Matt Caswell 提交于
      This capability is required for read pipelining. We will only read in as
      many records as will fit in the read buffer (and the network can provide
      in one go). The bigger the buffer the more records we can process in
      parallel.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      dad78fb1
    • M
      Implement write pipeline support in libssl · d102d9df
      Matt Caswell 提交于
      Use the new pipeline cipher capability to encrypt multiple records being
      written out all in one go. Two new SSL/SSL_CTX parameters can be used to
      control how this works: max_pipelines and split_send_fragment.
      
      max_pipelines defines the maximum number of pipelines that can ever be used
      in one go for a single connection. It must always be less than or equal to
      SSL_MAX_PIPELINES (currently defined to be 32). By default only one
      pipeline will be used (i.e. normal non-parallel operation).
      
      split_send_fragment defines how data is split up into pipelines. The number
      of pipelines used will be determined by the amount of data provided to the
      SSL_write call divided by split_send_fragment. For example if
      split_send_fragment is set to 2000 and max_pipelines is 4 then:
      SSL_write called with 0-2000 bytes == 1 pipeline used
      SSL_write called with 2001-4000 bytes == 2 pipelines used
      SSL_write called with 4001-6000 bytes == 3 pipelines used
      SSL_write_called with 6001+ bytes == 4 pipelines used
      
      split_send_fragment must always be less than or equal to max_send_fragment.
      By default it is set to be equal to max_send_fragment. This will mean that
      the same number of records will always be created as would have been
      created in the non-parallel case, although the data will be apportioned
      differently. In the parallel case data will be spread equally between the
      pipelines.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      d102d9df
  2. 04 3月, 2016 1 次提交
  3. 03 3月, 2016 2 次提交
    • E
      Refactor ClientHello extension parsing · 06217867
      Emilia Kasper 提交于
      1) Simplify code with better PACKET methods.
      
      2) Make broken SNI parsing explicit. SNI was intended to be extensible
      to new name types but RFC 4366 defined the syntax inextensibly, and
      OpenSSL has never parsed SNI in a way that would allow adding a new name
      type. RFC 6066 fixed the definition but due to broken implementations
      being widespread, it appears impossible to ever extend SNI.
      
      3) Annotate resumption behaviour. OpenSSL doesn't currently handle all
      extensions correctly upon resumption. Annotate for further clean-up.
      
      4) Send an alert on ALPN protocol mismatch.
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      06217867
    • C
      Provide getters for default_passwd_cb and userdata · 0c452abc
      Christian Heimes 提交于
      This patch provides getters for default_passwd_cb and userdata for SSL
      and SSL_CTX. The getter functions are required to port Python's ssl module
      to OpenSSL 1.1.0.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      0c452abc
  4. 29 2月, 2016 2 次提交
    • M
      Refactor the async wait fd logic · ff75a257
      Matt Caswell 提交于
      Implementation experience has shown that the original plan for async wait
      fds was too simplistic. Originally the async logic created a pipe internally
      and user/engine code could then get access to it via API calls. It is more
      flexible if the engine is able to create its own fd and provide it to the
      async code.
      
      Another issue is that there can be a lot of churn in the fd value within
      the context of (say) a single SSL connection leading to continually adding
      and removing fds from (say) epoll. It is better if we can provide some
      stability of the fd value across a whole SSL connection. This is
      problematic because an engine has no concept of an SSL connection.
      
      This commit refactors things to introduce an ASYNC_WAIT_CTX which acts as a
      proxy for an SSL connection down at the engine layer.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      ff75a257
    • M
      Workaround for VisualStudio 2015 bug · b32166b4
      Matt Caswell 提交于
      VisualStudio 2015 has a bug where an internal compiler error was occurring.
      By reordering the DEFINE_STACK_OF declarations for SSL_CIPHER and SSL_COMP
      until after the ssl3.h include everything seems ok again.
      Reviewed-by: NViktor Dukhovni <viktor@openssl.org>
      b32166b4
  5. 25 2月, 2016 1 次提交
  6. 20 2月, 2016 1 次提交
    • E
      TLS: reject duplicate extensions · aa474d1f
      Emilia Kasper 提交于
      Adapted from BoringSSL. Added a test.
      
      The extension parsing code is already attempting to already handle this for
      some individual extensions, but it is doing so inconsistently. Duplicate
      efforts in individual extension parsing will be cleaned up in a follow-up.
      Reviewed-by: NStephen Henson <steve@openssl.org>
      aa474d1f
  7. 13 2月, 2016 1 次提交
  8. 12 2月, 2016 1 次提交
  9. 11 2月, 2016 3 次提交
  10. 10 2月, 2016 1 次提交
  11. 09 2月, 2016 3 次提交
  12. 08 2月, 2016 1 次提交
    • M
      Handle SSL_shutdown while in init more appropriately #2 · 64f9f406
      Matt Caswell 提交于
      Previous commit 7bb196a7 attempted to "fix" a problem with the way
      SSL_shutdown() behaved whilst in mid-handshake. The original behaviour had
      SSL_shutdown() return immediately having taken no action if called mid-
      handshake with a return value of 1 (meaning everything was shutdown
      successfully). In fact the shutdown has not been successful.
      
      Commit 7bb196a7 changed that to send a close_notify anyway and then
      return. This seems to be causing some problems for some applications so
      perhaps a better (much simpler) approach is revert to the previous
      behaviour (no attempt at a shutdown), but return -1 (meaning the shutdown
      was not successful).
      
      This also fixes a bug where SSL_shutdown always returns 0 when shutdown
      *very* early in the handshake (i.e. we are still using SSLv23_method).
      Reviewed-by: NViktor Dukhovni <viktor@openssl.org>
      64f9f406
  13. 07 2月, 2016 1 次提交
  14. 06 2月, 2016 1 次提交
  15. 01 2月, 2016 1 次提交
  16. 27 1月, 2016 1 次提交
    • R
      Remove /* foo.c */ comments · 34980760
      Rich Salz 提交于
      This was done by the following
              find . -name '*.[ch]' | /tmp/pl
      where /tmp/pl is the following three-line script:
              print unless $. == 1 && m@/\* .*\.[ch] \*/@;
              close ARGV if eof; # Close file to reset $.
      
      And then some hand-editing of other files.
      Reviewed-by: NViktor Dukhovni <viktor@openssl.org>
      34980760
  17. 26 1月, 2016 1 次提交
  18. 20 1月, 2016 2 次提交
  19. 15 1月, 2016 2 次提交
  20. 13 1月, 2016 1 次提交
  21. 11 1月, 2016 2 次提交
  22. 10 1月, 2016 1 次提交
  23. 08 1月, 2016 5 次提交
  24. 06 1月, 2016 1 次提交
  25. 02 1月, 2016 2 次提交
    • V
      Protocol version selection and negotiation rewrite · 4fa52141
      Viktor Dukhovni 提交于
      The protocol selection code is now consolidated in a few consecutive
      short functions in a single file and is table driven.  Protocol-specific
      constraints that influence negotiation are moved into the flags
      field of the method structure.  The same protocol version constraints
      are now applied in all code paths.  It is now much easier to add
      new protocol versions without reworking the protocol selection
      logic.
      
      In the presence of "holes" in the list of enabled client protocols
      we no longer select client protocols below the hole based on a
      subset of the constraints and then fail shortly after when it is
      found that these don't meet the remaining constraints (suiteb, FIPS,
      security level, ...).  Ideally, with the new min/max controls users
      will be less likely to create "holes" in the first place.
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      4fa52141
    • K
      7946ab33