clientCA(),
dhParams(),
eecdhCurve(NULL),
- contextMethod(),
sslContextFlags(0),
sslOptions(0)
#endif
version = 0; // prevent options being repeatedly appended
}
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- contextMethod = TLS_server_method();
-#else
- contextMethod = SSLv23_server_method();
-#endif
-
const char *dhParamsFile = dhfile; // backward compatibility for dhparams= configuration
safe_free(eecdhCurve); // clear any previous EECDH configuration
if (tls_dh && *tls_dh) {
Ssl::X509_NAME_STACK_Pointer clientCA; ///< CA certificates to use when verifying client certificates
Ssl::DH_Pointer dhParams; ///< DH parameters for temporary/ephemeral DH key exchanges
char *eecdhCurve; ///< Elliptic curve for ephemeral EC-based DH key exchanges
- Ssl::ContextMethod contextMethod; ///< The context method (SSL_METHOD) to use when creating certificates
long sslContextFlags; ///< flags modifying the use of SSL
long sslOptions; ///< SSL engine options
#endif
if (!certfile)
certfile = keyfile;
- SSL_CTX *sslContext = SSL_CTX_new(port.contextMethod);
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ SSL_CTX *sslContext = SSL_CTX_new(TLS_server_method());
+#else
+ SSL_CTX *sslContext = SSL_CTX_new(SSLv23_server_method());
+#endif
if (sslContext == NULL) {
ssl_error = ERR_get_error();
SSL_CTX *
Ssl::createSSLContext(Ssl::X509_Pointer & x509, Ssl::EVP_PKEY_Pointer & pkey, AnyP::PortCfg &port)
{
- Ssl::SSL_CTX_Pointer sslContext(SSL_CTX_new(port.contextMethod));
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ Ssl::SSL_CTX_Pointer sslContext(SSL_CTX_new(TLS_server_method()));
+#else
+ Ssl::SSL_CTX_Pointer sslContext(SSL_CTX_new(SSLv23_server_method()));
+#endif
if (!SSL_CTX_use_certificate(sslContext.get(), x509.get()))
return NULL;