Download src/php/php-src/ext/openssl/tests/bug52093.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 735 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/openssl/tests/bug52093.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/openssl/tests/bug52093.phpt
-
curl -L -o bug52093.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/openssl/tests/bug52093.phpt
735 Bytes
| --TEST-- | |
| Bug #52093 (openssl_csr_sign truncates $serial) | |
| --EXTENSIONS-- | |
| openssl | |
| --SKIPIF-- | |
| if (PHP_INT_SIZE !== 8) die("skip this test is for 64bit platforms only"); | |
| --FILE-- | |
| $dn = array( | |
| "countryName" => "BR", | |
| "stateOrProvinceName" => "Rio Grande do Sul", | |
| "localityName" => "Porto Alegre", | |
| "commonName" => "Henrique do N. Angelo", | |
| "emailAddress" => "hnangelo@php.net" | |
| ); | |
| $options = ['config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf']; | |
| $privkey = openssl_pkey_new(); | |
| $csr = openssl_csr_new($dn, $privkey, $options); | |
| $cert = openssl_csr_sign($csr, null, $privkey, 365, $options, PHP_INT_MAX); | |
| var_dump(openssl_x509_parse($cert)['serialNumber']); | |
| --EXPECT-- | |
| string(19) "9223372036854775807" | |