| 256 | } |
| 257 | |
| 258 | int CryptKeyHolder::keyCallback(CheckStatusWrapper* status, ICryptKeyCallback* callback) |
| 259 | { |
| 260 | if (key != 0) |
| 261 | return 1; |
| 262 | |
| 263 | IConfigEntry* confEntry = getEntry(status, "Auto"); |
| 264 | |
| 265 | if (confEntry) |
| 266 | { |
| 267 | FB_BOOLEAN b = confEntry->getBoolValue(); |
| 268 | confEntry->release(); |
| 269 | |
| 270 | if (b) |
| 271 | { |
| 272 | confEntry = getEntry(status, "Key"); |
| 273 | if (confEntry) |
| 274 | { |
| 275 | key = confEntry->getIntValue(); |
| 276 | confEntry->release(); |
| 277 | } |
| 278 | else |
| 279 | key = 0x5a; |
| 280 | |
| 281 | return 1; |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | if (callback && callback->callback(0, NULL, 1, &key) != 1) |
| 286 | { |
| 287 | key = 0; |
| 288 | return 0; |
| 289 | } |
| 290 | |
| 291 | return 1; |
| 292 | } |
| 293 | |
| 294 | ICryptKeyCallback* CryptKeyHolder::keyHandle(CheckStatusWrapper* status, const char* keyName) |
| 295 | { |
nothing calls this directly
no test coverage detected