34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@sury.org>
|
|
Date: Thu, 21 Apr 2022 12:52:24 +0200
|
|
Subject: Add minimal OpenSSL 3.0 patch
|
|
|
|
---
|
|
ext/openssl/openssl.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
|
|
index aa819be..2fa74f2 100644
|
|
--- a/ext/openssl/openssl.c
|
|
+++ b/ext/openssl/openssl.c
|
|
@@ -55,6 +55,10 @@
|
|
#include <openssl/rand.h>
|
|
#include <openssl/ssl.h>
|
|
#include <openssl/pkcs12.h>
|
|
+#if PHP_OPENSSL_API_VERSION >= 0x30000
|
|
+#include <openssl/core_names.h>
|
|
+#include <openssl/param_build.h>
|
|
+#endif
|
|
|
|
/* Common */
|
|
#include <time.h>
|
|
@@ -1517,7 +1521,9 @@ PHP_MINIT_FUNCTION(openssl)
|
|
REGISTER_LONG_CONSTANT("PKCS7_NOSIGS", PKCS7_NOSIGS, CONST_CS|CONST_PERSISTENT);
|
|
|
|
REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT);
|
|
+#ifdef RSA_SSLV23_PADDING
|
|
REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
|
|
+#endif
|
|
REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT);
|
|
REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT);
|
|
|