This allows to fetch efficiently directly from the same provider that can
handle the EVP_SKEY at hand.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26753)
return skeymgmt;
}
+EVP_SKEYMGMT *evp_skeymgmt_fetch_from_prov(OSSL_PROVIDER *prov,
+ const char *name,
+ const char *properties)
+{
+ return evp_generic_fetch_from_prov(prov,
+ OSSL_OP_SKEYMGMT,
+ name, properties,
+ skeymgmt_from_algorithm,
+ (int (*)(void *))EVP_SKEYMGMT_up_ref,
+ (void (*)(void *))EVP_SKEYMGMT_free);
+}
+
EVP_SKEYMGMT *EVP_SKEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
const char *properties)
{
int evp_skeymgmt_export(const EVP_SKEYMGMT *skeymgmt, void *keydata,
int selection, OSSL_CALLBACK *param_cb, void *cbarg);
void *evp_skeymgmt_generate(const EVP_SKEYMGMT *skeymgmt, const OSSL_PARAM params[]);
+EVP_SKEYMGMT *evp_skeymgmt_fetch_from_prov(OSSL_PROVIDER *prov,
+ const char *name,
+ const char *properties);
+
/* Pulling defines out of C source files */
# define EVP_RC4_KEY_SIZE 16