Re: [Firebird-devel] Database encryption

2018-04-02 Thread Dimitry Sibiryakov
02.04.2018 18:40, Alex Peshkoff via Firebird-devel wrote: It does not receive key name. chainHandle does transfer all keys application wants to send to the server. I see. It does that a way before server get to know if the database is encrypted at all. Wonderful: one key holder can get app

Re: [Firebird-devel] Database encryption

2018-04-02 Thread Alex Peshkoff via Firebird-devel
On 04/02/18 18:57, Dimitry Sibiryakov wrote: 02.04.2018 17:43, Alex Peshkoff via Firebird-devel wrote: - one more closed-source plugin I've used to deal with   Perhaps, it has the same limitations. No.   Could you reveal the secret then: how application callback receives name of crypt key

Re: [Firebird-devel] Database encryption

2018-04-02 Thread Dimitry Sibiryakov
02.04.2018 17:43, Alex Peshkoff via Firebird-devel wrote: - one more closed-source plugin I've used to deal with   Perhaps, it has the same limitations. No. Could you reveal the secret then: how application callback receives name of crypt key if it is called way before the key holder get

Re: [Firebird-devel] Sequence of key holder's methods calls

2018-04-02 Thread Dimitry Sibiryakov
02.04.2018 17:40, Alex Peshkoff via Firebird-devel wrote: With what release of firebird are you building your plugin? I mean first of all .h files. Firebird 3.0.4.32939, freshly built. Default configuration. Key holder is set in databases.conf for single database. Returning to your parti

Re: [Firebird-devel] Database encryption

2018-04-02 Thread Alex Peshkoff via Firebird-devel
On 04/02/18 18:31, Dimitry Sibiryakov wrote: 02.04.2018 17:25, Alex Peshkoff via Firebird-devel wrote: Encryption of database using key passed from application over the wire works well in at least 2 known to me plugins: - DbCrypt_example/KeyHolder_example present in firebird distro   This one

Re: [Firebird-devel] Sequence of key holder's methods calls

2018-04-02 Thread Alex Peshkoff via Firebird-devel
On 04/02/18 17:58, Dimitry Sibiryakov wrote: 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: crea

Re: [Firebird-devel] Sequence of key holder's methods calls

2018-04-02 Thread Dimitry Sibiryakov
02.04.2018 16:58, Dimitry Sibiryakov wrote:   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. B

Re: [Firebird-devel] Database encryption

2018-04-02 Thread Dimitry Sibiryakov
02.04.2018 17:25, Alex Peshkoff via Firebird-devel wrote: Encryption of database using key passed from application over the wire works well in at least 2 known to me plugins: - DbCrypt_example/KeyHolder_example present in firebird distro This one can serve only one key for only one predefine

Re: [Firebird-devel] Database encryption

2018-04-02 Thread Alex Peshkoff via Firebird-devel
On 03/31/18 16:45, Dimitry Sibiryakov wrote: Hello, All.   Is it intentional that database cannot be encrypted via remote connection if encryption plugin requires key obtained from application callback?   I'm getting following error: Statement failed, SQLSTATE = 42000 unsuccessful metadata

[Firebird-devel] Sequence of key holder's methods calls

2018-04-02 Thread Dimitry Sibiryakov
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 obje