src/Surfnet/StepupGateway/GatewayBundle/Saml/AssertionSigningService.php 1 location
|
@@ 55-65 (lines=11) @@
|
| 52 |
|
/** |
| 53 |
|
* @return XMLSecurityKey |
| 54 |
|
*/ |
| 55 |
|
private function loadPrivateKey() |
| 56 |
|
{ |
| 57 |
|
$key = $this->identityProvider->getPrivateKey(PrivateKey::NAME_DEFAULT); |
| 58 |
|
$keyLoader = new PrivateKeyLoader(); |
| 59 |
|
$privateKey = $keyLoader->loadPrivateKey($key); |
| 60 |
|
|
| 61 |
|
$xmlSecurityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']); |
| 62 |
|
$xmlSecurityKey->loadKey($privateKey->getKeyAsString()); |
| 63 |
|
|
| 64 |
|
return $xmlSecurityKey; |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
/** |
| 68 |
|
* @return string |
tests/src/Controller/IdentityProviderController.php 1 location
|
@@ 215-225 (lines=11) @@
|
| 212 |
|
/** |
| 213 |
|
* @return XMLSecurityKey |
| 214 |
|
*/ |
| 215 |
|
private function loadPrivateKey() |
| 216 |
|
{ |
| 217 |
|
$key = new PrivateKey('/var/www/ci/certificates/sp.pem', 'default'); |
| 218 |
|
$keyLoader = new PrivateKeyLoader(); |
| 219 |
|
$privateKey = $keyLoader->loadPrivateKey($key); |
| 220 |
|
|
| 221 |
|
$xmlSecurityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']); |
| 222 |
|
$xmlSecurityKey->loadKey($privateKey->getKeyAsString()); |
| 223 |
|
|
| 224 |
|
return $xmlSecurityKey; |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
/** |
| 228 |
|
* @return string |