Hello, All.

Firebird 3.0.4.32939. Default configuration. Key holder is set in databases.conf for single database.

When I use "alter database encrypt" within embedded connection I see following sequence of calls to my key holder plugin:

createPlugin is returning new KeyFileHolder object 001ec6c0
001ec6c0::keyCallback(00469770) returning 1
001ec6c0::keyHandle("AES256.AAA")
001ec6c0::00469770->callback returned 1
File name is Z
001ec6dc::CallbackInterface::callback(10, 0018e7a8, 32, 001e7bf0)
useOnlyOwnKeys returns 0
KeyFileHolder 001ec6c0 destructed

createPlugin is returning new KeyFileHolder object 001ec6c0
001ec6c0::keyCallback(00469770) returning 1
001ec6c0::keyHandle("AES256.AAA")
001ec6c0::00469770->callback returned 1
File name is Z
001ec6dc::CallbackInterface::callback(10, 0018e718, 32, 001ec930)
useOnlyOwnKeys returns 0
KeyFileHolder 001ec6c0 destructed

createPlugin is returning new KeyFileHolder object 001ec6c0
001ec6c0::keyCallback(00469770) returning 1
001ec6c0::keyHandle("AES256.AAA")
001ec6c0::00469770->callback returned 1
File name is Z
001ec6dc::CallbackInterface::callback(10, 0414eb78, 32, 001ecb50)
useOnlyOwnKeys returns 0
KeyFileHolder 001ec6c0 destructed

Could someone tell me why it is called three times in row, obviously from three different instances of crypt plugin (according to the last pointer in callback() call)? I thought that one instance is enough for one database in superserver mode.

  Next, when I try to do the same over wire, I see following sequence:

createPlugin is returning new KeyFileHolder object 009f84f8
009f84f8::keyCallback(00380a10) returning 1
KeyFileHolder 009f84f8 destructed

createPlugin is returning new KeyFileHolder object 009f84f8
009f84f8::keyCallback(00380a00) returning 1
009f84f8::keyHandle("AES256.AAA")
009f84f8::00380a00->callback returned 0
KeyFileHolder 009f84f8 destructed

Here two instances are receiving different callback interfaces and that one which is really called from crypt plugin cannot get key information from application. Why?
  Is it the limitation of Firebird or a bug in my plugin?

--
  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

Reply via email to