]> git.pld-linux.org Git - packages/php.git/commitdiff
- rel 42; fix linking auto/th/php53-5.3.29-42
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 25 Sep 2018 12:32:27 +0000 (14:32 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 25 Sep 2018 12:32:27 +0000 (14:32 +0200)
openssl.patch
php.spec

index 7d5f6bd1a61a8d27cacc78799d1f12e3b6187e6d..ffdd438b1f4769c3a33dc51180a85db62bf4c232 100644 (file)
@@ -1,6 +1,6 @@
-diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
---- php-5.3.29/ext/openssl.org/openssl.c       2018-09-25 10:04:14.977464124 +0200
-+++ php-5.3.29/ext/openssl/openssl.c   2018-09-25 10:52:55.905608895 +0200
+diff -urN php-5.3.29.org/ext/openssl/openssl.c php-5.3.29/ext/openssl/openssl.c
+--- php-5.3.29.org/ext/openssl/openssl.c       2018-09-25 12:32:51.062376414 +0200
++++ php-5.3.29/ext/openssl/openssl.c   2018-09-25 12:38:20.995593826 +0200
 @@ -68,6 +68,13 @@
  
  #define DEBUG_SMIME   0
@@ -39,7 +39,28 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                default:
                        return NULL;
                        break;
-@@ -1344,6 +1348,7 @@
+@@ -989,14 +993,17 @@
+       le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number);
+       le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++      OPENSSL_config(NULL);
+       SSL_library_init();
+       OpenSSL_add_all_ciphers();
+       OpenSSL_add_all_digests();
+       OpenSSL_add_all_algorithms();
+-      ERR_load_ERR_strings();
+-      ERR_load_crypto_strings();
+-      ERR_load_EVP_strings();
++      SSL_load_error_strings();
++#else
++      OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
++#endif
+       /* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
+        * OpenSSL callbacks */
+@@ -1344,6 +1351,7 @@
  {
        GENERAL_NAMES *names;
        const X509V3_EXT_METHOD *method = NULL;
@@ -47,7 +68,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        long i, length, num;
        const unsigned char *p;
  
-@@ -1352,8 +1357,9 @@
+@@ -1352,8 +1360,9 @@
                return -1;
        }
  
@@ -59,7 +80,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        if (method->it) {
                names = (GENERAL_NAMES*)(ASN1_item_d2i(NULL, &p, length,
                                                       ASN1_ITEM_ptr(method->it)));
-@@ -1416,6 +1422,8 @@
+@@ -1416,6 +1425,8 @@
        char * tmpstr;
        zval * subitem;
        X509_EXTENSION *extension;
@@ -68,7 +89,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        char *extname;
        BIO  *bio_out;
        BUF_MEM *bio_buf;
-@@ -1430,12 +1438,12 @@
+@@ -1430,12 +1441,12 @@
        }
        array_init(return_value);
  
@@ -86,7 +107,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        /* hash as used in CA directories to lookup cert by subject name */
        {
                char buf[32];
-@@ -2921,13 +2929,20 @@
+@@ -2921,13 +2932,20 @@
  {
        assert(pkey != NULL);
  
@@ -111,7 +132,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                        }
                        break;
  #endif
-@@ -2937,19 +2952,41 @@
+@@ -2937,19 +2955,41 @@
                case EVP_PKEY_DSA2:
                case EVP_PKEY_DSA3:
                case EVP_PKEY_DSA4:
@@ -159,7 +180,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                        }
                        break;
  #endif
-@@ -2961,6 +2998,31 @@
+@@ -2961,6 +3001,31 @@
  }
  /* }}} */
  
@@ -191,7 +212,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  #define OPENSSL_PKEY_GET_BN(_type, _name) do {                                                        \
                if (pkey->pkey._type->_name != NULL) {                                                  \
                        int len = BN_num_bytes(pkey->pkey._type->_name);                        \
-@@ -2980,7 +3042,144 @@
+@@ -2980,7 +3045,144 @@
                                Z_STRLEN_PP(bn), NULL);                                                                 \
            }                                                               \
        } while (0);
