summaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp
diff options
context:
space:
mode:
authorDevtools Arcadia <[email protected]>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <[email protected]>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp')
-rw-r--r--contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp b/contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp
new file mode 100644
index 00000000000..a0a144216e0
--- /dev/null
+++ b/contrib/libs/poco/NetSSL_OpenSSL/src/KeyConsoleHandler.cpp
@@ -0,0 +1,40 @@
+//
+// KeyConsoleHandler.cpp
+//
+// Library: NetSSL_OpenSSL
+// Package: SSLCore
+// Module: KeyConsoleHandler
+//
+// Copyright (c) 2006-2009, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// SPDX-License-Identifier: BSL-1.0
+//
+
+
+#include "Poco/Net/KeyConsoleHandler.h"
+#include <iostream>
+
+
+namespace Poco {
+namespace Net {
+
+
+KeyConsoleHandler::KeyConsoleHandler(bool server):PrivateKeyPassphraseHandler(server)
+{
+}
+
+
+KeyConsoleHandler::~KeyConsoleHandler()
+{
+}
+
+
+void KeyConsoleHandler::onPrivateKeyRequested(const void* /*pSender*/, std::string& privateKey)
+{
+ std::cout << "Please enter the passphrase for the private key: ";
+ std::cin >> privateKey;
+}
+
+
+} } // namespace Poco::Net