| 365 | |
| 366 | |
| 367 | void SSLManager::initPassphraseHandler(bool server) |
| 368 | { |
| 369 | if (server && _ptrServerPassphraseHandler) return; |
| 370 | if (!server && _ptrClientPassphraseHandler) return; |
| 371 | |
| 372 | std::string prefix = server ? CFG_SERVER_PREFIX : CFG_CLIENT_PREFIX; |
| 373 | Poco::Util::AbstractConfiguration& config = appConfig(); |
| 374 | |
| 375 | std::string className(config.getString(prefix + CFG_DELEGATE_HANDLER, VAL_DELEGATE_HANDLER)); |
| 376 | |
| 377 | const PrivateKeyFactory* pFactory = 0; |
| 378 | if (privateKeyFactoryMgr().hasFactory(className)) |
| 379 | { |
| 380 | pFactory = privateKeyFactoryMgr().getFactory(className); |
| 381 | } |
| 382 | |
| 383 | if (pFactory) |
| 384 | { |
| 385 | if (server) |
| 386 | _ptrServerPassphraseHandler = pFactory->create(server); |
| 387 | else |
| 388 | _ptrClientPassphraseHandler = pFactory->create(server); |
| 389 | } |
| 390 | else throw Poco::Util::UnknownOptionException(std::string("No passphrase handler known with the name ") + className); |
| 391 | } |
| 392 | |
| 393 | |
| 394 | void SSLManager::initCertificateHandler(bool server) |
nothing calls this directly
no test coverage detected