mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
merged doc fixes from develop branch
This commit is contained in:
@@ -119,7 +119,7 @@ public:
|
||||
/// * verificationMode specifies whether and how peer certificates are validated.
|
||||
/// * verificationDepth sets the upper limit for verification chain sizes. Verification
|
||||
/// will fail if a certificate chain larger than this is encountered.
|
||||
/// * loadDefaultCAs specifies wheter the builtin CA certificates from OpenSSL are used.
|
||||
/// * loadDefaultCAs specifies whether the builtin CA certificates from OpenSSL are used.
|
||||
/// * cipherList specifies the supported ciphers in OpenSSL notation.
|
||||
///
|
||||
/// Note: If the private key is protected by a passphrase, a PrivateKeyPassphraseHandler
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
/// * verificationMode specifies whether and how peer certificates are validated.
|
||||
/// * verificationDepth sets the upper limit for verification chain sizes. Verification
|
||||
/// will fail if a certificate chain larger than this is encountered.
|
||||
/// * loadDefaultCAs specifies wheter the builtin CA certificates from OpenSSL are used.
|
||||
/// * loadDefaultCAs specifies whether the builtin CA certificates from OpenSSL are used.
|
||||
/// * cipherList specifies the supported ciphers in OpenSSL notation.
|
||||
///
|
||||
/// Note that a private key and/or certificate must be specified with
|
||||
@@ -226,29 +226,29 @@ public:
|
||||
///
|
||||
/// Specifying a size of 0 will set an unlimited cache size.
|
||||
///
|
||||
/// This method may only be called on SERVER_USE Context objets.
|
||||
/// This method may only be called on SERVER_USE Context objects.
|
||||
|
||||
std::size_t getSessionCacheSize() const;
|
||||
/// Returns the current maximum size of the server session cache.
|
||||
///
|
||||
/// This method may only be called on SERVER_USE Context objets.
|
||||
/// This method may only be called on SERVER_USE Context objects.
|
||||
|
||||
void setSessionTimeout(long seconds);
|
||||
/// Sets the timeout (in seconds) of cached sessions on the server.
|
||||
/// A cached session will be removed from the cache if it has
|
||||
/// not been used for the given number of seconds.
|
||||
///
|
||||
/// This method may only be called on SERVER_USE Context objets.
|
||||
/// This method may only be called on SERVER_USE Context objects.
|
||||
|
||||
long getSessionTimeout() const;
|
||||
/// Returns the timeout (in seconds) of cached sessions on the server.
|
||||
///
|
||||
/// This method may only be called on SERVER_USE Context objets.
|
||||
/// This method may only be called on SERVER_USE Context objects.
|
||||
|
||||
void flushSessionCache();
|
||||
/// Flushes the SSL session cache on the server.
|
||||
///
|
||||
/// This method may only be called on SERVER_USE Context objets.
|
||||
/// This method may only be called on SERVER_USE Context objects.
|
||||
|
||||
void enableExtendedCertificateVerification(bool flag = true);
|
||||
/// Enable or disable the automatic post-connection
|
||||
|
@@ -46,7 +46,7 @@ class NetSSL_API HTTPSClientSession: public HTTPClientSession
|
||||
/// specify the server's host name and port number.
|
||||
///
|
||||
/// Then create a HTTPRequest object, fill it accordingly,
|
||||
/// and pass it as argument to the sendRequst() method.
|
||||
/// and pass it as argument to the sendRequest() method.
|
||||
///
|
||||
/// sendRequest() will return an output stream that can
|
||||
/// be used to send the request body, if there is any.
|
||||
|
@@ -51,11 +51,11 @@ class NetSSL_API SSLManager
|
||||
/// Proper initialization of SSLManager is critical.
|
||||
///
|
||||
/// SSLManager can be initialized manually, by calling initializeServer()
|
||||
/// and/or initializeClient(), or intialization can be automatic. In the latter
|
||||
/// and/or initializeClient(), or initialization can be automatic. In the latter
|
||||
/// case, a Poco::Util::Application instance must be available and the required
|
||||
/// configuration properties must be set (see below).
|
||||
///
|
||||
/// Note that manual intialization must happen very early in the application,
|
||||
/// Note that manual initialization must happen very early in the application,
|
||||
/// before defaultClientContext() or defaultServerContext() are called.
|
||||
///
|
||||
/// If defaultClientContext() and defaultServerContext() are never called
|
||||
@@ -112,7 +112,7 @@ class NetSSL_API SSLManager
|
||||
/// the Context class for details). Valid values are none, relaxed, strict, once.
|
||||
/// - verificationDepth (integer, 1-9): Sets the upper limit for verification chain sizes. Verification
|
||||
/// will fail if a certificate chain larger than this is encountered.
|
||||
/// - loadDefaultCAFile (boolean): Specifies wheter the builtin CA certificates from OpenSSL are used.
|
||||
/// - loadDefaultCAFile (boolean): Specifies whether the builtin CA certificates from OpenSSL are used.
|
||||
/// - cipherList (string): Specifies the supported ciphers in OpenSSL notation
|
||||
/// (e.g. "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH").
|
||||
/// - privateKeyPassphraseHandler.name (string): The name of the class (subclass of PrivateKeyPassphraseHandler)
|
||||
|
@@ -31,7 +31,7 @@ namespace Net {
|
||||
|
||||
class NetSSL_API SecureSMTPClientSession: public SMTPClientSession
|
||||
/// This class implements an Simple Mail
|
||||
/// Transfer Procotol (SMTP, RFC 2821)
|
||||
/// Transfer Protocol (SMTP, RFC 2821)
|
||||
/// client for sending e-mail messages that
|
||||
/// supports the STARTTLS command for secure
|
||||
/// connections.
|
||||
|
@@ -333,27 +333,33 @@ void Context::createSSLContext()
|
||||
case SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(SSLv23_server_method());
|
||||
break;
|
||||
#if defined(SSL_OP_NO_TLSv1) && !defined(OPENSSL_NO_TLS1)
|
||||
case TLSV1_CLIENT_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_client_method());
|
||||
break;
|
||||
case TLSV1_SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_server_method());
|
||||
break;
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
case TLSV1_1_CLIENT_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_1_client_method());
|
||||
break;
|
||||
case TLSV1_1_SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_1_server_method());
|
||||
break;
|
||||
#endif
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
|
||||
case TLSV1_2_CLIENT_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_2_client_method());
|
||||
break;
|
||||
case TLSV1_2_SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_2_server_method());
|
||||
break;
|
||||
#if defined(SSL_OP_NO_TLSv1_1) && !defined(OPENSSL_NO_TLS1)
|
||||
/* SSL_OP_NO_TLSv1_1 is defined in ssl.h if the library version supports TLSv1.1.
|
||||
* OPENSSL_NO_TLS1 is defined in opensslconf.h or on the compiler command line
|
||||
* if TLS1.x was removed at OpenSSL library build time via Configure options.
|
||||
*/
|
||||
case TLSV1_1_CLIENT_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_1_client_method());
|
||||
break;
|
||||
case TLSV1_1_SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_1_server_method());
|
||||
break;
|
||||
#endif
|
||||
#if defined(SSL_OP_NO_TLSv1_2) && !defined(OPENSSL_NO_TLS1)
|
||||
case TLSV1_2_CLIENT_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_2_client_method());
|
||||
break;
|
||||
case TLSV1_2_SERVER_USE:
|
||||
_pSSLContext = SSL_CTX_new(TLSv1_2_server_method());
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
throw Poco::InvalidArgumentException("Invalid or unsupported usage");
|
||||
|
Reference in New Issue
Block a user