Re: [Firebird-devel] Suppress database encryption callback

2018-04-13 Thread Paul Beach

> 13.04.2018 17:01, Mark Rotteveel wrote:
> > Let me rephrase: exactly what causes Firebird to perform a callback to the 
> > client, and 
> > what must a KeyHolderPlugin do to make sure no callback is performed.
> 
>Firebird calls client callback when key holder in keyCallback() calls the 
> callback 
> received in parameters.
>If the holder don't call the callback - no callback is performed.
> 
>Code example:
> 
> int KeyHolderSample::keyCallback(CheckStatusWrapper* status, 
> ICryptKeyCallback* callback)
> {
> // Here Firebird will send callback request to client
> // Comment this line out to disable client callback
>  return callback->callback(0, NULL, sizeof(Buffer), Buffer);
> }

S in theory, you could put an if scenario around that...
i.e. if KeyFile no callback
if Callback, callback?

Correct?

Regards
Paul 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Suppress database encryption callback

2018-04-13 Thread Dimitry Sibiryakov

13.04.2018 17:01, Mark Rotteveel wrote:
Let me rephrase: exactly what causes Firebird to perform a callback to the client, and 
what must a KeyHolderPlugin do to make sure no callback is performed.


  Firebird calls client callback when key holder in keyCallback() calls the callback 
received in parameters.

  If the holder don't call the callback - no callback is performed.

  Code example:

int KeyHolderSample::keyCallback(CheckStatusWrapper* status, ICryptKeyCallback* 
callback)
{
   // Here Firebird will send callback request to client
   // Comment this line out to disable client callback
return callback->callback(0, NULL, sizeof(Buffer), Buffer);
}


--
  WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Suppress database encryption callback

2018-04-13 Thread Mark Rotteveel

On 13-4-2018 16:56, Dimitry Sibiryakov wrote:

13.04.2018 16:47, Mark Rotteveel wrote:
The person reporting the problem indicates a different plugin did not 
have this problem, which would indicate there is a way to suppress the 
callback. What does the plugin need to do to not perform a callback?


   It must be a plugin that never call the callback.
   Key holder plugin has no information at hand to decide if it must 
call the callback or must not to, so there are plugins that call it 
unconditionally and plugins that never call it.
   Of course, it is also possible to create a plugin with configurable 
setting "disable callback", but such setting has no practical use.


Let me rephrase: exactly what causes Firebird to perform a callback to 
the client, and what must a KeyHolderPlugin do to make sure no callback 
is performed.


Mark
--
Mark Rotteveel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Suppress database encryption callback

2018-04-13 Thread Dimitry Sibiryakov

13.04.2018 16:47, Mark Rotteveel wrote:
The person reporting the problem indicates a different plugin did not have this problem, 
which would indicate there is a way to suppress the callback. What does the plugin need to 
do to not perform a callback?


  It must be a plugin that never call the callback.
  Key holder plugin has no information at hand to decide if it must call the callback or 
must not to, so there are plugins that call it unconditionally and plugins that never call it.
  Of course, it is also possible to create a plugin with configurable setting "disable 
callback", but such setting has no practical use.


--
  WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Suppress database encryption callback

2018-04-13 Thread Mark Rotteveel
I'm currently looking at a problem with Jaybird (which doesn't support 
the callback) and a plugin that performs the callback when I think it 
shouldn't. If I modify Jaybird to send an empty buffer in response, it 
works fine.


The person reporting the problem indicates a different plugin did not 
have this problem, which would indicate there is a way to suppress the 
callback. What does the plugin need to do to not perform a callback?

--
Mark Rotteveel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel