pajoye          Mon Jul  6 23:36:56 2009 UTC

  Modified files:              
    /php-src/ext/openssl        openssl.c 
  Log:
  - #48116, fix build with openssl 1.0
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.181&r2=1.182&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.181 php-src/ext/openssl/openssl.c:1.182
--- php-src/ext/openssl/openssl.c:1.181 Mon Apr 20 09:43:45 2009
+++ php-src/ext/openssl/openssl.c       Mon Jul  6 23:36:56 2009
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: openssl.c,v 1.181 2009/04/20 09:43:45 mkoppanen Exp $ */
+/* $Id: openssl.c,v 1.182 2009/07/06 23:36:56 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -484,8 +484,13 @@
 static char default_ssl_conf_filename[MAXPATHLEN];
 
 struct php_x509_request { /* {{{ */
-       LHASH * global_config;  /* Global SSL config */
-       LHASH * req_config;             /* SSL config for this request */
+#if OPENSSL_VERSION_NUMBER >= 0x10000002L
+       LHASH_OF(CONF_VALUE) * global_config;   /* Global SSL config */
+       LHASH_OF(CONF_VALUE) * req_config;              /* SSL config for this 
request */
+#else
+       LHASH * global_config;  /* Global SSL config */
+       LHASH * req_config;             /* SSL config for this request */
+#endif
        const EVP_MD * md_alg;
        const EVP_MD * digest;
        char    * section_name,
@@ -674,7 +679,11 @@
 }
 /* }}} */
 
+#if OPENSSL_VERSION_NUMBER >= 0x10000002L
+static inline int php_openssl_config_check_syntax(const char * section_label, 
const char * config_filename, const char * section, LHASH_OF(CONF_VALUE) * 
config TSRMLS_DC) /* {{{ */
+#else
 static inline int php_openssl_config_check_syntax(const char * section_label, 
const char * config_filename, const char * section, LHASH * config TSRMLS_DC) 
/* {{{ */
+#endif
 {
        X509V3_CTX ctx;
        
@@ -1177,8 +1186,7 @@
                if (in == NULL) {
                        return NULL;
                }
-
-               cert = (X509 *) PEM_ASN1_read_bio((char *(*)())d2i_X509, 
PEM_STRING_X509, in, NULL, NULL, NULL);
+               cert = (X509 *) PEM_ASN1_read_bio((d2i_of_void *)d2i_X509, 
PEM_STRING_X509, in, NULL, NULL, NULL);
                BIO_free(in);
        }
        if (cert && makeresource && resourceval) {
@@ -2931,8 +2939,7 @@
                case EVP_PKEY_RSA:
                case EVP_PKEY_RSA2:
                        assert(pkey->pkey.rsa != NULL);
-
-                       if (NULL == pkey->pkey.rsa->p || NULL == 
pkey->pkey.rsa->q) {
+                       if (pkey->pkey.rsa != NULL && (NULL == 
pkey->pkey.rsa->p || NULL == pkey->pkey.rsa->q)) {
                                return 0;
                        }
                        break;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to