mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
fixed cert chain verification and samples
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
HTTPSTimeServer.format = %W, %e %b %y %H:%M:%S %Z
|
||||
HTTPSTimeServer.port = 9443
|
||||
|
||||
schannel.server.certificateName = ${system.nodeName}
|
||||
schannel.server.certificatePath = ${application.configDir}any.pfx
|
||||
schannel.server.privateKeyPassphraseHandler.name = KeyFileHandler
|
||||
schannel.server.privateKeyPassphraseHandler.options.password = secret
|
||||
schannel.server.verificationMode = none
|
||||
schannel.server.useMachineStore = false
|
||||
schannel.server.useStrongCrypto = true
|
||||
|
BIN
NetSSL_Win/samples/HTTPSTimeServer/any.pfx
Normal file
BIN
NetSSL_Win/samples/HTTPSTimeServer/any.pfx
Normal file
Binary file not shown.
@@ -18,6 +18,7 @@
|
||||
#include "Poco/Net/StringPartSource.h"
|
||||
#include "Poco/Net/SSLManager.h"
|
||||
#include "Poco/Net/ConsoleCertificateHandler.h"
|
||||
#include "Poco/Net/PrivateKeyPassphraseHandler.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/Exception.h"
|
||||
@@ -83,7 +84,7 @@ int main(int argc, char** argv)
|
||||
// Note: we must create the passphrase handler prior Context
|
||||
SharedPtr<InvalidCertificateHandler> pCert = new ConsoleCertificateHandler(false); // ask the user via console
|
||||
Context::Ptr pContext = new Context(Context::CLIENT_USE, "");
|
||||
SSLManager::instance().initializeClient(pCert, pContext);
|
||||
SSLManager::instance().initializeClient(0, pCert, pContext);
|
||||
|
||||
MailMessage message;
|
||||
message.setSender(sender);
|
||||
|
@@ -75,7 +75,7 @@ int main(int argc, char** argv)
|
||||
|
||||
SharedPtr<InvalidCertificateHandler> pCertHandler = new ConsoleCertificateHandler(false); // ask the user via console
|
||||
Context::Ptr pContext = new Context(Context::CLIENT_USE, "");
|
||||
SSLManager::instance().initializeClient(pCertHandler, pContext);
|
||||
SSLManager::instance().initializeClient(0, pCertHandler, pContext);
|
||||
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user