|
12 | 12 | use SAML2\Exception\InvalidArgumentException; |
13 | 13 | use SAML2\Exception\UnparseableXmlException; |
14 | 14 | use SimpleSAML\Configuration; |
15 | | -use SimpleSAML\Utils\Config; |
16 | | -use SimpleSAML\Utils\Crypto; |
| 15 | +use SimpleSAML\Utils; |
17 | 16 | //use SoapClient as BuiltinSoapClient; |
18 | 17 | use SOAP_1_1; |
19 | 18 |
|
@@ -58,17 +57,20 @@ public function send(Message $msg, Configuration $srcMetadata, Configuration $ds |
58 | 57 | if ($srcMetadata->hasValue('saml.SOAPClient.certificate')) { |
59 | 58 | $cert = $srcMetadata->getValue('saml.SOAPClient.certificate'); |
60 | 59 | if ($cert !== false) { |
61 | | - $ctxOpts['ssl']['local_cert'] = Config::getCertPath( |
| 60 | + $configUtils = new Utils\Config(); |
| 61 | + $ctxOpts['ssl']['local_cert'] = $configUtils->getCertPath( |
62 | 62 | $srcMetadata->getString('saml.SOAPClient.certificate') |
63 | 63 | ); |
64 | 64 | if ($srcMetadata->hasValue('saml.SOAPClient.privatekey_pass')) { |
65 | 65 | $ctxOpts['ssl']['passphrase'] = $srcMetadata->getString('saml.SOAPClient.privatekey_pass'); |
66 | 66 | } |
67 | 67 | } |
68 | 68 | } else { |
| 69 | + $cryptoUtils = new Utils\Crypto(); |
| 70 | + |
69 | 71 | /* Use the SP certificate and privatekey if it is configured. */ |
70 | | - $privateKey = Crypto::loadPrivateKey($srcMetadata); |
71 | | - $publicKey = Crypto::loadPublicKey($srcMetadata); |
| 72 | + $privateKey = $cryptoUtils->loadPrivateKey($srcMetadata); |
| 73 | + $publicKey = $cryptoUtils->loadPublicKey($srcMetadata); |
72 | 74 | if ($privateKey !== null && $publicKey !== null && isset($publicKey['PEM'])) { |
73 | 75 | $keyCertData = $privateKey['PEM'].$publicKey['PEM']; |
74 | 76 | $file = $container->getTempDir().'/'.sha1($keyCertData).'.pem'; |
|
0 commit comments