Debug for decryption in passwordless transfer

This commit is contained in:
Alexey Khromov 2025-03-20 12:28:07 +03:00
parent 324b11aad7
commit 4e86852c41
2 changed files with 7 additions and 4 deletions

View File

@ -209,8 +209,11 @@ int binkp_loop(s_binkp_state *bstate) {
log("read: remote socket shutdown");
return PRC_REMOTEABORTED;
}
if (bstate->mode==bmode_transfer && bstate->remote_data->options & BINKP_OPT_CRYPT)
decrypt_buf(readbuf+read_pos, n, bstate->remote_data->keys_in);
if (bstate->mode==bmode_transfer && bstate->remote_data->options & BINKP_OPT_CRYPT) {
decrypt_buf(readbuf+read_pos, n, bstate->remote_data->keys_in)
} else {
DEB((D_24554,"binkp: not encripted transfer"));
};
DEB((D_24554, "got %d bytes", n));
want_read -= n;
read_pos += n;
@ -1150,7 +1153,7 @@ void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer)
}
else
strnxcpy(remote_data->opt, buffer+4, sizeof(remote_data->opt));
DEB((D_24554,"Process OPT"));
binkp_parse_options(remote_data, buffer+4);
}
else if( strncmp(buffer, "VER ", 4) == 0 )

View File

@ -304,7 +304,7 @@ void binkp_set_sysinfo(s_binkp_sysinfo *binkp, s_faddr *remote_addr, bool caller
void binkp_parse_options(s_binkp_sysinfo *binkp, char *options)
{
char *p, *n;
DEB((D_24554,"binkp: parse_options: %s", options));
for( p = string_token(options, &n, NULL, 0); p;
p = string_token(NULL, &n, NULL, 0) )
{