1. 23 Sep, 2015 4 commits
    • Matt Caswell's avatar
      Add support for DTLSv1_listen in s_server · fd4e98ec
      Matt Caswell authored
      
      
      DTLSv1_listen is a commonly used function within DTLS solutions for
      listening for new incoming connections. This commit adds support to s_server
      for using it.
      
      Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
      fd4e98ec
    • Matt Caswell's avatar
      Remove remaining old listen code · 912c89c5
      Matt Caswell authored
      
      
      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: default avatarAndy Polyakov <appro@openssl.org>
      912c89c5
    • Matt Caswell's avatar
      DTLSv1_listen rewrite · e3d0dae7
      Matt Caswell authored
      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 un...
      e3d0dae7
    • Matt Caswell's avatar
      Add BIO_CTRL_DGRAM_SET_PEEK_MODE · 01b7851a
      Matt Caswell authored
      
      
      Add the ability to peek at a message from the DTLS read BIO. This is needed
      for the DTLSv1_listen rewrite.
      
      Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
      01b7851a
  2. 22 Sep, 2015 36 commits