Merge branch '2.0'

This commit is contained in:
terrafrost 2017-03-07 22:20:21 -06:00
commit 22bf2339d7
2 changed files with 19 additions and 1 deletions

View File

@ -2418,7 +2418,7 @@ class X509
$altName = [];
if (isset($subject->domains) && count($subject->domains) > 1) {
$altName = array_map(['X509', '_dnsName'], $subject->domains);
$altName = array_map(['\phpseclib\File\X509', 'dnsName'], $subject->domains);
}
if (isset($subject->ipAddresses) && count($subject->ipAddresses)) {

View File

@ -453,4 +453,22 @@ Mj93S
runkit_constant_remove('FILE_X509_IGNORE_TYPE');
}
// fixed by #1104
public function testMultipleDomainNames()
{
extract(RSA::createKey(512));
$subject = new X509();
$subject->setDomain('example.com', 'example.net');
$subject->setPublicKey($publickey);
$issuer = new X509();
$issuer->setPrivateKey($privatekey);
$issuer->setDN($subject->getDN());
$x509 = new X509();
$x509->sign($issuer, $subject);
}
}