summaryrefslogtreecommitdiff
path: root/ext/openssl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Jakub Zelenka2021-03-211-5/+42
|\
| * Merge branch 'PHP-7.4' into PHP-8.0Jakub Zelenka2021-03-211-5/+42
| |\
| | * Use ServerClientTestCase in a test for default_socket_timeout=-1Jakub Zelenka2021-03-211-5/+42
| | |
| | * Downgrade security level in tests using TLS < 1.2Nikita Popov2021-03-155-4/+14
| | | | | | | | | | | | | | | | | | | | | A few additional tests have been added on master that require lower security level. (cherry picked from commit c2a6395dcbab20549702e56006f7cd389cefebcd)
* | | Remove duplicated SSL_CTX_set_verify()twosee2021-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | Duplicated with line 920. Our minimal OpenSSL version is v1.0.1 (See https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/ssl/ssl_lib.c#L2039). Removing it does not affect program behavior. Closes GH-6751.
* | | Merge branch 'PHP-8.0'Remi Collet2021-02-251-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: skip test with openssl < 1.1.0
| * | Merge branch 'PHP-7.4' into PHP-8.0Remi Collet2021-02-251-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: skip test with openssl < 1.1.0
| | * skip test with openssl < 1.1.0Remi Collet2021-02-251-1/+2
| | | | | | | | | | | | | | | The test fails, but without any crash (this test is designed to catch a crash)
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-161-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Mark resource-like objects as non-comparable
| * | Mark resource-like objects as non-comparableNikita Popov2021-02-161-0/+3
| | | | | | | | | | | | | | | | | | | | | As these hold on to some internal resource, there can't be two "equal" objects with different identity. Make sure the lack of public properties doesn't result in these being treated as always equal.
* | | Improve class entry generationMáté Kocsis2021-02-161-4/+3
| | | | | | | | | | | | Related to GH-6701
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-162-27/+29
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Suppress OpenSSL error on missing optional config
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-162-27/+29
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Suppress OpenSSL error on missing optional config
| | * Suppress OpenSSL error on missing optional configNikita Popov2021-02-162-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openssl_pkey_new() fetches various options from the config file -- most of these are optional, and not specifying them is not an error condition from the perspective of the user. Unfortunately, the CONF_get_string() API pushes an error when accessing a key that doesn't exist (_CONF_get_string does not, but that is presumably a private API). This commit adds a helper php_openssl_conf_get_string() that automatically clears the error in this case. I've found that OpenSSL occasionally does the same thing internally: https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517 Closes GH-6699.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-152-0/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80747
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-0/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fixed bug #80747
| | * Fixed bug #80747Nikita Popov2021-02-152-0/+21
| | | | | | | | | | | | If RSA key generation fails, actually report that failure.
* | | Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsqlMáté Kocsis2021-02-143-14/+42
| | | | | | | | | | | | Closes GH-6691
* | | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-117-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* | | Replace zend_bool uses with boolNikita Popov2021-01-152-33/+33
| | | | | | | | | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-01-041-0/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Try to fix intermittent failures of stream_server_reneg_limit.phpt on macos
| * | Try to fix intermittent failures of stream_server_reneg_limit.phpt on macosNikita Popov2021-01-041-0/+2
| | | | | | | | | | | | Make sure the server has started up before we try to connect to it.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-11-301-2/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Next attempt to fix bug #80368
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-301-2/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Next attempt to fix bug #80368
| | * Next attempt to fix bug #80368Nikita Popov2020-11-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently treating LibreSSL as OpenSSL 1.1 is not just something we did in our code, it's something that upstream LibreSSL claims, despite not actually being compatible. Duh. Check for EVP_CIPH_OCB_MODE instead, which should reliably determine support...
* | | Merge branch 'PHP-8.0'Jakub Zelenka2020-11-271-1/+2
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.4' into PHP-8.0Jakub Zelenka2020-11-271-1/+2
| |\ \ | | |/
| | * Merge branch 'PHP-7.3' into PHP-7.4Jakub Zelenka2020-11-271-1/+2
| | |\
| | | * Fix test for bug62890 to not depend on system cert storeJakub Zelenka2020-11-271-1/+2
| | | |
| | | * Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)Stanislav Malyshev2020-09-284-22/+57
| | | |
* | | | Merge branch 'PHP-8.0'Nikita Popov2020-11-271-1/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fixed bug #80368
| * | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-271-1/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fixed bug #80368
| | * | Fixed bug #80368Nikita Popov2020-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | We assume that usually LibreSSL supports everything OpenSSL 1.1 does. In this instance, this is not the case.
* | | | Bump minimal OpenSSL version to 1.0.2Jakub Zelenka2020-11-014-38/+12
|/ / /
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-201-11/+9
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix CCM tag length setting for old OpenSSL versions
| * | Fix CCM tag length setting for old OpenSSL versionsNikita Popov2020-10-201-11/+9
| | | | | | | | | | | | | | | | | | While OpenSSL 1.1 allows unconditionally setting the CCM tag length even for decryption, some older versions apparently do not. As such, we do need to treat CCM and OCB separately after all.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-194-7/+199
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #79983: Add support for OCB mode
| * | Fix bug #79983: Add support for OCB modeNikita Popov2020-10-194-7/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OCB mode ciphers were already exposed to openssl_encrypt/decrypt, but misbehaved, because they were not treated as AEAD ciphers. From that perspective, OCB should be treated the same way as GCM. In OpenSSL 1.1 the necessary controls were unified under EVP_CTRL_AEAD_* (and OCB is only supported since OpenSSL 1.1). Closes GH-6337.
* | | Fix nullability of openssl_cms_sign() parameterNikita Popov2020-10-141-1/+1
| | |
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-144-13/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Allow passing $tag for non-authenticated encryption
| * | Allow passing $tag for non-authenticated encryptionNikita Popov2020-10-144-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | openssl_encrypt() currently throws a warning if the $tag out parameter is passed for a non-authenticated cipher. This violates the principle that a function should behave the same if a parameter is not passed, and if the default value is passed for the parameter. I believe this warning should simply be dropped and the $tag be populated with null, as is already the case. Otherwise, it is not possible to use openssl_encrypt() in generic wrapper APIs, that are compatible with both authenticated and non-authenticated encryption. Closes GH-6333.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-122-14/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Revert "Add missing X509 purpose constants"
| * | Revert "Add missing X509 purpose constants"Nikita Popov2020-10-122-14/+2
| | | | | | | | | | | | | | | | | | This reverts commit 1e53e14bc31aec98a408e517c7c8493ef4bf80cd. This fails on Travis.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-122-2/+14
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add missing X509 purpose constants
| * | Add missing X509 purpose constantsVincent JARDIN2020-10-122-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X509_PURPOSE_OCSP_HELPER, X509_PURPOSE_TIMESTAMP_SIGN are available from OpenSSL for many years: - X509_PURPOSE_OCSP_HELPER, since 2001 - X509_PURPOSE_TIMESTAMP_SIGN, since 2006 Also drop the ifdef check for X509_PURPOSE_ANY, as it is always available in supported OpenSSL versions. Closes GH-6312.
* | | Add test instantiating all objectsNikita Popov2020-10-011-4/+1
| | | | | | | | | | | | | | | | | | Intended to find issues in opaque object destructors. Closes GH-6251.
* | | Merge branch 'PHP-7.4'Stanislav Malyshev2020-09-284-22/+57
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * PHP-7.4: Update UPGRADING Update UPGRADING Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| * | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2020-09-284-22/+57
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Update UPGRADING Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| | * \ Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2020-09-284-22/+57
| | |\ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | * PHP-7.2: Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| | | * Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)Stanislav Malyshev2020-09-264-22/+57
| | | |