On 2021-07-06 07:45, Jiří Činčura wrote:
This is the order of operations. Compression is disabled. FB3 server
has only Srp and Win_Sspi enabled, WireCrypt is Enabled.
op_connect + op_attach
CNCT_user, ...
CNCT_host, ...
CNCT_user_verification,
CNCT_login, ...
CNCT_plugin_name, Srp256
CNCT_specific_data, ...
CNCT_plugin_list, Srp256, Srp
CNCT_client_crypt, Disabled
protocols
As a response I get op_accept_data where:
server data: empty
accepted plugin name: Srp
is authenticated: false
server keys: empty
What should be the response now?
When the response from server is op_cond_accept (as is when
CNCT_client_crypt is i.e. Enabled), I proceed with op_cont_auth,
sending the public key, etc. and all is good. But when I do that now,
I get op_response with 335544375/"unavailable database" error.
If the response is op_accept_data, then the following step would be to
enable compression if you have wire compression, and then send the
op_attach packet with the current plugin in isc_dpb_auth_plugin_name and
the current client data of the plugin in isc_dpb_specific_auth_data.
Depending on whether authentication is complete or not, see also the
code in
https://github.com/mrotteveel/r2dbc-firebird/blob/main/src/main/java/org/firebirdsql/r2dbc/client/DatabaseAttachFlow.java#L457
Given the server responded with Srp, this is a signal to switch to the
next plugin (Srp), so the content of isc_dpb_specific_auth_data will be
the initial client data (phase 1 of Srp, similar to what you put in
CNCT_specific_data for Srp256), not the final client data (phase 2 of
Srp).
Mark
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel