1. 25 1月, 2017 1 次提交
  2. 24 1月, 2017 1 次提交
    • M
      Fix SSL_get0_raw_cipherlist() · 07afdf3c
      Matt Caswell 提交于
      SSL_get0_raw_cipherlist() was a little too "raw" in the case of an SSLv2
      compat ClientHello. In 1.0.2 and below, during version negotiation, if
      we received an SSLv2 compat ClientHello but actually wanted to do SSLv3+
      then we would construct a "fake" SSLv3+ ClientHello. This "fake" ClientHello
      would have its ciphersuite list converted to the SSLv3+ format. It was
      this "fake" raw list that got saved away to later be returned by a call to
      SSL_get0_raw_cipherlist().
      
      In 1.1.0+ version negotiation works differently and we process an SSLv2
      compat ClientHello directly without the need for an intermediary "fake"
      ClientHello. This meant that the raw ciphersuite list being saved was in
      the SSLv2 format. Any caller of this function would not expect that and
      potentially overread the returned buffer by one byte.
      
      Fixes #2189
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/2280)
      07afdf3c
  3. 23 1月, 2017 1 次提交
    • M
      Fix SSL_VERIFY_CLIENT_ONCE · a03a9dbe
      Matt Caswell 提交于
      The flag SSL_VERIFY_CLIENT_ONCE is documented as follows:
      
        B<Server mode:> only request a client certificate on the initial TLS/SSL
        handshake. Do not ask for a client certificate again in case of a
        renegotiation. This flag must be used together with SSL_VERIFY_PEER.
      
        B<Client mode:> ignored
      
      But the implementation actually did nothing. After the server sends its
      ServerKeyExchange message, the code was checking s->session->peer to see if
      it is NULL. If it was set then it did not ask for another client
      certificate. However s->session->peer will only be set in the event of a
      resumption, but a ServerKeyExchange message is only sent in the event of a
      full handshake (i.e. no resumption).
      
      The documentation suggests that the original intention was for this to
      have an effect on renegotiation, and resumption doesn't come into it.
      
      The fix is to properly check for renegotiation, not whether there is already
      a client certificate in the session.
      
      As far as I can tell this has been broken for a *long* time.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/1982)
      a03a9dbe
  4. 11 1月, 2017 6 次提交
  5. 10 1月, 2017 2 次提交
  6. 06 1月, 2017 5 次提交
  7. 09 12月, 2016 13 次提交
  8. 23 11月, 2016 4 次提交
    • M
      Fix some style issues identified during review · f5ca0b04
      Matt Caswell 提交于
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      f5ca0b04
    • M
      Ensure unexpected messages are handled consistently · 5abeaf35
      Matt Caswell 提交于
      In one case we weren't always sending an unexpected message alert if we
      don't get what we expect.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      5abeaf35
    • M
      Update state machine to be closer to TLS1.3 · 92760c21
      Matt Caswell 提交于
      This is a major overhaul of the TLSv1.3 state machine. Currently it still
      looks like TLSv1.2. This commit changes things around so that it starts
      to look a bit less like TLSv1.2 and bit more like TLSv1.3.
      
      After this commit we have:
      
      ClientHello
      + key_share          ---->
                                 ServerHello
                                 +key_share
                                 {CertificateRequest*}
                                 {Certificate*}
                                 {CertificateStatus*}
                           <---- {Finished}
      {Certificate*}
      {CertificateVerify*}
      {Finished}           ---->
      [ApplicationData]    <---> [Application Data]
      
      Key differences between this intermediate position and the final TLSv1.3
      position are:
      - No EncryptedExtensions message yet
      - No server side CertificateVerify message yet
      - CertificateStatus still exists as a separate message
      - A number of the messages are still in the TLSv1.2 format
      - Still running on the TLSv1.2 record layer
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      92760c21
    • M
      Remove old style NewSessionTicket from TLSv1.3 · 9362c93e
      Matt Caswell 提交于
      TLSv1.3 has a NewSessionTicket message, but it is *completely* different to
      the TLSv1.2 one and may as well have been called something else. This commit
      removes the old style NewSessionTicket from TLSv1.3. We will have to add the
      new style one back in later.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      9362c93e
  9. 17 11月, 2016 1 次提交
  10. 16 11月, 2016 4 次提交
    • M
      Fixed various style issues in the key_share code · 94ed2c67
      Matt Caswell 提交于
      Numerous style issues as well as references to TLS1_3_VERSION instead of
      SSL_IS_TLS13(s)
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      94ed2c67
    • M
      ef7daaf9
    • M
      Start using the key_share data to derive the PMS · 0f1e51ea
      Matt Caswell 提交于
      The previous commits put in place the logic to exchange key_share data. We
      now need to do something with that information. In <= TLSv1.2 the equivalent
      of the key_share extension is the ServerKeyExchange and ClientKeyExchange
      messages. With key_share those two messages are no longer necessary.
      
      The commit removes the SKE and CKE messages from the TLSv1.3 state machine.
      TLSv1.3 is completely different to TLSv1.2 in the messages that it sends
      and the transitions that are allowed. Therefore, rather than extend the
      existing <=TLS1.2 state transition functions, we create a whole new set for
      TLSv1.3. Intially these are still based on the TLSv1.2 ones, but over time
      they will be amended.
      
      The new TLSv1.3 transitions remove SKE and CKE completely. There's also some
      cleanup for some stuff which is not relevant to TLSv1.3 and is easy to
      remove, e.g. the DTLS support (we're not doing DTLSv1.3 yet) and NPN.
      
      I also disable EXTMS for TLSv1.3. Using it was causing some added
      complexity, so rather than fix it I removed it, since eventually it will not
      be needed anyway.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      0f1e51ea
    • M
      Add the key_share processing to the server side · b1834ad7
      Matt Caswell 提交于
      At the moment the server doesn't yet do anything with this information.
      We still need to send the server's key_share info back to the client. That
      will happen in subsequent commits.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      b1834ad7
  11. 10 11月, 2016 2 次提交