<div dir="ltr"><div dir="ltr">Hi,<div><br><div>When an EVP_PKEY is created with some custom data, provider's keymgmt_load() gets called. I want to keep a reference count on the keydata returned from it. But there is no call to keymgmt_free() or anything similar when the EVP_PKEY is freed. How does one keep track of references to keydata? I have something like:</div><div><br></div><div>OSSL_STORE_open_ex(my_custom_uri, libctx, props,....)</div><div><br></div><div><div>while (!OSSL_STORE_eof(ctx)) {</div><div>        OSSL_STORE_INFO *info = OSSL_STORE_load(ctx);</div><div>        switch(OSSL_STORE_INFO_get_type(info)) {</div><div>        case OSSL_STORE_INFO_PKEY:</div><div>            pkey = OSSL_STORE_INFO_get0_PKEY(info);</div></div><div>                        (tried .._get1_PKEY(info) as well).</div><div>            ....</div><div><br></div><div>The pkey seems to be correctly constructed with a call to my keymgmt_load() where I construct keydata from the passed in reference. </div><div><br></div><div>On duplicating the key I do see calls to keymgmt_dup() and a matching keymgmt_free() (when the key is freed), so that part is good.<br></div><div><br></div><div>I'm still figuring out the new interface and likely doing something wrong.</div></div><div><br></div><div>Thanks,</div><div><br></div><div>Selva</div></div></div>