Re: [Firebird-devel] Crypt key callback on Embedded
> Try this with example - you should get meaningful diags about missing > key. But pay attention - that's diags from crypt plugin, i.e. it depends > upon plugin how to react to missing callback (which means missing key > provided by current client). BTW, in some usage schemas callback is not > needed at all - if crypt plugin gets key in some other way. Thanks. Given I can't currently easily pass back the interface, I'll leave for some long winter night to test it and maybe find some reasonable hack to wrap some managed code into native interface. Over the wire it works nicely. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- 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] Crypt key callback on Embedded
On 28.08.2017 17:47, Jiří Činčura wrote: Ahh - agreed, the reason why lib failed to load is missing in diags. Bad luck for me. The Callback.dll is actually loaded fine (at least from OS perspective): 16:41:38,1377272ConsoleApp1.exe 7240Load Image C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\ConsoleApp1\bin\Debug\fb\plugins\Callback.dll SUCCESS Image Base: 0x6d08, Image Size: 0x2c000 Not sure what happened then in Firebird. Maybe the Callback.dll isn't happy because I haven't provided any callback? Try this with example - you should get meaningful diags about missing key. But pay attention - that's diags from crypt plugin, i.e. it depends upon plugin how to react to missing callback (which means missing key provided by current client). BTW, in some usage schemas callback is not needed at all - if crypt plugin gets key in some other way. -- 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] Crypt key callback on Embedded
There's nothing after this. No further attempts to load anything. Just exception from Firebird and then my application closes from application side of things. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ On Mon, Aug 28, 2017, at 16:51, Dimitry Sibiryakov wrote: > 28.08.2017 16:47, Jiří Činčura wrote: > > Not sure what happened then in Firebird. Maybe the > > Callback.dll isn't> > happy because I haven't provided any callback? > >No. At the point of the error no interface is called yet. Look at >further events, may > be some dependecies are missing. > > > -- >WBR, SD. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Crypt key callback on Embedded
> Ahh - agreed, the reason why lib failed to load is missing in diags. Bad luck for me. The Callback.dll is actually loaded fine (at least from OS perspective): 16:41:38,1377272ConsoleApp1.exe 7240Load Image C:\Users\Jiri\Documents\devel\NETProvider\working\Provider\src\ConsoleApp1\bin\Debug\fb\plugins\Callback.dll SUCCESS Image Base: 0x6d08, Image Size: 0x2c000 Not sure what happened then in Firebird. Maybe the Callback.dll isn't happy because I haven't provided any callback? > May be you need fb_database_crypt_callback() call? > Second parameter (void*) is actually a pointer to callback interface. That's my problem. I don't think I can marshal the callback interface (I can marshal simple pointer to a function), because I can't create such interface in C#, obviously. :( -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- 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] Crypt key callback on Embedded
On 28.08.2017 17:18, Jiří Činčura wrote: Jiri, please take a look at the sample provided with FB3 - it works with both embedded & remote. I'm looking at that. But I don't know why the loading is failing (while the same setup work in server mode). It would be nice to have bit more verbosity, maybe in log (but there's nothing). Ahh - agreed, the reason why lib failed to load is missing in diags. BTW is the callback registration expected to work with "old" (non-OO) API? May be you need fb_database_crypt_callback() call? Second parameter (void*) is actually a pointer to callback interface. -- 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] Crypt key callback on Embedded
> Jiri, please take a look at the sample provided with FB3 - it works with > both embedded & remote. I'm looking at that. But I don't know why the loading is failing (while the same setup work in server mode). It would be nice to have bit more verbosity, maybe in log (but there's nothing). BTW is the callback registration expected to work with "old" (non-OO) API? -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- 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] Crypt key callback on Embedded
>Most likely bitness of plugin DLL doesn't match bitness of fbclient. Both 64bit. In fact I'm using same "installation" for server and there it works fine. Callback.dll: File Version Information: File Version: 1.0.0.1 Product Version: 1.0.0.1 File Type: 0x0002 (Dynamic-link library) File Subtype: 0x File Flags Mask: 0x003F File Flags:0x String File Information: 1033 (English (United States)) CompanyName: IBPhoenix FileDescription: AES128 database encryption plugin FileVersion: 1.0.0.1 LegalCopyright: IBPhoenix ProductName: IBPhoenix database encryption plugin ProductVersion: 1.0 File Header: Machine: 0x8664 (AMD64) Number of Sections:12 Time Date Stamp: 0x56BB615F (10.02.2016 18:12:15) Pointer to Symbol Table: 0x Number of Symbols: 0 Size of Optional Header: 0x00F0 (240) Characteristics: 0x222E File is executable Line numbers stripped from file Local symbols stripped from file App can handle >2GB addresses Debugging info stripped from file in .DBG file File is a DLL fbclient.dll: File Version Information: File Version: 3.0.2.32703 Product Version: 3.0.2.32703 File Type: 0x0001 (Application) File Subtype: 0x File Flags Mask: 0x0002 File Flags:0x0022 Prerelease Special build String File Information: 1033 (English (United States)) Comments:This product created by the Firebird - All Copyright (c) retained by the individual contributors - original code Copyright (c) 2000 Inprise Corporation and predecessors. CompanyName: Firebird Project FileDescription: Firebird SQL Server FileVersion: WI-V3.0.2.32703 InternalName:Firebird LegalCopyright: All Copyright (c) retained by individual contributors - original code Copyright (c) 2000 Inprise Corporation ProductName: Firebird SQL Server ProductVersion: 3.0.2.32703 SpecialBuild:Firebird 3.0 File Header: Machine: 0x8664 (AMD64) Number of Sections:6 Time Date Stamp: 0x58D0ED79 (21.03.2017 11:08:09) Pointer to Symbol Table: 0x Number of Symbols: 0 Size of Optional Header: 0x00F0 (240) Characteristics: 0x2022 File is executable App can handle >2GB addresses File is a DLL -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- 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] Crypt key callback on Embedded
Hi *, how's the crypt key callback expected to work on Embedded? So far I haven't done anything to the .NET code, but when I try to connect to an encrypted database I get: Error loading plugin Callback Module \plugins/Callback exists but can not be loaded Not sure whether it's because I haven't provided any callback in the first place or it's something else. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ -- 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