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

Method addServerKeys

src/remote/remote.cpp:1311–1347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1309}
1310
1311void rem_port::addServerKeys(const CSTRING* passedStr)
1312{
1313 ClumpletReader newKeys(ClumpletReader::UnTagged,
1314 passedStr->cstr_address, passedStr->cstr_length);
1315
1316 PathName type, plugins, plugin;
1317 unsigned len;
1318 KnownServerKey* currentKey = nullptr;
1319 for (newKeys.rewind(); !newKeys.isEof(); newKeys.moveNext())
1320 {
1321 switch(newKeys.getClumpTag())
1322 {
1323 case TAG_KEY_TYPE:
1324 newKeys.getPath(type);
1325 break;
1326 case TAG_KEY_PLUGINS:
1327 newKeys.getPath(plugins);
1328 plugins += ' ';
1329 plugins.insert(0, " ");
1330 currentKey = &port_known_server_keys.add();
1331 currentKey->type = type;
1332 currentKey->plugins = plugins;
1333 break;
1334 case TAG_PLUGIN_SPECIFIC:
1335 plugin.assign(newKeys.getBytes(), newKeys.getClumpLength());
1336 len = strlen(plugin.c_str()) + 1;
1337 if (len < plugin.length())
1338 {
1339 const char* data = &plugin[len];
1340 len = plugin.length() - len;
1341 plugin.recalculate_length();
1342 currentKey->addSpecificData(plugin, len, data);
1343 }
1344 break;
1345 }
1346 }
1347}
1348
1349bool rem_port::tryNewKey(InternalCryptKey* cryptKey)
1350{

Callers 2

INET_analyzeFunction · 0.80
authReceiveResponseFunction · 0.80

Calls 14

getClumpTagMethod · 0.80
getPathMethod · 0.80
getClumpLengthMethod · 0.80
recalculate_lengthMethod · 0.80
rewindMethod · 0.45
isEofMethod · 0.45
moveNextMethod · 0.45
insertMethod · 0.45
addMethod · 0.45
assignMethod · 0.45
getBytesMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected