KeyConsoleHandler.h 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // KeyConsoleHandler.h
  3. //
  4. // Library: NetSSL_OpenSSL
  5. // Package: SSLCore
  6. // Module: KeyConsoleHandler
  7. //
  8. // Definition of the KeyConsoleHandler class.
  9. //
  10. // Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef NetSSL_KeyConsoleHandler_INCLUDED
  16. #define NetSSL_KeyConsoleHandler_INCLUDED
  17. #include "Poco/Net/NetSSL.h"
  18. #include "Poco/Net/PrivateKeyPassphraseHandler.h"
  19. namespace Poco {
  20. namespace Net {
  21. class NetSSL_API KeyConsoleHandler: public PrivateKeyPassphraseHandler
  22. /// An implementation of PrivateKeyPassphraseHandler that
  23. /// reads the key for a certificate from the console.
  24. {
  25. public:
  26. KeyConsoleHandler(bool server);
  27. /// Creates the KeyConsoleHandler.
  28. ~KeyConsoleHandler();
  29. /// Destroys the KeyConsoleHandler.
  30. void onPrivateKeyRequested(const void* pSender, std::string& privateKey);
  31. };
  32. } } // namespace Poco::Net
  33. #endif // NetSSL_KeyConsoleHandler_INCLUDED