@@ -15,9 +15,10 @@ class SAML2_SOAPClient {
1515 * This function sends the SOAP message to the service location and returns SOAP response
1616 *
1717 * @param SAML2_Message $m The request that should be sent.
18+ * @param SimpleSAML_Configuration $srcMetadata The metadata of the issuer of the message.
1819 * @return SAML2_Message The response we received.
1920 */
20- public function send (SAML2_Message $ msg , SimpleSAML_Configuration $ spMetadata ) {
21+ public function send (SAML2_Message $ msg , SimpleSAML_Configuration $ srcMetadata ) {
2122
2223 $ issuer = $ msg ->getIssuer ();
2324
@@ -27,15 +28,15 @@ public function send(SAML2_Message $msg, SimpleSAML_Configuration $spMetadata) {
2728 );
2829
2930 // Determine if we are going to do a MutualSSL connection between the IdP and SP - Shoaib
30- if ($ spMetadata ->hasValue ('saml.SOAPClient.certificate ' )) {
31- $ options ['local_cert ' ] = SimpleSAML_Utilities::resolveCert ($ spMetadata ->getString ('saml.SOAPClient.certificate ' ));
32- if ($ spMetadata ->hasValue ('saml.SOAPClient.privatekey_pass ' )) {
33- $ options ['passphrase ' ] = $ spMetadata ->getString ('saml.SOAPClient.privatekey_pass ' );
31+ if ($ srcMetadata ->hasValue ('saml.SOAPClient.certificate ' )) {
32+ $ options ['local_cert ' ] = SimpleSAML_Utilities::resolveCert ($ srcMetadata ->getString ('saml.SOAPClient.certificate ' ));
33+ if ($ srcMetadata ->hasValue ('saml.SOAPClient.privatekey_pass ' )) {
34+ $ options ['passphrase ' ] = $ srcMetadata ->getString ('saml.SOAPClient.privatekey_pass ' );
3435 }
3536 } else {
3637 /* Use the SP certificate and privatekey if it is configured. */
37- $ privateKey = SimpleSAML_Utilities::loadPrivateKey ($ spMetadata );
38- $ publicKey = SimpleSAML_Utilities::loadPublicKey ($ spMetadata );
38+ $ privateKey = SimpleSAML_Utilities::loadPrivateKey ($ srcMetadata );
39+ $ publicKey = SimpleSAML_Utilities::loadPublicKey ($ srcMetadata );
3940 if ($ privateKey !== NULL && $ publicKey !== NULL && isset ($ publicKey ['PEM ' ])) {
4041 $ keyCertData = $ privateKey ['PEM ' ] . $ publicKey ['PEM ' ];
4142 $ file = SimpleSAML_Utilities::getTempDir () . '/ ' . sha1 ($ keyCertData ) . '.pem ' ;
0 commit comments