mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 10:15:14 +00:00
Merge branch '2.0'
This commit is contained in:
commit
22bf2339d7
@ -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)) {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user