Fixed tests, allow whitespace at the end of a key

This commit is contained in:
Ron Arts
2018-01-03 10:18:32 +01:00
parent 2ec8d148b0
commit 91d9c11fb4
2 changed files with 9 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ namespace League\OAuth2\Server;
class CryptKey
{
const RSA_KEY_PATTERN =
'/^(-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----).+(-----END (RSA )?(PUBLIC|PRIVATE) KEY-----)$/s';
'/^(-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----).+(-----END (RSA )?(PUBLIC|PRIVATE) KEY-----)\s*$/s';
/**
* @var string