mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
21 lines
462 B
PHP
21 lines
462 B
PHP
--TEST--
|
|
GH-19369: openssl_sign with alias algorithms
|
|
--EXTENSIONS--
|
|
openssl
|
|
--SKIPIF--
|
|
<?php
|
|
if (!in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
|
|
die('skip sha256WithRSAEncryption alias not present');
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$data = "Testing openssl_sign() with alias algorithm";
|
|
$privkey = "file://" . __DIR__ . "/private_rsa_1024.key";
|
|
|
|
var_dump(openssl_sign($data, $sign, $privkey, 'sha256WithRSAEncryption'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|