1. 06 10月, 2017 1 次提交
  2. 04 10月, 2017 1 次提交
    • T
      Session resume broken switching contexts · a84e5c9a
      Todd Short 提交于
      When an SSL's context is swtiched from a ticket-enabled context to
      a ticket-disabled context in the servername callback, no session-id
      is generated, so the session can't be resumed.
      
      If a servername callback changes the SSL_OP_NO_TICKET option, check
      to see if it's changed to disable, and whether a session ticket is
      expected (i.e. the client indicated ticket support and the SSL had
      tickets enabled at the time), and whether we already have a previous
      session (i.e. s->hit is set).
      
      In this case, clear the ticket-expected flag, remove any ticket data
      and generate a session-id in the session.
      
      If the SSL hit (resumed) and switched to a ticket-disabled context,
      assume that the resumption was via session-id, and don't bother to
      update the session.
      
      Before this fix, the updated unit-tests in 06-sni-ticket.conf would
      fail test #4 (server1 = SNI, server2 = no SNI).
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      (Merged from https://github.com/openssl/openssl/pull/1529)
      a84e5c9a
  3. 26 9月, 2017 1 次提交
  4. 23 9月, 2017 1 次提交
  5. 07 9月, 2017 1 次提交
    • B
      Restore historical behavior for absent ServerHello extensions · 1c259bb5
      Benjamin Kaduk 提交于
      In OpenSSL 1.1.0, when there were no extensions added to the ServerHello,
      we did not write the extension data length bytes to the end of the
      ServerHello; this is needed for compatibility with old client implementations
      that do not support TLS extensions (such as the default configuration of
      OpenSSL 0.9.8).  When ServerHello extension construction was converted
      to the new extensions framework in commit
      7da160b0, this behavior was inadvertently
      limited to cases when SSLv3 was negotiated (and similarly for ClientHellos),
      presumably since extensions are not defined at all for SSLv3.  However,
      extensions for TLS prior to TLS 1.3 have been defined in separate
      RFCs (6066, 4366, and 3546) from the TLS protocol specifications, and as such
      should be considered an optional protocol feature in those cases.
      
      Accordingly, be conservative in what we send, and skip the extensions block
      when there are no extensions to be sent, regardless of the TLS/SSL version.
      (TLS 1.3 requires extensions and can safely be treated differently.)
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      (Merged from https://github.com/openssl/openssl/pull/4296)
      1c259bb5
  6. 31 8月, 2017 3 次提交
  7. 30 8月, 2017 1 次提交
  8. 18 8月, 2017 1 次提交
  9. 15 8月, 2017 1 次提交
    • B
      Move ALPN handling from finalizer to delayed call · 5626f634
      Benjamin Kaduk 提交于
      Commit 02f0274e moved ALPN processing
      into an extension finalization function, as the only documented ordering
      requirement from previous commits was that ALPN processing occur after
      SNI processing, and SNI processing is performed before the extension
      finalization step.  However, it is useful for applications'
      alpn_select callbacks to run after ciphersuite selection as well -- at
      least one application protocol specification (HTTP/2) imposes restrictions
      on which ciphersuites are usable with that protocol.  Since it is generally
      more preferrable to have a successful TLS connection with a default application
      protocol than to fail the TLS connection and not be able to have the preferred
      application protocol, it is good to give the alpn_select callback information
      about the ciphersuite to be used, so that appropriate restrctions can be
      enforced in application code.
      
      Accordingly, split the ALPN handling out into a separate tls_handl_alpn()
      function akin to tls_handle_status_request(), called from
      tls_post_process_client_hello().  This is an alternative to resuscitating
      ssl_check_clienthello_tlsext_late(), something of an awkwward name itself.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/4070)
      5626f634
  10. 11 8月, 2017 1 次提交
  11. 01 8月, 2017 1 次提交
  12. 18 7月, 2017 1 次提交
  13. 07 7月, 2017 2 次提交
  14. 21 6月, 2017 2 次提交
  15. 12 6月, 2017 1 次提交
  16. 10 6月, 2017 1 次提交
  17. 19 5月, 2017 1 次提交
    • M
      Try to be more consistent about the alerts we send · fb34a0f4
      Matt Caswell 提交于
      We are quite inconsistent about which alerts get sent. Specifically, these
      alerts should be used (normally) in the following circumstances:
      
      SSL_AD_DECODE_ERROR = The peer sent a syntactically incorrect message
      SSL_AD_ILLEGAL_PARAMETER = The peer sent a message which was syntactically
      correct, but a parameter given is invalid for the context
      SSL_AD_HANDSHAKE_FAILURE = The peer's messages were syntactically and
      semantically correct, but the parameters provided were unacceptable to us
      (e.g. because we do not support the requested parameters)
      SSL_AD_INTERNAL_ERROR = We messed up (e.g. malloc failure)
      
      The standards themselves aren't always consistent but I think the above
      represents the best interpretation.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3480)
      fb34a0f4
  18. 17 5月, 2017 3 次提交
  19. 11 5月, 2017 1 次提交
  20. 10 5月, 2017 1 次提交
  21. 08 5月, 2017 1 次提交
  22. 04 5月, 2017 1 次提交
  23. 26 4月, 2017 3 次提交
  24. 10 4月, 2017 1 次提交
    • B
      Allow an ALPN callback to pretend to not exist · 8313a787
      Benjamin Kaduk 提交于
      RFC 7301 mandates that the server SHALL respond with a fatal
      "no_application_protocol" alert when there is no overlap between
      the client's supplied list and the server's list of supported protocols.
      In commit 06217867 we changed from
      ignoring non-success returns from the supplied alpn_select_cb() to
      treating such non-success returns as indicative of non-overlap and
      sending the fatal alert.
      
      In effect, this is using the presence of an alpn_select_cb() as a proxy
      to attempt to determine whether the application has configured a list
      of supported protocols.  However, there may be cases in which an
      application's architecture leads it to supply an alpn_select_cb() but
      have that callback be configured to take no action on connections that
      do not have ALPN configured; returning SSL_TLSEXT_ERR_NOACK from
      the callback would be the natural way to do so.  Unfortunately, the
      aforementioned behavior change also treated SSL_TLSEXT_ERR_NOACK as
      indicative of no overlap and terminated the connection; this change
      supplies special handling for SSL_TLSEXT_ERR_NOACK returns from the
      callback.  In effect, it provides a way for a callback to obtain the
      behavior that would have occurred if no callback was registered at
      all, which was not possible prior to this change.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/2570)
      8313a787
  25. 07 4月, 2017 3 次提交
  26. 04 4月, 2017 2 次提交
  27. 29 3月, 2017 1 次提交
  28. 21 3月, 2017 1 次提交
    • M
      Fix resumption after HRR · 77815a02
      Matt Caswell 提交于
      Commit 6b1bb98f moved the processing of ClientHello extensions into the
      state machine post-processing stage. After processing s->init_num is reset
      to 0, so by post-processing we cannot rely on its value. Unfortunately we
      were using it to handle the PSK extension. This causes the handshake to
      fail.
      
      We were using init_num to figure out the length of ClientHello2 so we can
      remove it from the handshake_buffer. The handshake_buffer holds the
      transcript of all the messages sent so far. For PSK processing though we
      only want to add in a partial ClientHello2. This commit changes things so
      we just work out where ClientHello2 starts, working forward from the
      beginning of handshake_buffer.
      
      Fixes #2983
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/2996)
      77815a02
  29. 18 3月, 2017 1 次提交