Skip to content

Commit 36fb4ed

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fixed segfault when built with OpenSSL >= 1.0.1 fixing a minor typo in CODING_STANDARDS document FIX BUG #65219 - Typo correction FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
2 parents e3c7b48 + b026993 commit 36fb4ed

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CODING_STANDARDS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Naming Conventions
151151

152152
7. Classes should be given descriptive names. Avoid using abbreviations where
153153
possible. Each word in the class name should start with a capital letter,
154-
without underscore delimiters (CampelCaps starting with a capital letter).
154+
without underscore delimiters (CamelCaps starting with a capital letter).
155155
The class name should be prefixed with the name of the 'parent set' (e.g.
156156
the name of the extension)::
157157

ext/openssl/openssl.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4676,9 +4676,6 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
46764676

46774677
GET_VER_OPT_STRING("local_cert", certfile);
46784678
if (certfile) {
4679-
X509 *cert = NULL;
4680-
EVP_PKEY *key = NULL;
4681-
SSL *tmpssl;
46824679
char resolved_path_buff[MAXPATHLEN];
46834680
const char * private_key = NULL;
46844681

@@ -4705,7 +4702,11 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
47054702
}
47064703
}
47074704

4708-
tmpssl = SSL_new(ctx);
4705+
#if OPENSSL_VERSION_NUMBER < 0x10001001L
4706+
/* Unnecessary as of OpenSSLv1.0.1 (will segfault if used with >= 10001001 ) */
4707+
X509 *cert = NULL;
4708+
EVP_PKEY *key = NULL;
4709+
SSL *tmpssl = SSL_new(ctx);
47094710
cert = SSL_get_certificate(tmpssl);
47104711

47114712
if (cert) {
@@ -4714,7 +4715,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
47144715
EVP_PKEY_free(key);
47154716
}
47164717
SSL_free(tmpssl);
4717-
4718+
#endif
47184719
if (!SSL_CTX_check_private_key(ctx)) {
47194720
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Private key does not match certificate!");
47204721
}

0 commit comments

Comments
 (0)