<commit_before><?php

namespace SAML2;

use RobRichards\XMLSecLibs\XMLSecurityKey;
use SAML2\Exception\RuntimeException;
use SimpleSAML_Configuration;
use SimpleSAML_Utilities;

/**
 * Implementation of the SAML 2.0 SOAP binding.
 *
 * @author <NAME>
 * @package SimpleSAMLphp
 */
class SOAPClient
{
    const START_SOAP_ENVELOPE = '<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/><soap-env:Body>';
    const END_SOAP_ENVELOPE = '</soap-env:Body></soap-env:Envelope>';

    /**
     * This function sends the SOAP message to the service location and returns SOAP response
     *
     * @param  \SAML2\Message            $msg         The request that should be sent.
     * @param  \SimpleSAML_Configuration $srcMetadata The metadata of the issuer of the message.
     * @param  \SimpleSAML_Configuration $dstMetadata The metadata of the destination of the message.
     * @return \SAML2\Message            The response we received.
     * @throws \Exception
     */
    public function send(Message $msg, SimpleSAML_Configuration $srcMetadata, SimpleSAML_Configuration $dstMetadata = null)
    {
        $issuer = $msg->getIssuer();

        $ctxOpts = array(
            'ssl' => array(
                'capture_peer_cert' => true,
            ),
        );

        // Determine if we are going to do a MutualSSL connection between the IdP and SP  - Shoaib
        if ($srcMetadata->hasValue('saml.SOAPClient.certificate')) {
            $cert = $srcMetadata->getValue('saml.SOAPClient.certificate');
            if ($cert !== false) {<commit_msg>Allow self-signed certificate at SOAP server<commit_after><?php

namespace SAML2;

use RobRichards\XMLSecLibs\XMLSecurityKey;
use SAML2\Exception\RuntimeException;
use SimpleSAML_Configuration;
use SimpleSAML_Utilities;

/**
 * Implementation of the SAML 2.0 SOAP binding.
 *
 * @author <NAME>
 * @package SimpleSAMLphp
 */
class SOAPClient
{
    const START_SOAP_ENVELOPE = '<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/><soap-env:Body>';
    const END_SOAP_ENVELOPE = '</soap-env:Body></soap-env:Envelope>';

    /**
     * This function sends the SOAP message to the service location and returns SOAP response
     *
     * @param  \SAML2\Message            $msg         The request that should be sent.
     * @param  \SimpleSAML_Configuration $srcMetadata The metadata of the issuer of the message.
     * @param  \SimpleSAML_Configuration $dstMetadata The metadata of the destination of the message.
     * @return \SAML2\Message            The response we received.
     * @throws \Exception
     */
    public function send(Message $msg, SimpleSAML_Configuration $srcMetadata, SimpleSAML_Configuration $dstMetadata = null)
    {
        $issuer = $msg->getIssuer();

        $ctxOpts = array(
            'ssl' => array(
                'capture_peer_cert' => true,
                'allow_self_signed' => true
            ),
        );

        // Determine if we are going to do a MutualSSL connection between the IdP and SP  - Shoaib
        if ($srcMetadata->hasValue('saml.SOAPClient.certificate')) {
            $cert = $srcMetadata->getValue('saml.SOAPClient.certificate');
            if ($cert !== false) {
{'fraction_non_alphanumeric': 0.10737228510247782, 'fraction_numerical': 0.0036708473539308656, 'mean_word_length': 2.856132075471698, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '739064', 'n_tokens_mistral': 993, 'n_tokens_neox': 947, 'n_words': 255}