NetSSL library refactoring

This commit is contained in:
Guenter Obiltschnig
2009-02-23 20:56:01 +00:00
parent f345a6c6e2
commit 75a07d7983
103 changed files with 9549 additions and 1453 deletions

View File

@@ -1,7 +1,7 @@
//
// download.cpp
//
// $Id: //poco/svn/NetSSL_OpenSSL/samples/download/src/download.cpp#1 $
// $Id: //poco/Main/NetSSL_OpenSSL/samples/download/src/download.cpp#8 $
//
// This sample demonstrates the URIStreamOpener class.
//
@@ -81,18 +81,10 @@ int main(int argc, char** argv)
}
// Note: we must create the passphrase handler prior Context
SharedPtr<PrivateKeyPassphraseHandler> ptrConsole = new KeyConsoleHandler(false); // ask the user via console for the pwd
SharedPtr<InvalidCertificateHandler> ptrCert = new ConsoleCertificateHandler(false); // ask the user via console
SharedPtr<Context> ptrContext = new Context("any.pem", "rootcert.pem", false, Context::VERIFY_RELAXED, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
SSLManager::instance().initializeClient(ptrConsole, ptrCert, ptrContext);
Context::Ptr ptrContext = new Context(Context::CLIENT_USE, "", "", "rootcert.pem", Context::VERIFY_RELAXED, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
SSLManager::instance().initializeClient(0, ptrCert, ptrContext);
// init of server part is not required, but we keep the code here as an example
/*
ptrConsole = new KeyConsoleHandler(true); // ask the user via console for the pwd
ptrCert = new ConsoleCertificateHandler(true); // ask the user via console
ptrContext = new Context("any.pem", "rootcert.pem", true, Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
SSLManager::instance().initializeServer(ptrConsole, ptrCert, ptrContext);
*/
try
{
URI uri(argv[1]);