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

Method CryptKeyTypeManager

src/remote/server/server.cpp:1155–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1153
1154public:
1155 explicit CryptKeyTypeManager(MemoryPool& p)
1156 : PermanentStorage(p), knownTypes(getPool())
1157 {
1158 LocalStatus ls;
1159 CheckStatusWrapper st(&ls);
1160 for (GetPlugins<IWireCryptPlugin> cpItr(IPluginManager::TYPE_WIRE_CRYPT); cpItr.hasData(); cpItr.next())
1161 {
1162 WIRECRYPT_DEBUG(fprintf(stderr, "CryptKeyTypeManager %s\n", cpItr.name()));
1163
1164 const char* list = cpItr.plugin()->getKnownTypes(&st);
1165 check(&st);
1166 fb_assert(list);
1167 PathName tmp(list);
1168 ParsedList newTypes(tmp);
1169
1170 PathName plugin(cpItr.name());
1171 for (unsigned i = 0; i < newTypes.getCount(); ++i)
1172 {
1173 unsigned l;
1174 bool hasSpecific = cpItr.plugin()->getSpecificData(&st, newTypes[i].c_str(), &l) != nullptr;
1175
1176 bool found = false;
1177 for (unsigned j = 0; j < knownTypes.getCount(); ++j)
1178 {
1179 if (knownTypes[j] == newTypes[i])
1180 {
1181 knownTypes[j].add(plugin, hasSpecific);
1182 found = true;
1183 break;
1184 }
1185 }
1186
1187 if (!found)
1188 {
1189 knownTypes.add().set(newTypes[i], plugin, hasSpecific);
1190 }
1191 }
1192 }
1193 }
1194
1195 PathName operator[](const PathName& keyType) const
1196 {

Callers

nothing calls this directly

Calls 11

pluginMethod · 0.80
checkFunction · 0.50
hasDataMethod · 0.45
nextMethod · 0.45
nameMethod · 0.45
getKnownTypesMethod · 0.45
getCountMethod · 0.45
getSpecificDataMethod · 0.45
c_strMethod · 0.45
addMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected