Library: NetSSL_OpenSSL
Package: SSLCore
Header: Poco/Net/Context.h
This class encapsulates an SSL Context.
Member Functions: serverContext, sslContext, verificationMode
typedef Poco::SharedPtr < Context > Ptr;
VERIFY_NONE = 0x00
VERIFY_RELAXED = 0x01
VERIFY_STRICT = 0x02
VERIFY_ONCE = 0x04
Context(
const std::string & privateKeyFile,
const std::string & caLocation,
bool isServerContext,
VerificationMode verMode = VERIFY_STRICT,
int verificationDepth = 9,
bool loadCAFromDefaultPath = false,
const std::string & cypherList = "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
);
Creates a context. privateKeyFile contains the key used for encryption, caLocation can either be a directory or a single file containing the certificates for certificate authorities. isServerContext defines if the context belongs to a server or client. verificationDepth sets the upper limit for verification chain sizes. If we encounter a chain larger than that limit, verification will fail. Cypherlist defines which protocols are allowed. Creates the Context.
~Context();
Destroys the Context.
bool serverContext() const;
Returns true iff the context is for a server.
SSL_CTX * sslContext() const;
Returns the OpenSSL SSL Context object.
Context::VerificationMode verificationMode() const;
Returns the verification mode.