1. 26 3月, 2020 3 次提交
    • R
      EVP: Downgrade keys rather than upgrade · acb90ba8
      Richard Levitte 提交于
      Upgrading EVP_PKEYs from containing legacy keys to containing provider
      side keys proved to be risky, with a number of unpleasant corner
      cases, and with functions like EVP_PKEY_get0_DSA() failing
      unexpectedly.
      
      We therefore change course, and instead of upgrading legacy internal
      keys to provider side internal keys, we downgrade provider side
      internal keys to legacy ones.  To be able to do this, we add
      |import_from| and make it a callback function designed for
      evp_keymgmt_export().
      
      This means that evp_pkey_upgrade_to_provider() is replaced with
      evp_pkey_downgrade().
      
      EVP_PKEY_copy_parameters() is the most deeply affected function of
      this change.
      
      Fixes #11366
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11375)
      acb90ba8
    • R
      EVP: Add EVP_PKEY_set_type_by_keymgmt() and use it · 8243d8d1
      Richard Levitte 提交于
      This function intialises an EVP_PKEY to contain a provider side internal
      key.
      
      We take the opportunity to also document the older EVP_PKEY_set_type()
      and EVP_PKEY_set_type_str().
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11375)
      8243d8d1
    • R
      EVP: Clarify the states of an EVP_PKEY · adc9f731
      Richard Levitte 提交于
      EVP_PKEY is rather complex, even before provider side keys entered the
      stage.
      You could have untyped / unassigned keys (pk->type == EVP_PKEY_NONE),
      keys that had been assigned a type but no data (pk->pkey.ptr == NULL),
      and fully assigned keys (pk->type != EVP_PKEY_NONE && pk->pkey.ptr != NULL).
      
      For provider side keys, the corresponding states weren't well defined,
      and the code didn't quite account for all the possibilities.
      
      We also guard most of the legacy fields in EVP_PKEY with FIPS_MODE, so
      they don't exist at all in the FIPS module.
      
      Most of all, code needs to adapt to the case where an EVP_PKEY's
      |keymgmt| is non-NULL, but its |keydata| is NULL.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11375)
      adc9f731
  2. 25 3月, 2020 10 次提交
  3. 23 3月, 2020 7 次提交
  4. 22 3月, 2020 1 次提交
  5. 21 3月, 2020 3 次提交
  6. 20 3月, 2020 2 次提交
  7. 19 3月, 2020 3 次提交
  8. 18 3月, 2020 8 次提交
  9. 17 3月, 2020 1 次提交
  10. 16 3月, 2020 2 次提交