Re: ENGINE_load_private_key does not get invoked

2020-04-20 Thread Dmitry Belyavsky
Dear Mahendra, On Mon, Apr 20, 2020 at 7:57 PM Mahendra SP wrote: > Hi Dmitry Belyavsky, > > Thank you..To give more info, I am looking at something similar the engine > in e_4758cca.c in engines folder where ENGINE_set_load_privkey_function > is called. > My understanding was, once the callbac

Re: ENGINE_load_private_key does not get invoked

2020-04-20 Thread Mahendra SP
Hi Dmitry Belyavsky, Thank you..To give more info, I am looking at something similar the engine in e_4758cca.c in engines folder where ENGINE_set_load_privkey_function is called. My understanding was, once the callback is set, it automatically gets called during RSA operations. As demostrated in

Re: ENGINE_load_private_key does not get invoked

2020-04-20 Thread Dmitry Belyavsky
Dear Mahendra, On Mon, Apr 20, 2020 at 7:27 PM Mahendra SP wrote: > Hi Dmitry Belyavsky, > > Thank you for the inputs. If I understand correctly, the > reference indicates loading the private key to engine instance. > > My requirement is to call the ENGINE_set_load_privkey_function so that > the

Re: ENGINE_load_private_key does not get invoked

2020-04-20 Thread Mahendra SP
Hi Dmitry Belyavsky, Thank you for the inputs. If I understand correctly, the reference indicates loading the private key to engine instance. My requirement is to call the ENGINE_set_load_privkey_function so that the callback gets called before each RSA private key operation. Reason being, applic

Re: ENGINE_load_private_key does not get invoked

2020-04-20 Thread Dmitry Belyavsky
Dear Mahendra, Take a look at the load_key function in the apps/apps.c as a referent example. On Mon, Apr 20, 2020 at 2:34 PM Mahendra SP wrote: > Hi All, > > While writing the engine implementation for private key encryption and > decryption, I need to get the private key from external source.

ENGINE_load_private_key does not get invoked

2020-04-20 Thread Mahendra SP
Hi All, While writing the engine implementation for private key encryption and decryption, I need to get the private key from external source. ENGINE_set_load_privkey_function(e, load_tpm_private_key) Above API is success. RSA structure is as below. RSA_METHOD my_rsa_struct = { "MY RSA method"