1. 25 1月, 2020 1 次提交
    • K
      Check that the default signature type is allowed · cc7c6eb8
      Kurt Roeckx 提交于
      TLS < 1.2 has fixed signature algorithms: MD5+SHA1 for RSA and SHA1 for the
      others. TLS 1.2 sends a list of supported ciphers, but allows not sending
      it in which case SHA1 is used. TLS 1.3 makes sending the list mandatory.
      
      When we didn't receive a list from the client, we always used the
      defaults without checking that they are allowed by the configuration.
      Reviewed-by: NPaul Dale <paul.dale@oracle.com>
      GH: #10784
      (cherry picked from commit b0031e5dc2c8c99a6c04bc7625aa00d3d20a59a5)
      cc7c6eb8
  2. 11 11月, 2019 1 次提交
  3. 28 9月, 2019 1 次提交
  4. 10 9月, 2019 1 次提交
  5. 04 9月, 2019 1 次提交
  6. 14 8月, 2019 1 次提交
    • M
      Fix SSL_check_chain() · 604ba265
      Matt Caswell 提交于
      The function SSL_check_chain() can be used by applications to check that
      a cert and chain is compatible with the negotiated parameters. This could
      be useful (for example) from the certificate callback. Unfortunately this
      function was applying TLSv1.2 sig algs rules and did not work correctly if
      TLSv1.3 was negotiated.
      
      We refactor tls_choose_sigalg to split it up and create a new function
      find_sig_alg which can (optionally) take a certificate and key as
      parameters and find an appropriate sig alg if one exists. If the cert and
      key are not supplied then we try to find a cert and key from the ones we
      have available that matches the shared sig algs.
      Reviewed-by: NTomas Mraz <tmraz@fedoraproject.org>
      (Merged from https://github.com/openssl/openssl/pull/9443)
      604ba265
  7. 27 6月, 2019 1 次提交
    • B
      Move 'shared_sigalgs' from cert_st to ssl_st · 915430a0
      Benjamin Kaduk 提交于
      It was only ever in cert_st because ssl_st was a public structure
      and could not be modified without breaking the API.  However, both
      structures are now opaque, and thus we can freely change their layout
      without breaking applications.  In this case, keeping the shared
      sigalgs in the SSL object prevents complications wherein they would
      inadvertently get cleared during SSL_set_SSL_CTX() (e.g., as run
      during a cert_cb).
      
      Fixes #9099
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/9157)
      
      (cherry picked from commit 29948ac80c1388cfeb0bd64539ac1fa6e0bb8990)
      915430a0
  8. 18 6月, 2019 1 次提交
  9. 24 11月, 2018 1 次提交
  10. 14 11月, 2018 1 次提交
  11. 13 11月, 2018 1 次提交
    • V
      Added missing signature algorithm reflection functions · 45f24725
      Viktor Dukhovni 提交于
          SSL_get_signature_nid()      -- local signature algorithm
          SSL_get_signature_type_nid() -- local signature algorithm key type
          SSL_get_peer_tmp_key()       -- Peer key-exchange public key
          SSL_get_tmp_key              -- local key exchange public key
      
      Aliased pre-existing SSL_get_server_tmp_key(), which was formerly
      just for clients, to SSL_get_peer_tmp_key().  Changed internal
      calls to use the new name.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      45f24725
  12. 12 11月, 2018 1 次提交
  13. 08 11月, 2018 1 次提交
  14. 04 9月, 2018 1 次提交
  15. 22 8月, 2018 1 次提交
  16. 18 7月, 2018 1 次提交
  17. 14 7月, 2018 1 次提交
  18. 29 6月, 2018 1 次提交
  19. 07 6月, 2018 1 次提交
  20. 30 5月, 2018 2 次提交
  21. 12 5月, 2018 1 次提交
  22. 11 5月, 2018 2 次提交
  23. 25 4月, 2018 1 次提交
  24. 24 4月, 2018 1 次提交
  25. 03 4月, 2018 1 次提交
  26. 28 3月, 2018 1 次提交
  27. 19 3月, 2018 2 次提交
  28. 12 3月, 2018 1 次提交
  29. 05 3月, 2018 1 次提交
  30. 21 2月, 2018 1 次提交
  31. 12 2月, 2018 1 次提交
  32. 26 1月, 2018 4 次提交
    • B
      Fix uninitialized read in sigalg parsing code · c1acef92
      Benjamin Kaduk 提交于
      The check for a duplicate value was reading one entry past
      where it was supposed to, getting an uninitialized value.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5172)
      c1acef92
    • B
      Add support for the TLS 1.3 signature_algorithms_cert extension · c589c34e
      Benjamin Kaduk 提交于
      The new extension is like signature_algorithms, but only for the
      signature *on* the certificate we will present to the peer (the
      old signature_algorithms extension is still used for signatures that
      we *generate*, i.e., those over TLS data structures).
      
      We do not need to generate this extension, since we are the same
      implementation as our X.509 stack and can handle the same types
      of signatures, but we need to be prepared to receive it, and use the received
      information when selecting what certificate to present.
      
      There is a lot of interplay between signature_algorithms_cert and
      signature_algorithms, since both affect what certificate we can
      use, and thus the resulting signature algorithm used for TLS messages.
      So, apply signature_algorithms_cert (if present) as a filter on what
      certificates we can consider when choosing a certificate+sigalg
      pair.
      
      As part of this addition, we also remove the fallback code that let
      keys of type EVP_PKEY_RSA be used to generate RSA-PSS signatures -- the
      new rsa_pss_pss_* and rsa_pss_rsae_* signature schemes have pulled
      the key type into what is covered by the signature algorithm, so
      we should not apply this sort of compatibility workaround.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5068)
      c589c34e
    • B
      Propagate TLS 1.3 sigalgs through tls1_set_sigalgs() · fd5e1a8c
      Benjamin Kaduk 提交于
      Our historical SSL{,_CTX}_set_sigalgs() APIs take an array of
      NID pairs (hash and signature), and our parser for manually
      specifying unified sigalgs (that do not necessarily correspond
      to an actual signature+hash pair) was transiting via (the implementation
      of) this historical API.  The TLS 1.3 draft-23 has introduced
      signature schemes that have identical signature type and hash type,
      differing only in the (RSA) public key OID, which prevents
      the rsa_pss_pss_* schemes from being properly identified and
      sent on the wire.
      
      To fix the issue, parse sigalg strings directly into SIGALG_LOOKUP
      objects, and pass around an array of uint16 wire protocol values
      instead of NID pairs.  The old interface is retained for API
      compatibility but will become less and less useful with time.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5068)
      fd5e1a8c
    • B
      Add TLS 1.3 draft-23 PSS signature algorithms · f55e99f7
      Benjamin Kaduk 提交于
      We now have a split in the signature algorithms codepoint space for
      whether the certificate's key is for rsaEncryption or a PSS-specific
      key, which should let us get rid of some special-casing that we
      previously needed to try to coax rsaEncryption keys into performing PSS.
      (This will be done in a subsequent commit.)
      
      Send the new PSS-with-PSS-specific key first in our list, so that
      we prefer the new technology to the old one.
      
      We need to update the expected certificate type in one test,
      since the "RSA-PSS+SHA256" form now corresponds to a public key
      of type rsaEncryption, so we should expect the server certificate
      type to be just "RSA".  If we want to get a server certificate
      type of "RSA-PSS", we need to use a new signature algorithm
      that cannot be represented as signature+hash, so add a test for that
      as well.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5068)
      f55e99f7
  33. 09 1月, 2018 2 次提交