@@ -201,7 +222,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
 +zend_bool php_openssl_pkey_init_and_assign_rsa(EVP_PKEY *pkey, RSA *rsa, zval **data)
 +{
 +      BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp;
++
 +      OPENSSL_PKEY_SET_BN(data, n);
 +      OPENSSL_PKEY_SET_BN(data, e);
 +      OPENSSL_PKEY_SET_BN(data, d);
@@ -262,7 +283,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
 +    return 1;
 +}
 +/* }}} */
-+
 +/* {{{ php_openssl_dh_pub_from_priv */
 +static BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM *p)
 +{
@@ -336,7 +357,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
  /* {{{ proto resource openssl_pkey_new([array configargs])
     Generates a new private key */
-@@ -3004,18 +3203,8 @@
+@@ -3004,18 +3206,8 @@
                    if (pkey) {
                                RSA *rsa = RSA_new();
                                if (rsa) {
@@ -357,7 +378,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                        }
                                        RSA_free(rsa);
                                }
-@@ -3028,15 +3217,7 @@
+@@ -3028,15 +3220,7 @@
                    if (pkey) {
                                DSA *dsa = DSA_new();
                                if (dsa) {
@@ -374,7 +395,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                                if (EVP_PKEY_assign_DSA(pkey, dsa)) {
                                                        RETURN_RESOURCE(zend_list_insert(pkey, le_key));
                                                }
-@@ -3052,14 +3233,7 @@
+@@ -3052,14 +3236,7 @@
                    if (pkey) {
                                DH *dh = DH_new();
                                if (dh) {
@@ -390,7 +411,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                                if (EVP_PKEY_assign_DH(pkey, dh)) {
                                                        RETURN_RESOURCE(zend_list_insert(pkey, le_key));
                                                }
-@@ -3289,63 +3463,79 @@
+@@ -3289,63 +3466,79 @@
        /*TODO: Use the real values once the openssl constants are used 
         * See the enum at the top of this file
         */
@@ -515,7 +536,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                        break;
  #ifdef EVP_PKEY_EC 
                case EVP_PKEY_EC:
-@@ -3844,13 +4034,13 @@
+@@ -3844,13 +4037,13 @@
        cryptedlen = EVP_PKEY_size(pkey);
        cryptedbuf = emalloc(cryptedlen + 1);
  
@@ -531,7 +552,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                                padding) == cryptedlen);
                        break;
                default:
-@@ -3902,13 +4092,13 @@
+@@ -3902,13 +4095,13 @@
        cryptedlen = EVP_PKEY_size(pkey);
        crypttemp = emalloc(cryptedlen + 1);
  
@@ -547,7 +568,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                        padding);
                        if (cryptedlen != -1) {
                                cryptedbuf = emalloc(cryptedlen + 1);
-@@ -3967,13 +4157,13 @@
+@@ -3967,13 +4160,13 @@
        cryptedlen = EVP_PKEY_size(pkey);
        cryptedbuf = emalloc(cryptedlen + 1);
  
@@ -563,7 +584,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                                padding) == cryptedlen);
                        break;
                default:
-@@ -4026,13 +4216,13 @@
+@@ -4026,13 +4219,13 @@
        cryptedlen = EVP_PKEY_size(pkey);
        crypttemp = emalloc(cryptedlen + 1);
  
@@ -579,7 +600,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                                        padding);
                        if (cryptedlen != -1) {
                                cryptedbuf = emalloc(cryptedlen + 1);
-@@ -4096,7 +4286,7 @@
+@@ -4096,7 +4289,7 @@
        long keyresource = -1;
        char * data;
        int data_len;
@@ -588,7 +609,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        zval *method = NULL;
        long signature_algo = OPENSSL_ALGO_SHA1;
        const EVP_MD *mdtype;
-@@ -4129,9 +4319,11 @@
+@@ -4129,9 +4322,11 @@
        siglen = EVP_PKEY_size(pkey);
        sigbuf = emalloc(siglen + 1);
  
@@ -603,7 +624,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                zval_dtor(signature);
                sigbuf[siglen] = '\0';
                ZVAL_STRINGL(signature, (char *)sigbuf, siglen, 0);
-@@ -4140,7 +4332,7 @@
+@@ -4140,7 +4335,7 @@
                efree(sigbuf);
                RETVAL_FALSE;
        }
@@ -612,7 +633,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        if (keyresource == -1) {
                EVP_PKEY_free(pkey);
        }
