1. 21 11月, 2015 2 次提交
    • M
      Initial Async notify code changes · f4da39d2
      Matt Caswell 提交于
      Initial API implemented for notifying applications that an ASYNC_JOB
      has completed. Currently only s_server is using this. The Dummy Async
      engine "cheats" in that it notifies that it has completed *before* it
      pauses the job. A normal async engine would not do that.
      
      Only the posix version of this has been implemented so far, so it will
      probably fail to compile on Windows at the moment.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      f4da39d2
    • M
      Make libssl async aware · 07bbc92c
      Matt Caswell 提交于
      The following entry points have been made async aware:
      SSL_accept
      SSL_read
      SSL_write
      
      Also added is a new mode - SSL_MODE_ASYNC. Calling the above functions with
      the async mode enabled will initiate a new async job. If an async pause is
      encountered whilst executing the job (such as for example if using SHA1/RSA
      with the Dummy Async engine), then the above functions return with
      SSL_WANT_ASYNC. Calling the functions again (with exactly the same args
      as per non-blocking IO), will resume the job where it left off.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      07bbc92c
  2. 20 11月, 2015 1 次提交
  3. 11 11月, 2015 1 次提交
    • M
      Fix SSL_use_certificate_chain_file · a974e64a
      Matt Caswell 提交于
      The new function SSL_use_certificate_chain_file was always crashing in
      the internal function use_certificate_chain_file because it would pass a
      NULL value for SSL_CTX *, but use_certificate_chain_file would
      unconditionally try to dereference it.
      Reviewed-by: NStephen Henson <steve@openssl.org>
      a974e64a
  4. 08 11月, 2015 2 次提交
  5. 31 10月, 2015 1 次提交
  6. 30 10月, 2015 16 次提交
  7. 09 10月, 2015 1 次提交
  8. 08 10月, 2015 1 次提交
  9. 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
  10. 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
  11. 30 9月, 2015 1 次提交
    • 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
  12. 25 9月, 2015 1 次提交
  13. 23 9月, 2015 1 次提交
    • 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
  14. 11 9月, 2015 1 次提交
  15. 14 8月, 2015 2 次提交
  16. 12 8月, 2015 2 次提交
  17. 03 8月, 2015 2 次提交
    • M
      Fix make errors for the CCS changes · 496dbe18
      Matt Caswell 提交于
      The move of CCS into the state machine was causing make errors to fail. This
      fixes it.
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      496dbe18
    • 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
  18. 30 7月, 2015 1 次提交
  19. 15 7月, 2015 1 次提交
  20. 29 6月, 2015 1 次提交