5.10.3 Sertifikāta konfigurēšanas piemērs

Izmantojot PFAS AUTH lietotni VRAA administratoriem  ir jāpievieno jauns sertifikāts, ar kuru IS slēgsies pie E-parakstītāja. Šī sertifikāta kods ir jāreģistrē konfigurācijas failā (piemēram, web.config), kas veiks pieslēgšanos E-parakstītājam:

  <system.serviceModel>
      <bindings>
        <basicHttpBinding>
          <binding name="basicBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
            receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
            bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="2000000000" maxBufferPoolSize="2000000000" maxReceivedMessageSize="2000000000"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
            <security mode="Transport">
              <transport clientCredentialType="Certificate" proxyCredentialType="None"
                realm="" />
              <message clientCredentialType="UserName" algorithmSuite="Default" />
            </security>
          </binding>
        </basicHttpBinding>
      </bindings>
   
           <behaviors>
                  <endpointBehaviors>
                         <behavior name="ClientCertificateBehavior">
                               <clientCredentials>
                                     <clientCertificate findValue="ea 11 d2 41 45 ed 98 c3 a0 59 27 14 fd bf 57 fd 42 29 9f 3a" storeLocation="CurrentUser" storeName="My" x509FindType="FindByThumbprint"></clientCertificate>
                               </clientCredentials>
                         </behavior>
   
                  </endpointBehaviors>
           </behaviors>
          
      <client>
        <endpoint address="https://signetest.vraa.gov.lv/VRAA.DIV.Services.DivDocuments.Endpoint.WCFX.509/DivDocumentsWS.svc"
          behaviorConfiguration="ClientCertificateBehavior" binding="basicHttpBinding" bindingConfiguration="basicBinding"
          contract="dds.IDivDocumentsWS" name="basicBinding" />
      </client>
    </system.serviceModel>