Merge pull request #805 from raarts/Accept-RSA-key-with-crlf-v2

Also accept an RSA key with crlf
This commit is contained in:
Andrew Millington
2018-01-23 22:24:52 +00:00
committed by GitHub
6 changed files with 40 additions and 2 deletions

View File

@@ -33,5 +33,13 @@ class CryptKeyTest extends TestCase
'file://' . sys_get_temp_dir() . '/' . sha1($keyContent) . '.key',
$key->getKeyPath()
);
$keyContent = file_get_contents(__DIR__ . '/Stubs/private.key.crlf');
$key = new CryptKey($keyContent);
$this->assertEquals(
'file://' . sys_get_temp_dir() . '/' . sha1($keyContent) . '.key',
$key->getKeyPath()
);
}
}