Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 678230
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +8 lines)
Line  Link Here
0
-- a/ext/openssl/openssl.c
0
++ b/ext/openssl/openssl.c
Lines 538-544 ZEND_GET_MODULE(openssl) Link Here
538
#endif
538
#endif
539
539
540
/* {{{ OpenSSL compatibility functions and macros */
540
/* {{{ OpenSSL compatibility functions and macros */
541
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
541
#if OPENSSL_VERSION_NUMBER < 0x10100000L
542
#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
542
#define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
543
#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
543
#define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
544
#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
544
#define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
Lines 650-656 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) Link Here
650
	return 1;
650
	return 1;
651
}
651
}
652
652
653
#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
653
#if OPENSSL_VERSION_NUMBER < 0x10002000L
654
#define EVP_PKEY_id(_pkey) _pkey->type
654
#define EVP_PKEY_id(_pkey) _pkey->type
655
#define EVP_PKEY_base_id(_key) EVP_PKEY_type(_key->type)
655
#define EVP_PKEY_base_id(_key) EVP_PKEY_type(_key->type)
656
656
Lines 1100-1106 static void php_openssl_dispose_config(struct php_x509_request * req TSRMLS_DC) Link Here
1100
}
1100
}
1101
/* }}} */
1101
/* }}} */
1102
1102
1103
#if defined(PHP_WIN32) || (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER))
1103
#if defined(PHP_WIN32) || OPENSSL_VERSION_NUMBER >= 0x10100000L
1104
#define PHP_OPENSSL_RAND_ADD_TIME() ((void) 0)
1104
#define PHP_OPENSSL_RAND_ADD_TIME() ((void) 0)
1105
#else
1105
#else
1106
#define PHP_OPENSSL_RAND_ADD_TIME() php_openssl_rand_add_timeval()
1106
#define PHP_OPENSSL_RAND_ADD_TIME() php_openssl_rand_add_timeval()
Lines 1186-1192 static EVP_MD * php_openssl_get_evp_md_from_algo(long algo) { /* {{{ */ Link Here
1186
			mdtype = (EVP_MD *) EVP_md2();
1186
			mdtype = (EVP_MD *) EVP_md2();
1187
			break;
1187
			break;
1188
#endif
1188
#endif
1189
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
1189
#if OPENSSL_VERSION_NUMBER < 0x10100000L
1190
		case OPENSSL_ALGO_DSS1:
1190
		case OPENSSL_ALGO_DSS1:
1191
			mdtype = (EVP_MD *) EVP_dss1();
1191
			mdtype = (EVP_MD *) EVP_dss1();
1192
			break;
1192
			break;
Lines 1314-1320 PHP_MINIT_FUNCTION(openssl) Link Here
1314
#ifdef HAVE_OPENSSL_MD2_H
1314
#ifdef HAVE_OPENSSL_MD2_H
1315
	REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
1315
	REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
1316
#endif
1316
#endif
1317
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
1317
#if OPENSSL_VERSION_NUMBER < 0x10100000L
1318
	REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
1318
	REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
1319
#endif
1319
#endif
1320
#if OPENSSL_VERSION_NUMBER >= 0x0090708fL
1320
#if OPENSSL_VERSION_NUMBER >= 0x0090708fL
Lines 3368-3374 PHP_FUNCTION(openssl_csr_get_public_key) Link Here
3368
		RETURN_FALSE;
3368
		RETURN_FALSE;
3369
	}
3369
	}
3370
3370
3371
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
3371
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
3372
	/* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
3372
	/* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
3373
	 * the pub key is not changed after assigning. It means if we pass
3373
	 * the pub key is not changed after assigning. It means if we pass
3374
	 * a private key, it will be returned including the private part.
3374
	 * a private key, it will be returned including the private part.
Lines 3379-3385 PHP_FUNCTION(openssl_csr_get_public_key) Link Here
3379
	/* Retrieve the public key from the CSR */
3379
	/* Retrieve the public key from the CSR */
3380
	tpubkey = X509_REQ_get_pubkey(csr);
3380
	tpubkey = X509_REQ_get_pubkey(csr);
3381
3381
3382
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
3382
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
3383
	/* We need to free the CSR as it was duplicated */
3383
	/* We need to free the CSR as it was duplicated */
3384
	X509_REQ_free(csr);
3384
	X509_REQ_free(csr);
3385
#endif
3385
#endif

Return to bug 678230