fixed cert chain verification and samples

This commit is contained in:
Günter Obiltschnig
2014-10-09 23:56:00 +02:00
parent e271b1a970
commit f65d98f9c1
7 changed files with 91 additions and 95 deletions

View File

@@ -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

Binary file not shown.

View File

@@ -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);

View File

@@ -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
{