According to the Specification in POCO assistant:
Initialize the NetSSL library, as well as the underlying OpenSSL libraries, by calling Poco::Crypto::OpenSSLInitializer::initialize(). Should be called before using any class from the NetSSL library. The NetSSL will be initialized automatically, through Poco::Crypto::OpenSSLInitializer instances or similar mechanisms when creating Context or SSLManager instances. However, it is recommended to call initializeSSL() in any case at application startup.
When I want to use HTTPSClientSession
,do I have to construct an Application object first?
How can I use it in Client? Any guy can tell me ?Thank you very much!
Let's take Net/samples/httpget as an example, let's copy httpget/ as a new httpsget directory:
const Context::Ptr context = new Context(Context::CLIENT_USE, "", "", "", Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
HTTPSClientSession session(uri.getHost(), uri.getPort(), context);
Summary: