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
|
@@ 196-206 (lines=11) @@
|
193 |
|
/** |
194 |
|
* @return XMLSecurityKey |
195 |
|
*/ |
196 |
|
private function loadPrivateKey() |
197 |
|
{ |
198 |
|
$key = new PrivateKey('/var/www/ci/certificates/sp.pem', 'default'); |
199 |
|
$keyLoader = new PrivateKeyLoader(); |
200 |
|
$privateKey = $keyLoader->loadPrivateKey($key); |
201 |
|
|
202 |
|
$xmlSecurityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'private']); |
203 |
|
$xmlSecurityKey->loadKey($privateKey->getKeyAsString()); |
204 |
|
|
205 |
|
return $xmlSecurityKey; |
206 |
|
} |
207 |
|
|
208 |
|
/** |
209 |
|
* @return string |