1. 10 6月, 2016 1 次提交
    • T
      Fix session ticket and SNI · 5c753de6
      Todd Short 提交于
      When session tickets are used, it's possible that SNI might swtich the
      SSL_CTX on an SSL. Normally, this is not a problem, because the
      initial_ctx/session_ctx are used for all session ticket/id processes.
      
      However, when the SNI callback occurs, it's possible that the callback
      may update the options in the SSL from the SSL_CTX, and this could
      cause SSL_OP_NO_TICKET to be set. If this occurs, then two bad things
      can happen:
      
      1. The session ticket TLSEXT may not be written when the ticket expected
      flag is set. The state machine transistions to writing the ticket, and
      the client responds with an error as its not expecting a ticket.
      2. When creating the session ticket, if the ticket key cb returns 0
      the crypto/hmac contexts are not initialized, and the code crashes when
      trying to encrypt the session ticket.
      
      To fix 1, if the ticket TLSEXT is not written out, clear the expected
      ticket flag.
      To fix 2, consider a return of 0 from the ticket key cb a recoverable
      error, and write a 0 length ticket and continue. The client-side code
      can explicitly handle this case.
      
      Fix these two cases, and add unit test code to validate ticket behavior.
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/1098)
      5c753de6
  2. 09 6月, 2016 1 次提交
  3. 08 6月, 2016 18 次提交
  4. 07 6月, 2016 5 次提交
    • R
      Fix some GitHub issues. · 56989dcd
      Rich Salz 提交于
      GH1180: Local variable sometimes unused
      GH1181: Missing close paren.
      
      Thanks to <wipedout@yandex.ru> for reporting these.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      56989dcd
    • C
      Set flag BN_FLG_CONSTTIME earlier · 47ae05ba
      Cesar Pereida 提交于
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      47ae05ba
    • C
      033dc8fa
    • R
      Add script to find undocumented API · 35ea640a
      Rich Salz 提交于
      Also tweaks to find-doc-nits, including name/synopsis checking.
      Ironically, it also reports on duplicated doc names :)
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      35ea640a
    • M
      Document the issue with threads and dlopen() · c796e021
      Matt Caswell 提交于
      If using threads and OpenSSL is loaded via dlopen(), and subsequently
      closed again via dlclose() *before* the threads are destroyed, then
      OpenSSL will not free up the per thread resources. We need to document
      this restriction, and provide some guidance on what to do about it.
      
      I did some testing and discovered/verified a few of things (at least
      this is the behaviour on Linux):
      
      - Using OpenSSL via dlopen in a mutli-threaded app does leak memory if
      threads are destroyed after dlcose() is called.
      - In a single threaded environment, or if threads are destroyed prior to
      dlclose() being called, then no memory is leaked
      - Using the RTLD_NODELETE flag to dlopen solves the above problem
      - Interestingly the OpenSSL atexit() handler gets called when dlclose()
      is called rather than at application exit (I was worred that it might crash
      if there was an atexit() handler for a function that has been unloaded)
      - RTLD_NODELETE is a non-standard flag - but it does seem to be fairly
      widely supported. As far as I could determine (via google), at least Linux,
      Solaris, OpenBSD, FreeBSD, HP-UX all seem to support it.
      
      I also tested on Windows (using LoadLibrary instead of dlopen and
      FreeLibrary instead of dlclose) and experienced similar behaviour, except
      that (AFAIK) there is no equivalent of RTLD_NODELETE on Windows.
      
      GitHub Issue #653
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      c796e021
  5. 06 6月, 2016 12 次提交
  6. 05 6月, 2016 3 次提交