-@@ -4154,7 +4346,7 @@
+@@ -4154,7 +4349,7 @@
        zval **key;
        EVP_PKEY *pkey;
        int err;
@@ -621,7 +642,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        const EVP_MD *mdtype;
        long keyresource = -1;
        char * data;    int data_len;
-@@ -4188,10 +4380,13 @@
+@@ -4188,10 +4383,13 @@
                RETURN_FALSE;
        }
  
@@ -639,7 +660,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
        if (keyresource == -1) {
                EVP_PKEY_free(pkey);
-@@ -4215,7 +4410,7 @@
+@@ -4215,7 +4413,7 @@
        char *method =NULL;
        int method_len = 0;
        const EVP_CIPHER *cipher;
@@ -648,7 +669,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szza/|s", &data, &data_len, &sealdata, &ekeys, &pubkeys, &method, &method_len) == FAILURE) {
                return;
-@@ -4262,7 +4457,9 @@
+@@ -4262,7 +4460,9 @@
                i++;
        }
  
@@ -659,7 +680,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                RETVAL_FALSE;
                goto clean_exit;
        }
-@@ -4273,15 +4470,16 @@
+@@ -4273,15 +4473,16 @@
        iv = ivlen ? emalloc(ivlen + 1) : NULL;
  #endif
        /* allocate one byte extra to make room for \0 */
@@ -679,7 +700,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
        if (len1 + len2 > 0) {
                zval_dtor(sealdata);
-@@ -4310,6 +4508,7 @@
+@@ -4310,6 +4511,7 @@
                efree(buf);
        }
        RETVAL_LONG(len1 + len2);
@@ -687,7 +708,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
  clean_exit:
        for (i=0; i<nkeys; i++) {
-@@ -4336,7 +4535,7 @@
+@@ -4336,7 +4538,7 @@
        int len1, len2;
        unsigned char *buf;
        long keyresource = -1;
@@ -696,7 +717,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        char * data;    int data_len;
        char * ekey;    int ekey_len;
        char *method =NULL;
-@@ -4365,28 +4564,22 @@
+@@ -4365,28 +4567,22 @@
        
        buf = emalloc(data_len + 1);
  
@@ -736,7 +757,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  }
  /* }}} */
  
-@@ -4691,7 +4884,7 @@
+@@ -4691,7 +4887,7 @@
        char *data, *method;
        int data_len, method_len;
        const EVP_MD *mdtype;
@@ -745,7 +766,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        int siglen;
        unsigned char *sigbuf;
  
-@@ -4707,9 +4900,11 @@
+@@ -4707,9 +4903,11 @@
        siglen = EVP_MD_size(mdtype);
        sigbuf = emalloc(siglen + 1);
  
@@ -760,7 +781,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                if (raw_output) {
                        sigbuf[siglen] = '\0';
                        RETVAL_STRINGL((char *)sigbuf, siglen, 0);
-@@ -4725,6 +4920,7 @@
+@@ -4725,6 +4923,7 @@
                efree(sigbuf);
                RETVAL_FALSE;
        }
@@ -768,7 +789,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  }
  /* }}} */
  
-@@ -4770,7 +4966,7 @@
+@@ -4770,7 +4969,7 @@
        char *data, *method, *password, *iv = "";
        int data_len, method_len, password_len, iv_len = 0, max_iv_len;
        const EVP_CIPHER *cipher_type;
@@ -777,7 +798,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        int i = 0, outlen, keylen;
        unsigned char *outbuf, *key;
        zend_bool free_iv;
-@@ -4784,6 +4980,12 @@
+@@ -4784,6 +4983,12 @@
                RETURN_FALSE;
        }
  
@@ -790,7 +811,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        keylen = EVP_CIPHER_key_length(cipher_type);
        if (keylen > password_len) {
                key = emalloc(keylen);
-@@ -4802,16 +5004,16 @@
+@@ -4802,16 +5007,16 @@
        outlen = data_len + EVP_CIPHER_block_size(cipher_type);
        outbuf = emalloc(outlen + 1);
  
@@ -812,7 +833,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                outlen += i;
                if (raw_output) {
                        outbuf[outlen] = '\0';
-@@ -4834,7 +5036,7 @@
+@@ -4834,7 +5039,7 @@
        if (free_iv) {
                efree(iv);
        }
@@ -821,7 +842,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  }
  /* }}} */
  
-@@ -4846,7 +5048,7 @@
+@@ -4846,7 +5051,7 @@
        char *data, *method, *password, *iv = "";
        int data_len, method_len, password_len, iv_len = 0;
        const EVP_CIPHER *cipher_type;
@@ -830,7 +851,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        int i, outlen, keylen;
        unsigned char *outbuf, *key;
        int base64_str_len;
-@@ -4868,10 +5070,17 @@
+@@ -4868,10 +5073,17 @@
                RETURN_FALSE;
        }
  
