OpenSSL 3.x moved DES algorithms to the legacy provider. When the legacy
provider is not installed, the OpenSSL PMD still reported DES-CBC and
DES-DOCSISBPI as supported, causing runtime failures.

Additionally, if any OSSL_PROVIDER_load() call fails, OpenSSL disables
its implicit default provider. The original code attempted legacy load
first; on failure, no providers were active, breaking AES, SHA, and MD5.

Patch 1 adds openssl_pmd_caps_init() to filter unsupported ciphers from
the capability list at device init based on legacy provider availability.
openssl_pmd_info_get() now always returns openssl_pmd_caps_active directly,
removing the fallback to openssl_pmd_capabilities. As noted by Kai Ji,
caps_active is always populated before the device is registered and
queryable, making the fallback unreachable dead code.

Patch 2 fixes the provider load order: load default first (required,
fatal on failure), then legacy (optional, warning only). Provider load
is moved to the top of cryptodev_openssl_create() so a missing default
provider fails early before allocating device resources.

v2:
 - Split into two patches for clearer separation of concerns
 - Remove unreachable fallback in openssl_pmd_info_get(): caps_active
   is always populated before the device is queryable (patch 1)
 - Fix provider load order: default must be loaded before legacy to
   avoid disabling OpenSSL's implicit default provider on legacy failure
 - Move provider load to start of cryptodev_openssl_create() before
   device allocation; add ossl_providers_unload() to init_error path
 - Rename ossl_legacy_provider_load/unload to ossl_providers_load/unload

Pratik Senapati (2):
  crypto/openssl: filter legacy ciphers from capability list
  crypto/openssl: load default provider first legacy optional

 drivers/crypto/openssl/openssl_pmd_private.h |  2 +
 drivers/crypto/openssl/rte_openssl_pmd.c     | 43 ++++++++++----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 27 +++++++++++-
 3 files changed, 50 insertions(+), 22 deletions(-)

-- 
2.43.0

Reply via email to