8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 21:23:03 +01:00

Backported fix #6896: Client forcing server to encryption

This commit is contained in:
AlexPeshkoff 2021-07-20 19:29:38 +03:00
parent dfe8222fe2
commit 3a5e960e67

View File

@ -6130,12 +6130,15 @@ void rem_port::start_crypt(P_CRYPT * crypt, PACKET* sendL)
{ {
ICryptKey* key = NULL; ICryptKey* key = NULL;
PathName keyName(crypt->p_key.cstr_address, crypt->p_key.cstr_length); PathName keyName(crypt->p_key.cstr_address, crypt->p_key.cstr_length);
for (unsigned k = 0; k < port_crypt_keys.getCount(); ++k) if (getPortConfig()->getWireCrypt(WC_SERVER) != WIRE_CRYPT_DISABLED)
{ {
if (keyName == port_crypt_keys[k]->keyName) for (unsigned k = 0; k < port_crypt_keys.getCount(); ++k)
{ {
key = port_crypt_keys[k]; if (keyName == port_crypt_keys[k]->keyName)
break; {
key = port_crypt_keys[k];
break;
}
} }
} }