Pkey methods PRF and HKDF only use the provider API #21627
-
In OpenSSL 3.0, the function tls1_PRF() will just fetch the default provider to do KDF, but there is no judgment for the scene using the engine API. Is it possible to add support for engine API? (HKDF also has the same issue) For example, first judge whether it is a legacy case, if yes, call the engine API, otherwise call the provider API. OpenSSL 3.0: Lines 48 to 72 in 5c56cef OpenSSL 1.1.1: Lines 41 to 50 in fe824ce |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm not entire sure what you are asking about here. The second code segment should still work, it's deprecated and won't be removed until at least 4.x but it should still work. HKDF isn't supported via the PKEY interface and never will be. The project has been pretty clear since 3.0 was released: there will not be any further enhancements to the engine APIs. They are deprecated and providers are the replacement. |
Beta Was this translation helpful? Give feedback.
-
The problem is how to find out when the legacy API should be used and when it shouldn't. In theory we could revert to always using the legacy API however it could be seen as functionality change as that will go through different code paths in providers (perhaps even third party ones). And there is no clear way how to infer that an engine providing the legacy EVP_PKEY_CTX style API for HKDF or TLS1 PRF is enabled. I am afraid this ship has sailed and the calls will not be changed apart from some hacks like adding a new SSL_OP to enable the legacy way. |
Beta Was this translation helpful? Give feedback.
The problem is how to find out when the legacy API should be used and when it shouldn't. In theory we could revert to always using the legacy API however it could be seen as functionality change as that will go through different code paths in providers (perhaps even third party ones). And there is no clear way how to infer that an engine providing the legacy EVP_PKEY_CTX style API for HKDF or TLS1 PRF is enabled. I am afraid this ship has sailed and the calls will not be changed apart from some hacks like adding a new SSL_OP to enable the legacy way.