Browse Source

- #48116, fix build against openssl 1.0

experimental/5.3-FPM
Pierre Joye 17 years ago
parent
commit
c82245dea7
  1. 11
      ext/openssl/openssl.c

11
ext/openssl/openssl.c

@ -502,8 +502,8 @@ inline static int php_openssl_safe_mode_chk(char *filename TSRMLS_DC)
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 */
LHASH_OF(CONF_VALUE) * global_config; /* Global SSL config */
LHASH_OF(CONF_VALUE) * req_config; /* SSL config for this request */
const EVP_MD * md_alg;
const EVP_MD * digest;
char * section_name,
@ -680,7 +680,7 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
}
/* }}} */
static inline int php_openssl_config_check_syntax(const char * section_label, const char * config_filename, const char * section, LHASH * config TSRMLS_DC) /* {{{ */
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) /* {{{ */
{
X509V3_CTX ctx;
@ -1158,7 +1158,7 @@ static X509 * php_openssl_x509_from_zval(zval ** val, int makeresource, long * r
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);
}
@ -2787,8 +2787,7 @@ static int php_openssl_is_private_key(EVP_PKEY* pkey TSRMLS_DC)
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;

Loading…
Cancel
Save