@@ -848,7 +869,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                        RETURN_FALSE;
                }
                data_len = base64_str_len;
-@@ -4892,14 +5101,14 @@
+@@ -4892,14 +5104,14 @@
        outlen = data_len + EVP_CIPHER_block_size(cipher_type);
        outbuf = emalloc(outlen + 1);
  
@@ -868,7 +889,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
                outlen += i;
                outbuf[outlen] = '\0';
                RETVAL_STRINGL((char *)outbuf, outlen, 0);
-@@ -4916,7 +5125,7 @@
+@@ -4916,7 +5128,7 @@
        if (base64_str) {
                efree(base64_str);
        }
@@ -877,7 +898,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  }
  /* }}} */
  
-@@ -4954,6 +5163,7 @@
+@@ -4954,6 +5166,7 @@
        zval *key;
        char *pub_str;
        int pub_len;
@@ -885,7 +906,7 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
        EVP_PKEY *pkey;
        BIGNUM *pub;
        char *data;
-@@ -4962,15 +5172,18 @@
+@@ -4962,15 +5175,18 @@
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sr", &pub_str, &pub_len, &key) == FAILURE) {
                return;
        }
@@ -908,36 +929,17 @@ diff -ur php-5.3.29/ext/openssl.org/openssl.c php-5.3.29/ext/openssl/openssl.c
  
        if (len >= 0) {
                data[len] = 0;
---- php-5.3.29/ext/openssl/openssl.c~  2018-09-25 11:02:55.000000000 +0200
-+++ php-5.3.29/ext/openssl/openssl.c   2018-09-25 11:19:53.586616971 +0200
-@@ -998,9 +998,7 @@ PHP_MINIT_FUNCTION(openssl)
-       OpenSSL_add_all_digests();
-       OpenSSL_add_all_algorithms();
--      ERR_load_ERR_strings();
--      ERR_load_crypto_strings();
--      ERR_load_EVP_strings();
-+      SSL_load_error_strings();
-       /* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
-        * OpenSSL callbacks */
---- php-5.3.29/ext/openssl/openssl.c~  2018-09-25 11:20:46.000000000 +0200
-+++ php-5.3.29/ext/openssl/openssl.c   2018-09-25 11:34:01.849675832 +0200
-@@ -993,12 +993,17 @@ PHP_MINIT_FUNCTION(openssl)
-       le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number);
-       le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+      OPENSSL_config(NULL);
-       SSL_library_init();
-       OpenSSL_add_all_ciphers();
-       OpenSSL_add_all_digests();
-       OpenSSL_add_all_algorithms();
-       SSL_load_error_strings();
-+#else
-+      OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
-+#endif
-       /* register a resource id number with OpenSSL so that we can map SSL -> stream structures in
-        * OpenSSL callbacks */
+--- php-5.2.17/acinclude.m4~   2018-09-25 11:43:17.000000000 +0200
++++ php-5.2.17/acinclude.m4    2018-09-25 13:52:29.178130416 +0200
+@@ -2325,8 +2325,10 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
+       AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
+     fi
+-    if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
++    if test -n "$OPENSSL_LIBS"; then
+       PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
++    fi
++    if test -n "$OPENSSL_INCS"; then
+       PHP_EVAL_INCLINE($OPENSSL_INCS)
+     fi
+   fi
index e014655ad6c5f774443d591e5381ddc196b97c04..43f375d33fd770272495998e2ee5d89a9eef8d14 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -143,7 +143,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine      with_alternatives
 %endif
 
-%define                rel     41
+%define                rel     42
 %define                orgname php
 %define                ver_suffix 53
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
This page took 0.070896 seconds and 4 git commands to generate.