Skip to content

Commit 0c5bae9

Browse files
authored
Merge pull request #394 from thecodingmachine/create-pull-request/regenerate-files
Automatically regenerate the files
2 parents b141ff5 + 9a9fd57 commit 0c5bae9

File tree

6 files changed

+87
-1
lines changed

6 files changed

+87
-1
lines changed

generated/curl.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,6 +3109,17 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
31093109
*
31103110
*
31113111
*
3112+
* CURLOPT_XFERINFOFUNCTION
3113+
*
3114+
* A callback accepting two parameters.
3115+
* Has a similar purpose as CURLOPT_PROGRESSFUNCTION but is more modern
3116+
* and the preferred option from cURL.
3117+
*
3118+
*
3119+
* Added in 7.32.0. Available as of PHP 8.2.0.
3120+
*
3121+
*
3122+
*
31123123
*
31133124
*
31143125
*
@@ -3274,3 +3285,29 @@ function curl_unescape(\CurlHandle $handle, string $string): string
32743285
}
32753286
return $safeResult;
32763287
}
3288+
3289+
3290+
/**
3291+
* Available if built against libcurl >= 7.62.0.
3292+
*
3293+
* Some protocols have "connection upkeep" mechanisms.
3294+
* These mechanisms usually send some traffic on existing connections in order to keep them alive;
3295+
* this can prevent connections from being closed due to overzealous firewalls, for example.
3296+
*
3297+
* Connection upkeep is currently available only for HTTP/2 connections.
3298+
* A small amount of traffic is usually sent to keep a connection alive.
3299+
* HTTP/2 maintains its connection by sending a HTTP/2 PING frame.
3300+
*
3301+
* @param \CurlHandle $handle A cURL handle returned by
3302+
* curl_init.
3303+
* @throws CurlException
3304+
*
3305+
*/
3306+
function curl_upkeep(\CurlHandle $handle): void
3307+
{
3308+
error_clear_last();
3309+
$safeResult = \curl_upkeep($handle);
3310+
if ($safeResult === false) {
3311+
throw CurlException::createFromPhpError($handle);
3312+
}
3313+
}

generated/functionsList.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
'curl_share_errno',
107107
'curl_share_setopt',
108108
'curl_unescape',
109+
'curl_upkeep',
109110
'date',
110111
'date_parse',
111112
'date_parse_from_format',
@@ -638,6 +639,7 @@
638639
'opendir',
639640
'openlog',
640641
'openssl_cipher_iv_length',
642+
'openssl_cipher_key_length',
641643
'openssl_cms_decrypt',
642644
'openssl_cms_encrypt',
643645
'openssl_cms_read',
@@ -954,6 +956,7 @@
954956
'sodium_crypto_secretbox_open',
955957
'sodium_crypto_sign_open',
956958
'sodium_crypto_sign_verify_detached',
959+
'sodium_crypto_stream_xchacha20_xor_ic',
957960
'solr_get_version',
958961
'spl_autoload_register',
959962
'spl_autoload_unregister',

generated/ldap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ function ldap_get_entries($ldap, $result): array
511511
*
512512
*
513513
* LDAP_OPT_DIAGNOSTIC_MESSAGE
514-
* int
514+
* string
515515
*
516516
*
517517
*

generated/openssl.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ function openssl_cipher_iv_length(string $cipher_algo): int
2323
}
2424

2525

26+
/**
27+
* Gets the cipher key length.
28+
*
29+
* @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values.
30+
* @return Returns the cipher length on success.
31+
* @throws OpensslException
32+
*
33+
*/
34+
function openssl_cipher_key_length(string $cipher_algo)
35+
{
36+
error_clear_last();
37+
$safeResult = \openssl_cipher_key_length($cipher_algo);
38+
if ($safeResult === false) {
39+
throw OpensslException::createFromPhpError();
40+
}
41+
return $safeResult;
42+
}
43+
44+
2645
/**
2746
* Decrypts a CMS message.
2847
*

generated/sodium.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,27 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message,
324324
throw SodiumException::createFromPhpError();
325325
}
326326
}
327+
328+
329+
/**
330+
* The function is similar to sodium_crypto_stream_xchacha20_xor
331+
* but adds the ability to set the initial value of the block counter to a non-zero value.
332+
* This permits direct access to any block without having to compute the previous ones.
333+
*
334+
* @param string $message The message to encrypt.
335+
* @param string $nonce 24-byte nonce.
336+
* @param int $counter The initial value of the block counter.
337+
* @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen.
338+
* @return string Encrypted message.
339+
* @throws SodiumException
340+
*
341+
*/
342+
function sodium_crypto_stream_xchacha20_xor_ic(string $message, string $nonce, int $counter, string $key): string
343+
{
344+
error_clear_last();
345+
$safeResult = \sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key);
346+
if ($safeResult === false) {
347+
throw SodiumException::createFromPhpError();
348+
}
349+
return $safeResult;
350+
}

rector-migrate.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
'curl_share_errno' => 'Safe\curl_share_errno',
114114
'curl_share_setopt' => 'Safe\curl_share_setopt',
115115
'curl_unescape' => 'Safe\curl_unescape',
116+
'curl_upkeep' => 'Safe\curl_upkeep',
116117
'date' => 'Safe\date',
117118
'date_parse' => 'Safe\date_parse',
118119
'date_parse_from_format' => 'Safe\date_parse_from_format',
@@ -645,6 +646,7 @@
645646
'opendir' => 'Safe\opendir',
646647
'openlog' => 'Safe\openlog',
647648
'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length',
649+
'openssl_cipher_key_length' => 'Safe\openssl_cipher_key_length',
648650
'openssl_cms_decrypt' => 'Safe\openssl_cms_decrypt',
649651
'openssl_cms_encrypt' => 'Safe\openssl_cms_encrypt',
650652
'openssl_cms_read' => 'Safe\openssl_cms_read',
@@ -961,6 +963,7 @@
961963
'sodium_crypto_secretbox_open' => 'Safe\sodium_crypto_secretbox_open',
962964
'sodium_crypto_sign_open' => 'Safe\sodium_crypto_sign_open',
963965
'sodium_crypto_sign_verify_detached' => 'Safe\sodium_crypto_sign_verify_detached',
966+
'sodium_crypto_stream_xchacha20_xor_ic' => 'Safe\sodium_crypto_stream_xchacha20_xor_ic',
964967
'solr_get_version' => 'Safe\solr_get_version',
965968
'spl_autoload_register' => 'Safe\spl_autoload_register',
966969
'spl_autoload_unregister' => 'Safe\spl_autoload_unregister',

0 commit comments

Comments
 (0)