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

Method PluginData

examples/extauth/ExtAuth.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100{
101public:
102 PluginData(ThrowStatusWrapper* status, IPluginConfig* cnf)
103 : refCounter(0), owner(NULL), iniLvl(0)
104 {
105 hash.init(status);
106 iniLvl = 1;
107 pseudoRand.init(status);
108 iniLvl = 2;
109
110 AutoRelease<IConfig> conf(cnf->getDefaultConfig(status));
111 if (!conf)
112 return;
113 AutoRelease<IConfigEntry> ce(conf->find(status, "Key"));
114 if (!ce)
115 return;
116
117 // import a key
118 unsigned char key[4096];
119 unsigned keySize = readHexKey(status, ce->getValue(), key, sizeof(key));
120 check(status, rsa_import(key, keySize, &privateKey),
121 "ExtAuth plugin failed to initialize - error importing private RSA key");
122 iniLvl = 3;
123 }
124
125 ~PluginData()
126 {

Callers

nothing calls this directly

Calls 7

readHexKeyFunction · 0.85
rsa_importFunction · 0.85
checkFunction · 0.70
initMethod · 0.45
getDefaultConfigMethod · 0.45
findMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected