1. 30 10月, 2015 4 次提交
    • M
      dtls_get_message changes for state machine move · 76af3037
      Matt Caswell 提交于
      Create a dtls_get_message function similar to the old dtls1_get_message but
      in the format required for the new state machine code. The old function will
      eventually be deleted in later commits.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      76af3037
    • M
      Split client message reading and writing functions · b9908bf9
      Matt Caswell 提交于
      The new state machine code will split up the reading and writing of
      hanshake messages into discrete phases. In order to facilitate that the
      existing "get" type functions will be split into two halves: one to get
      the message and one to process it. The "send" type functions will also have
      all work relating to constructing the message split out into a separate
      function just for that. For some functions there will also be separate
      pre and post "work" phases to prepare or update state.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      b9908bf9
    • M
      Add initial state machine rewrite code · f8e0a557
      Matt Caswell 提交于
      This is the first drop of the new state machine code.
      
      The rewrite has the following objectives:
      - Remove duplication of state code between client and server
      - Remove duplication of state code between TLS and DTLS
      - Simplify transitions and bring the logic together in a single location
        so that it is easier to validate
      - Remove duplication of code between each of the message handling functions
      - Receive a message first and then work out whether that is a valid
        transition - not the other way around (the other way causes lots of issues
        where we are expecting one type of message next but actually get something
        else)
      - Separate message flow state from handshake state (in order to better
        understand each)
        - message flow state = when to flush buffers; handling restarts in the
          event of NBIO events; handling the common flow of steps for reading a
          message and the common flow of steps for writing a message etc
        - handshake state = what handshake message are we working on now
      - Control complexity: only the state machine can change state: keep all
        the state changes local to a file
      
      This builds on previous state machine related work:
      - Surface CCS processing in the state machine
      - Version negotiation rewrite
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      f8e0a557
    • M
      Split ssl3_get_message · 9ab930b2
      Matt Caswell 提交于
      The function ssl3_get_message gets a whole message from the underlying bio
      and returns it to the state machine code. The new state machine code will
      split this into two discrete steps: get the message header and get the
      message body. This commit splits the existing function into these two
      sub steps to facilitate the state machine implementation.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      9ab930b2
  2. 28 10月, 2015 1 次提交
  3. 24 10月, 2015 1 次提交
  4. 12 10月, 2015 2 次提交
  5. 09 10月, 2015 2 次提交
  6. 08 10月, 2015 2 次提交
  7. 06 10月, 2015 3 次提交
  8. 05 10月, 2015 1 次提交
  9. 03 10月, 2015 1 次提交
  10. 01 10月, 2015 3 次提交
  11. 30 9月, 2015 3 次提交
    • R
      Make update / libeay.num fix · 75f648aa
      Rich Salz 提交于
      Looks like someone forgot to do a "make update" since crypto/ts/Makefile
      keeps changing.  So include that.
      
      Second is that the declare_dh_bn macro fools the libeay.num script.
      The declarations are only needed in one file (dh_rfc5114) so remove
      them from the header and put the "raw" declarations directly into that
      file.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      75f648aa
    • D
      Fix no-stdio build · 984d6c60
      David Woodhouse 提交于
      Much related/similar work also done by
      Ivan Nestlerode <ivan.nestlerode@sonos.com>
      
         +Replace FILE BIO's with dummy ops that fail.
         +Include <stdio.h> for sscanf() even with no-stdio (since the declaration
          is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment
          variable, since it can be larger than a 'long'. And we don't rely on the
          availability of strtoull().
         +Remove OPENSSL_stderr(); not used.
         +Make OPENSSL_showfatal() do nothing (currently without stdio there's
          nothing we can do).
         +Remove file-based functionality from ssl/. The function
          prototypes were already gone, but not the functions themselves.
         +Remove unviable conf functionality via SYS_UEFI
         +Add fallback definition of BUFSIZ.
         +Remove functions taking FILE * from header files.
         +Add missing DECLARE_PEM_write_fp_const
         +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out,
          so remove its prototype.
         +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid().
         +Eliminate SRP_VBASE_init() and supporting functions. Users will need to
          build the verifier manually instead.
         +Eliminate compiler warning for unused do_pk8pkey_fp().
         +Disable TEST_ENG_OPENSSL_PKEY.
         +Disable GOST engine as is uses [f]printf all over the place.
         +Eliminate compiler warning for unused send_fp_chars().
      Signed-off-by: NRich Salz <rsalz@akamai.com>
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      984d6c60
    • A
      asn1t.h: silence -Wmissing-prototype in Windows builds. · 03cbd3b8
      Andy Polyakov 提交于
      On Windows OPENSSL_EXPORT_VAR_AS_FUNCTION is defined and in a sense
      this modification simply harmonizes it with "VAR_AS_VAR".
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      03cbd3b8
  12. 29 9月, 2015 1 次提交
  13. 25 9月, 2015 1 次提交
  14. 23 9月, 2015 6 次提交
    • 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
    • M
      Add BIO_CTRL_DGRAM_SET_PEEK_MODE · 01b7851a
      Matt Caswell 提交于
      Add the ability to peek at a message from the DTLS read BIO. This is needed
      for the DTLSv1_listen rewrite.
      Reviewed-by: NAndy Polyakov <appro@openssl.org>
      01b7851a
    • D
      New function X509_get0_subject_key_id() · d19a50c9
      Dr. Stephen Henson 提交于
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      d19a50c9
    • D
      Make X509 opaque · 2c81e476
      Dr. Stephen Henson 提交于
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      2c81e476
    • E
      BUF_strndup: tidy · de8883e1
      Emilia Kasper 提交于
      Fix comment, add another overflow check, tidy style
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      de8883e1
    • A
      Make BUF_strndup() read-safe on arbitrary inputs · 110f7b37
      Alessandro Ghedini 提交于
      BUF_strndup was calling strlen through BUF_strlcpy, and ended up reading
      past the input if the input was not a C string.
      
      Make it explicitly part of BUF_strndup's contract to never read more
      than |siz| input bytes. This augments the standard strndup contract to
      be safer.
      
      The commit also adds a check for siz overflow and some brief documentation
      for BUF_strndup().
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      110f7b37
  15. 22 9月, 2015 4 次提交
  16. 20 9月, 2015 1 次提交
  17. 18 9月, 2015 1 次提交
  18. 17 9月, 2015 3 次提交