| 100 | { |
| 101 | public: |
| 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 | { |
nothing calls this directly
no test coverage detected