1. 16 5月, 2015 1 次提交
    • 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
  2. 14 5月, 2015 1 次提交
  3. 13 5月, 2015 2 次提交
    • M
      Remove Kerberos support from libssl · 55a9a16f
      Matt Caswell 提交于
      Remove RFC2712 Kerberos support from libssl. This code and the associated
      standard is no longer considered fit-for-purpose.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      55a9a16f
    • M
      Don't allow a CCS when expecting a CertificateVerify · a0bd6493
      Matt Caswell 提交于
      Currently we set change_cipher_spec_ok to 1 before calling
      ssl3_get_cert_verify(). This is because this message is optional and if it
      is not sent then the next thing we would expect to get is the CCS. However,
      although it is optional, we do actually know whether we should be receiving
      one in advance. If we have received a client cert then we should expect
      a CertificateVerify message. By the time we get to this point we will
      already have bombed out if we didn't get a Certificate when we should have
      done, so it is safe just to check whether |peer| is NULL or not. If it is
      we won't get a CertificateVerify, otherwise we will. Therefore we should
      change the logic so that we only attempt to get the CertificateVerify if
      we are expecting one, and not allow a CCS in this scenario.
      
      Whilst this is good practice for TLS it is even more important for DTLS.
      In DTLS messages can be lost. Therefore we may be in a situation where a
      CertificateVerify message does not arrive even though one was sent. In that
      case the next message the server will receive will be the CCS. This could
      also happen if messages get re-ordered in-flight. In DTLS if
      |change_cipher_spec_ok| is not set and a CCS is received it is ignored.
      However if |change_cipher_spec_ok| *is* set then a CCS arrival will
      immediately move the server into the next epoch. Any messages arriving for
      the previous epoch will be ignored. This means that, in this scenario, the
      handshake can never complete. The client will attempt to retransmit
      missing messages, but the server will ignore them because they are the wrong
      epoch. The server meanwhile will still be waiting for the CertificateVerify
      which is never going to arrive.
      
      RT#2958
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      a0bd6493
  4. 11 5月, 2015 1 次提交
  5. 06 5月, 2015 3 次提交
  6. 04 5月, 2015 1 次提交
  7. 02 5月, 2015 2 次提交
  8. 01 5月, 2015 2 次提交
  9. 18 4月, 2015 1 次提交
  10. 17 4月, 2015 1 次提交
  11. 14 4月, 2015 1 次提交
    • M
      Check for ClientHello message overruns · 5e9f0eeb
      Matt Caswell 提交于
      The ClientHello processing is insufficiently rigorous in its checks to make
      sure that we don't read past the end of the message. This does not have
      security implications due to the size of the underlying buffer - but still
      needs to be fixed.
      
      With thanks to Qinghao Tang for reporting this issue.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      5e9f0eeb
  12. 28 3月, 2015 1 次提交
    • R
      free NULL cleanup · c5ba2d99
      Rich Salz 提交于
      EVP_.*free; this gets:
              EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free
              EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it
              EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup
      Reviewed-by: NKurt Roeckx <kurt@openssl.org>
      c5ba2d99
  13. 26 3月, 2015 1 次提交
  14. 25 3月, 2015 2 次提交
    • M
      RAND_bytes updates · 266483d2
      Matt Caswell 提交于
      Ensure RAND_bytes return value is checked correctly, and that we no longer
      use RAND_pseudo_bytes.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      266483d2
    • M
      Add ticket length before buffering DTLS message · 4f9fab6b
      Matt Caswell 提交于
      In ssl3_send_new_session_ticket the message to be sent is constructed. We
      skip adding the length of the session ticket initially, then call
      ssl_set_handshake_header, and finally go back and add in the length of the
      ticket. Unfortunately, in DTLS, ssl_set_handshake_header also has the side
      effect of buffering the message for subsequent retransmission if required.
      By adding the ticket length after the call to ssl_set_handshake_header the
      message that is buffered is incomplete, causing an invalid message to be
      sent on retransmission.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      4f9fab6b
  15. 24 3月, 2015 1 次提交
  16. 23 3月, 2015 2 次提交
  17. 19 3月, 2015 1 次提交
  18. 16 3月, 2015 1 次提交
  19. 11 3月, 2015 1 次提交
  20. 27 2月, 2015 3 次提交
  21. 06 2月, 2015 1 次提交
  22. 03 2月, 2015 1 次提交
    • D
      Add extms support to master key generation. · 0cfb0e75
      Dr. Stephen Henson 提交于
      Update master secret calculation to support extended master secret.
      TLS 1.2 client authentication adds a complication because we need to
      cache the handshake messages. This is simpllified however because
      the point at which the handshake hashes are calculated for extended
      master secret is identical to that required for TLS 1.2 client
      authentication (immediately after client key exchange which is also
      immediately before certificate verify).
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      0cfb0e75
  23. 28 1月, 2015 1 次提交
    • R
      OPENSSL_NO_xxx cleanup: SHA · 474e469b
      Rich Salz 提交于
      Remove support for SHA0 and DSS0 (they were broken), and remove
      the ability to attempt to build without SHA (it didn't work).
      For simplicity, remove the option of not building various SHA algorithms;
      you could argue that SHA_224/256/384/512 should be kept, since they're
      like crypto algorithms, but I decided to go the other way.
      So these options are gone:
      	GENUINE_DSA         OPENSSL_NO_SHA0
      	OPENSSL_NO_SHA      OPENSSL_NO_SHA1
      	OPENSSL_NO_SHA224   OPENSSL_NO_SHA256
      	OPENSSL_NO_SHA384   OPENSSL_NO_SHA512
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      474e469b
  24. 22 1月, 2015 5 次提交
  25. 08 1月, 2015 1 次提交
    • D
      Unauthenticated DH client certificate fix. · 1421e0c5
      Dr. Stephen Henson 提交于
      Fix to prevent use of DH client certificates without sending
      certificate verify message.
      
      If we've used a client certificate to generate the premaster secret
      ssl3_get_client_key_exchange returns 2 and ssl3_get_cert_verify is
      never called.
      
      We can only skip the certificate verify message in
      ssl3_get_cert_verify if the client didn't send a certificate.
      
      Thanks to Karthikeyan Bhargavan for reporting this issue.
      CVE-2015-0205
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      1421e0c5
  26. 06 1月, 2015 2 次提交