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

Method extractDataFromPluginTo

src/remote/client/interface.cpp:10203–10248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10201}
10202
10203void ClntAuthBlock::extractDataFromPluginTo(ClumpletWriter& dpb,
10204 const ParametersSet* tags,
10205 int protocol)
10206{
10207 if (!dataFromPlugin.hasData())
10208 {
10209 return;
10210 }
10211
10212 PathName pluginName = getPluginName();
10213 if (protocol >= PROTOCOL_VERSION13)
10214 {
10215 if (firstTime)
10216 {
10217 fb_assert(tags->plugin_name && tags->plugin_list);
10218
10219 if (pluginName.hasData())
10220 dpb.insertString(tags->plugin_name, pluginName);
10221
10222 dpb.deleteWithTag(tags->plugin_list);
10223 dpb.insertString(tags->plugin_list, pluginList);
10224 firstTime = false;
10225 HANDSHAKE_DEBUG(fprintf(stderr,
10226 "Cli: extractDataFromPluginTo: first time - added plugName & pluginList\n"));
10227 }
10228 fb_assert(tags->specific_data);
10229 dpb.insertBytes(tags->specific_data, dataFromPlugin.begin(), dataFromPlugin.getCount());
10230
10231 HANDSHAKE_DEBUG(fprintf(stderr,
10232 "Cli: extractDataFromPluginTo: Added %u bytes of spec data with tag %d\n",
10233 static_cast<unsigned>(dataFromPlugin.getCount()), tags->specific_data));
10234
10235 return;
10236 }
10237
10238 if (REMOTE_legacy_auth(pluginName.c_str(), PROTOCOL_VERSION10)) // dataFromPlugin is encrypted password
10239 {
10240 fb_assert(tags->password_enc);
10241 dpb.insertBytes(tags->password_enc, dataFromPlugin.begin(), dataFromPlugin.getCount());
10242 return;
10243 }
10244
10245 fb_assert(REMOTE_legacy_auth(pluginName.c_str(), protocol)); // dataFromPlugin must be trustedAuth
10246 fb_assert(tags->trusted_auth);
10247 dpb.insertBytes(tags->trusted_auth, dataFromPlugin.begin(), dataFromPlugin.getCount());
10248}
10249
10250static inline void makeUtfString(bool uft8Convert, string& s)
10251{

Callers 2

authFillParametersBlockFunction · 0.45
authReceiveResponseFunction · 0.45

Calls 10

REMOTE_legacy_authFunction · 0.85
getDefaultMemoryPoolFunction · 0.85
deleteWithTagMethod · 0.80
hasDataMethod · 0.45
insertStringMethod · 0.45
insertBytesMethod · 0.45
beginMethod · 0.45
getCountMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected