1. 15 9月, 2015 1 次提交
    • D
      Fix PSK identity hint handling. · df6da24b
      Dr. Stephen Henson 提交于
      For server use a PSK identity hint value in the CERT structure which
      is inherited when SSL_new is called and which allows applications to
      set hints on a per-SSL basis. The previous version of
      SSL_use_psk_identity_hint tried (wrongly) to use the SSL_SESSION structure.
      
      PR#4039
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      df6da24b
  2. 07 9月, 2015 1 次提交
  3. 14 8月, 2015 2 次提交
  4. 12 8月, 2015 1 次提交
  5. 03 8月, 2015 4 次提交
    • M
      Move DTLS CCS processing into the state machine · c69f2adf
      Matt Caswell 提交于
      Continuing on from the previous commit this moves the processing of DTLS
      CCS messages out of the record layer and into the state machine.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      c69f2adf
    • M
      Move TLS CCS processing into the state machine · 657da85e
      Matt Caswell 提交于
      The handling of incoming CCS records is a little strange. Since CCS is not
      a handshake message it is handled differently to normal handshake messages.
      Unfortunately whilst technically it is not a handhshake message the reality
      is that it must be processed in accordance with the state of the handshake.
      Currently CCS records are processed entirely within the record layer. In
      order to ensure that it is handled in accordance with the handshake state
      a flag is used to indicate that it is an acceptable time to receive a CCS.
      
      Previously this flag did not exist (see CVE-2014-0224), but the flag should
      only really be considered a workaround for the problem that CCS is not
      visible to the state machine.
      
      Outgoing CCS messages are already handled within the state machine.
      
      This patch makes CCS visible to the TLS state machine. A separate commit
      will handle DTLS.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      657da85e
    • M
      PACKETise ClientHello processing · 9ceb2426
      Matt Caswell 提交于
      Uses the new PACKET code to process the incoming ClientHello including all
      extensions etc.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      9ceb2426
    • M
      Add initial packet parsing code · 7e729bb5
      Matt Caswell 提交于
      Provide more robust (inline) functions to replace n2s, n2l, etc. These
      functions do the same thing as the previous macros, but also keep track
      of the amount of data remaining and return an error if we try to read more
      data than we've got.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      7e729bb5
  6. 30 7月, 2015 2 次提交
  7. 27 7月, 2015 1 次提交
    • M
      Remove support for SSL3_FLAGS_DELAY_CLIENT_FINISHED · 57787ac8
      Matt Caswell 提交于
      This flag was not set anywhere within the codebase (only read). It could
      only be set by an app reaching directly into s->s3->flags and setting it
      directly. However that method became impossible when libssl was opaquified.
      
      Even in 1.0.2/1.0.1 if an app set the flag directly it is only relevant to
      ssl3_connect(), which calls SSL_clear() during initialisation that clears
      any flag settings. Therefore it could take effect if the app set the flag
      after the handshake has started but before it completed. It seems quite
      unlikely that any apps really do this (especially as it is completely
      undocumented).
      
      The purpose of the flag is suppress flushing of the write bio on the client
      side at the end of the handshake after the client has written the Finished
      message whilst resuming a session. This enables the client to send
      application data as part of the same flight as the Finished message.
      
      This flag also controls the setting of a second flag SSL3_FLAGS_POP_BUFFER.
      There is an interesting comment in the code about this second flag in the
      implementation of ssl3_write:
      
      	/* This is an experimental flag that sends the
      	 * last handshake message in the same packet as the first
      	 * use data - used to see if it helps the TCP protocol during
      	 * session-id reuse */
      
      It seems the experiment did not work because as far as I can tell nothing
      is using this code. The above comment has been in the code since SSLeay.
      
      This commit removes support for SSL3_FLAGS_DELAY_CLIENT_FINISHED, as well
      as the associated SSL3_FLAGS_POP_BUFFER.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      57787ac8
  8. 18 7月, 2015 1 次提交
  9. 29 6月, 2015 1 次提交
  10. 24 6月, 2015 1 次提交
    • D
      Tidy up ssl3_digest_cached_records logic. · 124037fd
      Dr. Stephen Henson 提交于
      Rewrite ssl3_digest_cached_records handling. Only digest cached records
      if digest array is NULL: this means it is safe to call
      ssl3_digest_cached_records multiple times (subsequent calls are no op).
      
      Remove flag TLS1_FLAGS_KEEP_HANDSHAKE instead only update handshake buffer
      if digest array is NULL.
      
      Add additional "keep" parameter to ssl3_digest_cached_records to indicate
      if the handshake buffer should be retained after digesting cached records
      (needed for TLS 1.2 client authentication).
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      124037fd
  11. 22 6月, 2015 4 次提交
  12. 02 6月, 2015 1 次提交
  13. 29 5月, 2015 1 次提交
  14. 23 5月, 2015 1 次提交
  15. 19 5月, 2015 4 次提交
  16. 16 5月, 2015 3 次提交
    • M
      Updates following review comments · d45ba43d
      Matt Caswell 提交于
      Miscellaneous updates following review comments on the version negotiation
      rewrite patches.
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      d45ba43d
    • M
      Version negotiation rewrite cleanup · a3680c8f
      Matt Caswell 提交于
      Following the version negotiation rewrite all of the previous code that was
      dedicated to version negotiation can now be deleted - all six source files
      of it!!
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      a3680c8f
    • M
      Server side version negotiation rewrite · 32ec4153
      Matt Caswell 提交于
      This commit changes the way that we do server side protocol version
      negotiation. Previously we had a whole set of code that had an "up front"
      state machine dedicated to the negotiating the protocol version. This adds
      significant complexity to the state machine. Historically the justification
      for doing this was the support of SSLv2 which works quite differently to
      SSLv3+. However, we have now removed support for SSLv2 so there is little
      reason to maintain this complexity.
      
      The one slight difficulty is that, although we no longer support SSLv2, we
      do still support an SSLv3+ ClientHello in an SSLv2 backward compatible
      ClientHello format. This is generally only used by legacy clients. This
      commit adds support within the SSLv3 code for these legacy format
      ClientHellos.
      
      Server side version negotiation now works in much the same was as DTLS,
      i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to
      that then when a ClientHello is received it will work out the most
      appropriate version to respond with. Also, SSLv23_method and
      SSLv23_server_method have been replaced with TLS_method and
      TLS_server_method respectively. The old SSLv23* names still exist as
      macros pointing at the new name, although they are deprecated.
      
      Subsequent commits will look at client side version negotiation, as well of
      removal of the old s23* code.
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      32ec4153
  17. 13 5月, 2015 1 次提交
  18. 12 5月, 2015 1 次提交
    • R
      Make COMP_CTX and COMP_METHOD opaque · 9a555706
      Rich Salz 提交于
      Since COMP_METHOD is now defined in comp_lcl.h, it is no
      longer possible to create new TLS compression methods without
      using the OpenSSL source.  Only ZLIB is supported by default.
      Also, since the types are opaque, #ifdef guards to use "char *"
      instead of the real type aren't necessary.
      
      The changes are actually minor.  Adding missing copyright to some
      files makes the diff misleadingly big.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      9a555706
  19. 01 5月, 2015 1 次提交
  20. 26 3月, 2015 8 次提交