/usr/share/php/tests/Horde_Crypt/Horde/Crypt/SmimeTest.php is in php-horde-crypt 2.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <?php
/**
* Horde_Crypt_Smime tests.
*
* @author Michael Slusarz <slusarz@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Crypt
* @subpackage UnitTests
*/
class Horde_Crypt_SmimeTest extends PHPUnit_Framework_TestCase
{
protected function setUp()
{
if (!extension_loaded('openssl')) {
$this->markTestSkipped('No openssl support in PHP.');
}
}
public function testSubjectAltName()
{
$smime = Horde_Crypt::factory('Smime', array(
'temp' => sys_get_temp_dir()
));
$key = file_get_contents(__DIR__ . '/fixtures/smime_subjectAltName.pem');
$this->assertEquals(
'test1@example.com',
$smime->getEmailFromKey($key)
);
}
}
|