return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "TLSv1.1 support is not compiled into the OpenSSL library PHP is linked against");
+ "TLSv1.2 support is not compiled into the OpenSSL library PHP is linked against");
return NULL;
#endif
} else {
ssl_ctx_options |= SSL_OP_NO_SSLv2;
}
#endif
-
+#ifndef OPENSSL_NO_SSL3
if (!(method_flags & STREAM_CRYPTO_METHOD_SSLv3)) {
ssl_ctx_options |= SSL_OP_NO_SSLv3;
}
-
+#endif
+#ifndef OPENSSL_NO_TLS1
if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_0)) {
ssl_ctx_options |= SSL_OP_NO_TLSv1;
}
-
- if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_1)) {
+#endif
#if OPENSSL_VERSION_NUMBER >= 0x10001001L
+ if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_1)) {
ssl_ctx_options |= SSL_OP_NO_TLSv1_1;
-#endif
- } else {
-#if OPENSSL_VERSION_NUMBER < 0x10001001L
- php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "TLSv1.1 support is not compiled into the OpenSSL library PHP is linked against");
- return -1;
-#endif
}
if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_2)) {
-#if OPENSSL_VERSION_NUMBER >= 0x10001001L
ssl_ctx_options |= SSL_OP_NO_TLSv1_2;
-#endif
- } else {
-#if OPENSSL_VERSION_NUMBER < 0x10001001L
- php_error_docref(NULL TSRMLS_CC, E_WARNING,
- "TLSv1.2 support is not compiled into the OpenSSL library PHP is linked against");
- return -1;
-#endif
}
+#endif
return ssl_ctx_options;
}
const SSL_METHOD *method;
long ssl_ctx_options;
long method_flags;
+ zval **val;
if (sslsock->ssl_handle) {
if (sslsock->s.is_blocked) {
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL
{
- zval **val;
-
if (stream->context && SUCCESS == php_stream_context_get_option(
stream->context, "ssl", "no_ticket", &val) &&
zend_is_true(*val)
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
{
- zval **val;
-
if (stream->context && (FAILURE == php_stream_context_get_option(
stream->context, "ssl", "disable_compression", &val) ||
zend_is_true(*val))