@@ -18,6 +18,9 @@ |
||
| 18 | 18 | return new self($keyData); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @return string |
|
| 23 | + */ |
|
| 21 | 24 | public function getKeyAsString() |
| 22 | 25 | { |
| 23 | 26 | return $this->keyData['PEM']; |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace SAML2\Certificate; |
| 6 | 6 | |
| 7 | -use SAML2\Exception\InvalidArgumentException; |
|
| 8 | - |
|
| 9 | 7 | final class PrivateKey extends Key |
| 10 | 8 | { |
| 11 | 9 | public static function create(string $keyContents, string $passphrase = null) |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | |
| 70 | 70 | // ported from |
| 71 | 71 | // https://github.com/simplesamlphp/simplesamlphp/blob/3d735912342767d391297cc5e13272a76730aca0/lib/SimpleSAML/Configuration.php#L1119 |
| 72 | - if ($configuration->hasValue($prefix . 'certificate')) { |
|
| 72 | + if ($configuration->hasValue($prefix.'certificate')) { |
|
| 73 | 73 | $extracted['certificateData'] = $configuration->getString($prefix.'certificate'); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | if (!$xml->hasAttribute('index')) { |
| 45 | - throw new \Exception('Missing index on ' . $xml->tagName); |
|
| 45 | + throw new \Exception('Missing index on '.$xml->tagName); |
|
| 46 | 46 | } |
| 47 | 47 | $this->index = intval($xml->getAttribute('index')); |
| 48 | 48 | |