diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-14 14:42:54 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-14 15:19:18 +0200 |
commit | ca20f36b2a89e01c701bb9b3da0db62b28972d7e (patch) | |
tree | e6e50876797343028db707462f6d4e2e07923d32 | |
parent | 64368f47862d1fd5697325b8ed4bd526c6679a6f (diff) | |
download | php-git-ca20f36b2a89e01c701bb9b3da0db62b28972d7e.tar.gz |
Fix types in openssl stub
These two $recipcert parameters don't use proper union types
right now. They are a bit tricky due to the $recipkey -> $recipcert
fallback.
-rw-r--r-- | ext/openssl/openssl.stub.php | 14 | ||||
-rw-r--r-- | ext/openssl/openssl_arginfo.h | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index 3d2b0d87f8..c4a9d2b2b1 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -116,8 +116,11 @@ function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, ?ar /** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $signkey */ function openssl_pkcs7_sign(string $infile, string $outfile, OpenSSLCertificate|string $signcert, $signkey, ?array $headers, int $flags = PKCS7_DETACHED, ?string $extracertsfilename = null): bool {} -/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $recipkey */ -function openssl_pkcs7_decrypt(string $infilename, string $outfilename, OpenSSLCertificate|string $recipcert, $recipkey = null): bool {} +/** + * @param OpenSSLCertificate|string $recipcert + * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $recipkey + */ +function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipcert, $recipkey = null): bool {} /** @param array $certs */ function openssl_pkcs7_read(string $infilename, &$certs): bool {} @@ -130,8 +133,11 @@ function openssl_cms_encrypt(string $infile, string $outfile, $recipcerts, ?arra /** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $signkey */ function openssl_cms_sign(string $infile, string $outfile, OpenSSLCertificate|string $signcert, $signkey, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $extracertsfilename = null): bool {} -/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $recipkey */ -function openssl_cms_decrypt(string $infilename, string $outfilename, OpenSSLCertificate|string $recipcert, $recipkey, int $encoding = OPENSSL_ENCODING_SMIME): bool {} +/** + * @param OpenSSLCertificate|string $recipcert + * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $recipkey + */ +function openssl_cms_decrypt(string $infilename, string $outfilename, $recipcert, $recipkey = UNKNOWN, int $encoding = OPENSSL_ENCODING_SMIME): bool {} /** @param array $certs */ function openssl_cms_read(string $infilename, &$certs): bool {} diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 07f0d25391..1800a8f128 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ed45da0e8786db9b20fd33d574b20f3d41304e0a */ + * Stub hash: 10a514c9947313694296c6ec9ec6f2fa8e6c850b */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_TYPE_MASK(0, x509, OpenSSLCertificate, MAY_BE_STRING, NULL) @@ -190,7 +190,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_pkcs7_decrypt, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, infilename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, outfilename, IS_STRING, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, recipcert, OpenSSLCertificate, MAY_BE_STRING, NULL) + ZEND_ARG_INFO(0, recipcert) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, recipkey, "null") ZEND_END_ARG_INFO() @@ -232,10 +232,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_sign, 0, 5, _IS_BOOL ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extracertsfilename, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_decrypt, 0, 4, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_decrypt, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, infilename, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, outfilename, IS_STRING, 0) - ZEND_ARG_OBJ_TYPE_MASK(0, recipcert, OpenSSLCertificate, MAY_BE_STRING, NULL) + ZEND_ARG_INFO(0, recipcert) ZEND_ARG_INFO(0, recipkey) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "OPENSSL_ENCODING_SMIME") ZEND_END_ARG_INFO() |