1. 09 11月, 2016 1 次提交
  2. 08 11月, 2016 1 次提交
    • M
      Partial revert of "Fix client verify mode to check SSL_VERIFY_PEER" · c8e2f98c
      Matt Caswell 提交于
      This partially reverts commit c636c1c4. It also tweaks the documentation
      and comments in this area. On the client side the documented interface for
      SSL_CTX_set_verify()/SSL_set_verify() is that setting the flag
      SSL_VERIFY_PEER causes verfication of the server certificate to take place.
      Previously what was implemented was that if *any* flag was set then
      verification would take place. The above commit improved the semantics to
      be as per the documented interface.
      
      However, we have had a report of at least one application where an
      application was incorrectly using the interface and used *only*
      SSL_VERIFY_FAIL_IF_NO_PEER_CERT on the client side. In OpenSSL prior to
      the above commit this still caused verification of the server certificate
      to take place. After this commit the application silently failed to verify
      the server certificate.
      
      Ideally SSL_CTX_set_verify()/SSL_set_verify() could be modified to indicate
      if invalid flags were being used. However these are void functions!
      
      The simplest short term solution is to revert to the previous behaviour
      which at least means we "fail closed" rather than "fail open".
      
      Thanks to Cory Benfield for reporting this issue.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      c8e2f98c
  3. 07 11月, 2016 3 次提交
    • M
      Ignore the record version in TLS1.3 · 3c9539d2
      Matt Caswell 提交于
      The record layer version field must be ignored in TLSv1.3, so we remove the
      check when using that version.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      3c9539d2
    • M
      Correct the Id for the TLS1.3 ciphersuite · 5d71f7ea
      Matt Caswell 提交于
      We have one TLS1.3 ciphersuite, but there is a typo in the id that should
      be corrected.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      5d71f7ea
    • M
      Always ensure that init_msg is initialised for a CCS · c4377574
      Matt Caswell 提交于
      We read it later in grow_init_buf(). If CCS is the first thing received in
      a flight, then it will use the init_msg from the last flight we received. If
      the init_buf has been grown in the meantime then it will point to some
      arbitrary other memory location. This is likely to result in grow_init_buf()
      attempting to grow to some excessively large amount which is likely to
      fail. In practice this should never happen because the only time we receive
      a CCS as the first thing in a flight is in an abbreviated handshake. None
      of the preceding messages from the server flight would be large enough to
      trigger this.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      c4377574
  4. 04 11月, 2016 30 次提交
  5. 03 11月, 2016 2 次提交
    • M
      Fail if an unrecognised record type is received · 436a2a01
      Matt Caswell 提交于
      TLS1.0 and TLS1.1 say you SHOULD ignore unrecognised record types, but
      TLS 1.2 says you MUST send an unexpected message alert. We swap to the
      TLS 1.2 behaviour for all protocol versions to prevent issues where no
      progress is being made and the peer continually sends unrecognised record
      types, using up resources processing them.
      
      Issue reported by 郭志攀
      Reviewed-by: NTim Hudson <tjh@openssl.org>
      436a2a01
    • M
      Fix read_ahead · a7faa6da
      Matt Caswell 提交于
      The function ssl3_read_n() takes a parameter |clearold| which, if set,
      causes any old data in the read buffer to be forgotten, and any unread data
      to be moved to the start of the buffer. This is supposed to happen when we
      first read the record header.
      
      However, the data move was only taking place if there was not already
      sufficient data in the buffer to satisfy the request. If read_ahead is set
      then the record header could be in the buffer already from when we read the
      preceding record. So with read_ahead we can get into a situation where even
      though |clearold| is set, the data does not get moved to the start of the
      read buffer when we read the record header. This means there is insufficient
      room in the read buffer to consume the rest of the record body, resulting in
      an internal error.
      
      This commit moves the |clearold| processing to earlier in ssl3_read_n()
      to ensure that it always takes place.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      a7faa6da
  6. 02 11月, 2016 3 次提交