On 04/17/18 16:21, Mark Rotteveel wrote:
On 12-4-2018 16:51, Alex Peshkoff via Firebird-devel wrote:
There was a bug in v.13 - size of respond buffer was not passed
over the wire.
Ok, so in V13 one would only need to read the data buffer, and in
v14 and higher, one would also need to read p_cc_reply value?
Yes, and if you have v13 here you may return empty data to the server
at once - no chance for successfull handshake.
It seems to work fine for Firebird ADO.net provider though. So exactly
what is the meaning of p_cc_reply value
Sizeof buffer allocated for reply.
and what would happen if I write more
Extra data (>p_cc_reply) will be lost.
(or less)
This is normal. Typically buffers are chosen to fit all data and have
some reserve.
Special value is zero - it means that data source interface can't sent
something reasonable as a reply, i.e. handshake error and no key will be
passed. Also nothing extra-ordinary - key may be jyust not needed or
will be transfered to another KeyHolder.
data than that value? Will I crash Firebird because I overflow a buffer?
Should not - but please try :)
Also is protocol v15 also Firebird 3? And if so, what is the
difference with v13/v14?
Look at protocol.h:
// Protocol 15:
// - supports crypt key callback at connect phase
const USHORT PROTOCOL_VERSION15 = (FB_PROTOCOL_FLAG | 15);
I.e. supports a case when a key should be transfered to server before
connect (connect - not attach database !!!) completion. Needed first of
all to support encrypted security database. Makes almost no sense for
dedicated security database but required when some database is self
security database.
------------------------------------------------------------------------------
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