MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / initPassphraseHandler

Method initPassphraseHandler

base/poco/NetSSL_OpenSSL/src/SSLManager.cpp:367–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365
366
367void 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
394void SSLManager::initCertificateHandler(bool server)

Callers

nothing calls this directly

Calls 4

getStringMethod · 0.45
hasFactoryMethod · 0.45
getFactoryMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected