Аутентификация SOAP с сертификатом ws-security x.509 в php - PullRequest
0 голосов
/ 16 декабря 2018

Я хочу преобразовать код ac # в скрипт php.Вот файл App.config кода c #.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>
    <system.serviceModel>
      <behaviors>
        <endpointBehaviors>
          <behavior name="m***bTest">
            <clientCredentials>
              <clientCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" findValue="q***mm***b.bankm***t.ir"/>
            </clientCredentials>
          </behavior>
        </endpointBehaviors>
      </behaviors>
        <bindings>
            <customBinding>
                <binding name="WSHttpBinding_IStatementService">
                    <security defaultAlgorithmSuite="Default" authenticationMode="MutualCertificate"
                        requireDerivedKeys="true" includeTimestamp="true" messageProtectionOrder="SignBeforeEncrypt"
                        messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
                        requireSignatureConfirmation="true">
                        <localClientSettings detectReplays="true" />
                        <localServiceSettings detectReplays="true" />
                    </security>
                    <textMessageEncoding />
                    <httpTransport />
                </binding>
            </customBinding>
        </bindings>
        <client>
            <endpoint address="http://q***m.m***b.bankm***t.ir/externalServices/Account/StatementService.svc"
                behaviorConfiguration="m***bTest" binding="customBinding"
                bindingConfiguration="WSHttpBinding_IStatementService" contract="ServiceReference1.IStatementService"
                name="WSHttpBinding_IStatementService">
                <identity>
                  <certificate encodedValue="AwAA********dT6gV+Pipw=" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

Я попробовал проект https://github.com/robrichards/wse-php, и в результате было получено время ожидания шлюза.Есть ли в любом случае

...