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
16
17#ifndef NetSSL_KeyConsoleHandler_INCLUDED
18#define NetSSL_KeyConsoleHandler_INCLUDED
19
20
21#include "Poco/Net/NetSSL.h"
22#include "Poco/Net/PrivateKeyPassphraseHandler.h"
23
24
25namespace Poco {
26namespace Net {
27
28
29class NetSSL_API KeyConsoleHandler: public PrivateKeyPassphraseHandler
30 /// An implementation of PrivateKeyPassphraseHandler that
31 /// reads the key for a certificate from the console.
32{
33public:
34 KeyConsoleHandler(bool server);
35 /// Creates the KeyConsoleHandler.
36
37 ~KeyConsoleHandler();
38 /// Destroys the KeyConsoleHandler.
39
40 void onPrivateKeyRequested(const void* pSender, std::string& privateKey);
41};
42
43
44} } // namespace Poco::Net
45
46
47#endif // NetSSL_KeyConsoleHandler_INCLUDED
48