php-src/ext/phar/tests/phar_get_supported_signatures_001.phpt
Greg Beaver 5fbeb235d2 add openssl signing support. This adds an extra parameter
for the contents of the exported private key to Phar->setSignatureAlgorithm, and expects the public key to be in
a file named blah.phar.pubkey in the same directory as the phar blah.phar.  This works with openssl static or
shared and fails gracefully if openssl is not present without adding a dependency. config.w32 needs updating to match config.m4 [DOC]
2008-06-01 04:21:26 +00:00

24 lines
468 B
PHP

--TEST--
Phar::getSupportedSignatures()
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (extension_loaded("hash")) die("skip extension hash conflicts"); ?>
<?php if (extension_loaded("openssl")) die("skip extension openssl loaded"); ?>
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
<?php
var_dump(Phar::getSupportedSignatures());
?>
===DONE===
?>
--EXPECT--
array(2) {
[0]=>
string(3) "MD5"
[1]=>
string(5) "SHA-1"
}
===DONE===