1. 08 11月, 2015 2 次提交
  2. 30 10月, 2015 22 次提交
  3. 09 10月, 2015 1 次提交
  4. 06 10月, 2015 1 次提交
    • E
      ssl3_get_client_hello: rearrange logic · b3e2272c
      Emilia Kasper 提交于
      Move all packet parsing to the beginning of the method. This limits the
      SSLv2 compatibility soup to the parsing, and makes the rest of the
      processing uniform.
      
      This is also needed for simpler EMS support: EMS servers need to do an
      early scan for EMS to make resumption decisions. This'll be easier when
      the entire ClientHello is parsed in the beginning.
      
      As a side effect,
      1) PACKETize ssl_get_prev_session and tls1_process_ticket; and
      2) Delete dead code for SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      b3e2272c
  5. 01 10月, 2015 1 次提交
    • M
      Change the DEFAULT ciphersuites to exclude DES, RC4 and RC2 · c84f7f4a
      Matt Caswell 提交于
      This patch updates the "DEFAULT" cipherstring to be
      "ALL:!COMPLEMENTOFDEFAULT:!eNULL". COMPLEMENTOFDEFAULT is now defined
      internally by a flag on each ciphersuite indicating whether it should be
      excluded from DEFAULT or not. This gives us control at an individual
      ciphersuite level as to exactly what is in DEFAULT and what is not.
      
      Finally all DES, RC4 and RC2 ciphersuites are added to COMPLEMENTOFDEFAULT
      and hence removed from DEFAULT.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      c84f7f4a
  6. 23 9月, 2015 3 次提交
    • M
      Remove remaining old listen code · 912c89c5
      Matt Caswell 提交于
      The old implementation of DTLSv1_listen which has now been replaced still
      had a few vestiges scattered throughout the code. This commit removes them.
      Reviewed-by: NAndy Polyakov <appro@openssl.org>
      912c89c5
    • M
      DTLSv1_listen rewrite · e3d0dae7
      Matt Caswell 提交于
      The existing implementation of DTLSv1_listen() is fundamentally flawed. This
      function is used in DTLS solutions to listen for new incoming connections
      from DTLS clients. A client will send an initial ClientHello. The server
      will respond with a HelloVerifyRequest containing a unique cookie. The
      client the responds with a second ClientHello - which this time contains the
      cookie.
      
      Once the cookie has been verified then DTLSv1_listen() returns to user code,
      which is typically expected to continue the handshake with a call to (for
      example) SSL_accept().
      
      Whilst listening for incoming ClientHellos, the underlying BIO is usually in
      an unconnected state. Therefore ClientHellos can come in from *any* peer.
      The arrival of the first ClientHello without the cookie, and the second one
      with it, could be interspersed with other intervening messages from
      different clients.
      
      The whole purpose of this mechanism is as a defence against DoS attacks. The
      idea is to avoid allocating state on the server until the client has
      verified that it is capable of receiving messages at the address it claims
      to come from. However the existing DTLSv1_listen() implementation completely
      fails to do this. It attempts to super-impose itself on the standard state
      machine and reuses all of this code. However the standard state machine
      expects to operate in a stateful manner with a single client, and this can
      cause various problems.
      
      A second more minor issue is that the return codes from this function are
      quite confused, with no distinction made between fatal and non-fatal errors.
      Most user code treats all errors as non-fatal, and simply retries the call
      to DTLSv1_listen().
      
      This commit completely rewrites the implementation of DTLSv1_listen() and
      provides a stand alone implementation that does not rely on the existing
      state machine. It also provides more consistent return codes.
      Reviewed-by: NAndy Polyakov <appro@openssl.org>
      e3d0dae7
    • E
      Remove ssl_put_cipher_by_char · e9fa092e
      Emilia Kasper 提交于
      Since SSLv3, a CipherSuite is always 2 bytes. The only place where we
      need 3-byte ciphers is SSLv2-compatible ClientHello processing.
      
      So, remove the ssl_put_cipher_by_char indirection.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      e9fa092e
  7. 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
  8. 07 9月, 2015 1 次提交
  9. 14 8月, 2015 2 次提交
  10. 12 8月, 2015 1 次提交
  11. 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
  12. 30 7月, 2015 1 次提交
    • D
      Extended PSK server support. · 85269210
      Dr. Stephen Henson 提交于
      Add support for RSAPSK, DHEPSK and ECDHEPSK server side.
      
      Update various checks to ensure certificate and server key exchange messages
      are only sent when required.
      
      Update message handling. PSK server key exchange parsing now include an
      identity hint prefix for all PSK server key exchange messages. PSK
      client key exchange message expects PSK identity and requests key for
      all PSK key exchange ciphersuites.
      
      Update flags for RSA, DH and ECDH so they are also used in PSK.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      85269210