MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / wireEncryption

Function wireEncryption

src/remote/server/server.cpp:1901–1929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1899
1900
1901bool wireEncryption(rem_port* port, ClumpletReader& id)
1902{
1903 if (port->port_type == rem_port::XNET) // local connection
1904 {
1905 port->port_crypt_level = WIRECRYPT_DISABLED;
1906 return false;
1907 }
1908
1909 int clientCrypt = id.find(CNCT_client_crypt) ? id.getInt() : WIRE_CRYPT_ENABLED;
1910 switch(clientCrypt)
1911 {
1912 case WIRE_CRYPT_REQUIRED:
1913 case WIRE_CRYPT_ENABLED:
1914 case WIRE_CRYPT_DISABLED:
1915 break;
1916 default:
1917 clientCrypt = WIRE_CRYPT_ENABLED;
1918 break;
1919 }
1920
1921 int serverCrypt = port->getPortConfig()->getWireCrypt(WC_SERVER);
1922 if (wcCompatible[clientCrypt][serverCrypt] == WIRECRYPT_BROKEN)
1923 {
1924 Arg::Gds(isc_wirecrypt_incompatible).raise();
1925 }
1926
1927 port->port_crypt_level = wcCompatible[clientCrypt][serverCrypt];
1928 return wcCompatible[clientCrypt][serverCrypt] >= WIRECRYPT_ENABLED;
1929}
1930
1931
1932class ConnectAuth : public ServerAuth

Callers 1

accept_connectionFunction · 0.85

Calls 6

GdsClass · 0.85
getWireCryptMethod · 0.80
getPortConfigMethod · 0.80
findMethod · 0.45
getIntMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected