Skip to content

Commit

Permalink
Merge branch 'PHP-5.5'
Browse files Browse the repository at this point in the history
* PHP-5.5:
  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.
  • Loading branch information
m6w6 committed Oct 9, 2013
2 parents 1815942 + 36fb4ed commit 29d5ff7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CODING_STANDARDS
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Naming Conventions

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

Expand Down
11 changes: 6 additions & 5 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5127,9 +5127,6 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{

GET_VER_OPT_STRING("local_cert", certfile);
if (certfile) {
X509 *cert = NULL;
EVP_PKEY *key = NULL;
SSL *tmpssl;
char resolved_path_buff[MAXPATHLEN];
const char * private_key = NULL;

Expand All @@ -5156,7 +5153,11 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
}
}

tmpssl = SSL_new(ctx);
#if OPENSSL_VERSION_NUMBER < 0x10001001L
/* Unnecessary as of OpenSSLv1.0.1 (will segfault if used with >= 10001001 ) */
X509 *cert = NULL;
EVP_PKEY *key = NULL;
SSL *tmpssl = SSL_new(ctx);
cert = SSL_get_certificate(tmpssl);

if (cert) {
Expand All @@ -5165,7 +5166,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{
EVP_PKEY_free(key);
}
SSL_free(tmpssl);

#endif
if (!SSL_CTX_check_private_key(ctx)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Private key does not match certificate!");
}
Expand Down

0 comments on commit 29d5ff7

Please sign in to comment.