1. 07 8月, 2020 1 次提交
  2. 01 8月, 2020 1 次提交
  3. 27 7月, 2020 1 次提交
  4. 24 7月, 2020 2 次提交
  5. 16 7月, 2020 1 次提交
  6. 19 6月, 2020 1 次提交
  7. 11 6月, 2020 1 次提交
  8. 05 6月, 2020 1 次提交
  9. 27 5月, 2020 1 次提交
  10. 24 5月, 2020 1 次提交
    • R
      Re-introduce legacy EVP_PKEY types for provided keys · 5e5bc836
      Richard Levitte 提交于
      EVP_PKEYs with provider side internal keys got the key type
      EVP_PKEY_NONE.  This turned out to be too disruptive, so we try
      instead to find a matching EVP_PKEY_ASN1_METHOD and use whatever
      EVP_PKEY type it uses.
      
      To make internal coding easier, we introduce a few internal macros to
      distinguish what can be expected from a EVP_PKEY:
      
      - evp_pkey_is_blank(), to detect an unassigned EVP_PKEY.
      - evp_pkey_is_typed(), to detect that an EVP_PKEY has been assigned a
        type, which may be an old style type number or a EVP_KEYMGMT method.
      - evp_pkey_is_assigned(), to detect that an EVP_PKEY has been assigned
        an key value.
      - evp_pkey_is_legacy(), to detect that the internal EVP_PKEY key is a
        legacy one, i.e. will be handled via an EVP_PKEY_ASN1_METHOD and an
        EVP_PKEY_METHOD.
      - evp_pkey_is_provided(), to detect that the internal EVP_PKEY key is
        a provider side one, i.e. will be handdled via an EVP_KEYMGMT and
        other provider methods.
      
      This also introduces EVP_PKEY_KEYMGMT, to indicate that this EVP_PKEY
      contains a provider side key for which there are no known
      EVP_PKEY_ASN1_METHODs or EVP_PKEY_METHODs, i.e. these can only be
      handled via EVP_KEYMGMT and other provider methods.
      
      Fixes #11823
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11913)
      5e5bc836
  11. 04 5月, 2020 2 次提交
  12. 30 4月, 2020 2 次提交
  13. 28 4月, 2020 1 次提交
  14. 25 4月, 2020 1 次提交
  15. 24 4月, 2020 1 次提交
  16. 23 4月, 2020 2 次提交
  17. 17 4月, 2020 1 次提交
  18. 15 4月, 2020 2 次提交
  19. 14 4月, 2020 1 次提交
  20. 09 4月, 2020 1 次提交
  21. 08 4月, 2020 2 次提交
  22. 01 4月, 2020 1 次提交
    • S
      Add EVP_PKEY_gettable_params support for accessing EVP_PKEY key data fields · 96ebe52e
      Shane Lontis 提交于
      Currently only RSA, EC and ECX are supported (DH and DSA need to be added to the keygen
      PR's seperately because the fields supported have changed significantly).
      
      The API's require the keys to be provider based.
      
      Made the keymanagement export and get_params functions share the same code by supplying
      support functions that work for both a OSSL_PARAM_BLD as well as a OSSL_PARAM[].
      This approach means that complex code is not required to build an
      empty OSSL_PARAM[] with the correct sized fields before then doing a second
      pass to populate the array.
      
      The RSA factor arrays have been changed to use unique key names to simplify the interface
      needed by the user.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11365)
      96ebe52e
  23. 26 3月, 2020 4 次提交
    • R
      EVP: Limit the diverse key parameter functions to domain params only · 8158cf20
      Richard Levitte 提交于
      Provider KEYMGMT functions can handle domain parameters as well as
      "other" parameters (the cofactor mode flag in ECC keys is one of
      those).  The public EVP functions EVP_PKEY_copy_parameters(),
      EVP_PKEY_missing_parameters(), EVP_PKEY_cmp_parameters() and
      EVP_PKEY_cmp() tried to handle all parameters, but looking back at
      EVP_PKEY_ASN1_METHOD code (especially crypto/ec/ec_ameth.c), it turns
      out that they only need to concern themselves with domain parameters.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/11375)
      8158cf20
    • 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
  24. 21 3月, 2020 1 次提交
    • R
      EVP: fetch the EVP_KEYMGMT earlier · 4b9e90f4
      Richard Levitte 提交于
      Instead of fetching the EVP_KEYMGMT in the init for every different
      operation, do it when creating the EVP_PKEY_CTX.
      
      This allows certain control functions to be called between the
      creation of the EVP_PKEY_CTX and the call of the operation's init
      function.
      
      Use case: EVP_PKEY_CTX_set1_id(), which is allowed to be called very
      early with the legacy implementation, this should still be allowed
      with provider implementations.
      Reviewed-by: NPaul Yang <kaishen.yy@antfin.com>
      (Merged from https://github.com/openssl/openssl/pull/11343)
      4b9e90f4
  25. 12 3月, 2020 1 次提交
  26. 02 3月, 2020 3 次提交
  27. 29 2月, 2020 2 次提交
  28. 22 2月, 2020 1 次提交