On 04/14/18 13:14, Dimitry Sibiryakov wrote:
Hello, All.
What is a meaning of return value of keyCallback() routine?
It is declared as int, not FB_BOOLEAN, so I guess it is not a flag
"use me". But it looks like the engine give up if zero is returned
even if no error is set in status.
Documentation tells nothing about that.
Format of callback was added before introduction of FB_BOOLEAN and
unfortunately skipped later when moving to cloop. So it has K&R style of
zero/not-zero int usage.
BTW, is there a way to distinguish cases when
a) ICryptKeyCallback::callback() returned zero because application key
not needed
b) Application callback is not set
Both cases are normal - return non-zro here.
c) Key plugin is refused by application as a fake one.
In this case it's good to raise an error in status parameter.
In cases a) and b) key holder still must be in use providing
encryption key from internal sources.
------------------------------------------------------------------------------
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