From 54ea9c754c71f8610a9f53a21329767b712925f1 Mon Sep 17 00:00:00 2001 From: shish <40659+shish@users.noreply.github.com> Date: Fri, 25 Oct 2024 03:13:33 +0000 Subject: [PATCH] Automatically regenerate the files --- generated/ftp.php | 8 +++---- generated/functionsList.php | 2 ++ generated/misc.php | 25 +++++++++++++++++++--- generated/openssl.php | 33 ++++++++++++++++------------- generated/sodium.php | 42 +++++++++++++++++++++++++++++++++++++ generated/xml.php | 10 +++++++++ rector-migrate.php | 2 ++ 7 files changed, 100 insertions(+), 22 deletions(-) diff --git a/generated/ftp.php b/generated/ftp.php index c9aafad2..2aca09c0 100644 --- a/generated/ftp.php +++ b/generated/ftp.php @@ -530,10 +530,10 @@ function ftp_site($ftp, string $command): void * ftp_ssl_connect opens an explicit SSL-FTP connection to the * specified hostname. That implies that * ftp_ssl_connect will succeed even if the server is not - * configured for SSL-FTP, or its certificate is invalid. Only when - * ftp_login is called, the client will send the - * appropriate AUTH FTP command, so ftp_login will fail in - * the mentioned cases. + * configured for SSL-FTP. Only when ftp_login is called, the client will send the + * appropriate AUTH FTP command, so ftp_login will fail. + * The connection established by ftp_ssl_connect will not do + * peer-certificate verification. * * @param string $hostname The FTP server address. This parameter shouldn't have any trailing * slashes and shouldn't be prefixed with ftp://. diff --git a/generated/functionsList.php b/generated/functionsList.php index 64b2632c..99a63cd3 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -944,6 +944,8 @@ 'socket_wsaprotocol_info_export', 'socket_wsaprotocol_info_import', 'socket_wsaprotocol_info_release', + 'sodium_crypto_aead_aegis128l_decrypt', + 'sodium_crypto_aead_aegis256_decrypt', 'sodium_crypto_aead_aes256gcm_decrypt', 'sodium_crypto_aead_chacha20poly1305_decrypt', 'sodium_crypto_aead_chacha20poly1305_encrypt', diff --git a/generated/misc.php b/generated/misc.php index 550a4c62..75281903 100644 --- a/generated/misc.php +++ b/generated/misc.php @@ -185,8 +185,18 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void * this is only possible when called from the main thread. * * @param $handler A callback function to set or remove. If set, this function will be called - * whenever a CTRL+C or CTRL+BREAK event - * occurs. The function is supposed to have the following signature: + * whenever a + * + * CTRL + * C + * + * or + * + * CTRL + * BREAK + * + * event occurs. + * The function is supposed to have the following signature: * * voidhandler * intevent @@ -204,7 +214,16 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void * * * Setting a NULL handler causes the process to ignore - * CTRL+C events, but not CTRL+BREAK events. + * + * CTRL + * C + * + * events, but not + * + * CTRL + * BREAK + * + * events. * @param bool $add * @throws MiscException * diff --git a/generated/openssl.php b/generated/openssl.php index 77fae1c6..6992c0f3 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -265,8 +265,8 @@ function openssl_csr_get_public_key($csr, bool $short_names = true) * including fields commonName (CN), organizationName (O), countryName (C) etc. * * @param string|resource $csr See CSR parameters for a list of valid values. - * @param bool $short_names shortnames controls how the data is indexed in the - * array - if shortnames is TRUE (the default) then + * @param bool $short_names short_names controls how the data is indexed in the + * array - if short_names is TRUE (the default) then * fields will be indexed with the short name form, otherwise, the long name * form will be used - e.g.: CN is the shortname form of commonName. * @return array Returns an associative array with subject description. @@ -289,16 +289,18 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array * based on the information provided by distinguished_names. * * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. - * @param resource $private_key private_key should be set to a private key that was - * previously generated by openssl_pkey_new (or - * otherwise obtained from the other openssl_pkey family of functions). - * The corresponding public portion of the key will be used to sign the - * CSR. + * @param resource $private_key private_key should be set to a private key that + * was previously generated by openssl_pkey_new (or + * otherwise obtained from the other openssl_pkey family of functions), or + * NULL variable. If its value is NULL variable, a new private key is + * generated based on the supplied options and + * assigned to supplied variable. The corresponding public portion of the + * key will be used to sign the CSR. * @param array $options By default, the information in your system openssl.conf * is used to initialize the request; you can specify a configuration file - * section by setting the config_section_section key of + * section by setting the config_section_section key in * options. You can also specify an alternative - * openssl configuration file by setting the value of the + * OpenSSL configuration file by setting the value of the * config key to the path of the file you want to use. * The following keys, if present in options * behave as their equivalents in the openssl.conf, as @@ -338,8 +340,7 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array * private_key_bits * int * default_bits - * Specifies how many bits should be used to generate a private - * key + * Specifies how many bits should be used to generate a private key * * * private_key_type @@ -387,10 +388,12 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array * * * @param array $extra_attributes extra_attributes is used to specify additional - * configuration options for the CSR. Both distinguished_names and - * extra_attributes are associative arrays whose keys are - * converted to OIDs and applied to the relevant part of the request. - * @return resource Returns the CSR. + * configuration options for the CSR. Both + * distinguished_names and + * extra_attributes are associative arrays, whose keys + * are converted to OIDs and applied to the relevant part of the request. + * @return resource Returns the CSR on success, TRUE if CSR creation is + * successful but signing fails. * @throws OpensslException * */ diff --git a/generated/sodium.php b/generated/sodium.php index 36b55b86..28aec03b 100644 --- a/generated/sodium.php +++ b/generated/sodium.php @@ -4,6 +4,48 @@ use Safe\Exceptions\SodiumException; +/** + * + * + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return + * @throws SodiumException + * + */ +function sodium_crypto_aead_aegis128l_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): void +{ + error_clear_last(); + $safeResult = \sodium_crypto_aead_aegis128l_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { + throw SodiumException::createFromPhpError(); + } +} + + +/** + * + * + * @param string $ciphertext + * @param string $additional_data + * @param string $nonce + * @param string $key + * @return + * @throws SodiumException + * + */ +function sodium_crypto_aead_aegis256_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): void +{ + error_clear_last(); + $safeResult = \sodium_crypto_aead_aegis256_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { + throw SodiumException::createFromPhpError(); + } +} + + /** * Verify then decrypt with AES-256-GCM. * Only available if sodium_crypto_aead_aes256gcm_is_available returns TRUE. diff --git a/generated/xml.php b/generated/xml.php index 7c761a9c..d996f31d 100644 --- a/generated/xml.php +++ b/generated/xml.php @@ -48,6 +48,16 @@ function xml_parser_free($parser): void * * * + * XML_OPTION_PARSE_HUGE + * bool + * + * Allows parsing documents larger than 10 MB. + * This option should only be enabled when the document size is + * bounded because this could otherwise lead to a DoS. + * This option is only available when using libxml2. + * + * + * * XML_OPTION_SKIP_TAGSTART * integer * diff --git a/rector-migrate.php b/rector-migrate.php index d8d06022..a94fb60a 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -951,6 +951,8 @@ 'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export', 'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import', 'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release', + 'sodium_crypto_aead_aegis128l_decrypt' => 'Safe\sodium_crypto_aead_aegis128l_decrypt', + 'sodium_crypto_aead_aegis256_decrypt' => 'Safe\sodium_crypto_aead_aegis256_decrypt', 'sodium_crypto_aead_aes256gcm_decrypt' => 'Safe\sodium_crypto_aead_aes256gcm_decrypt', 'sodium_crypto_aead_chacha20poly1305_decrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_decrypt', 'sodium_crypto_aead_chacha20poly1305_encrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_encrypt',