<?xml version="1.0" encoding="utf-8"?>
<!-- Wersja 14 19.10.2023 -->
<configuration>
	<startup>
		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
	</startup>
	<system.serviceModel>
		<behaviors>
			<endpointBehaviors>
				<behavior name="BehEREC">
					<CustomClientCreds>
						<!-- Tutaj wpisujemy odcisk palca certyfikatu TLS eRecepta         -->
						<clientCertificate findValue="c56f2f0877d7d37a09de4a6a059a761bca76f460" x509FindType="FindByThumbprint"/>
						<!-- Tutaj wpisujemy odcisk palca certyfikatu WSS eRecepta         -->
						<ClientMessageCertificate findValue="149fb3fb86ee8f46ba3198ea5516917ac0c8b3cd" x509FindType="FindByThumbprint"/>
					</CustomClientCreds>
				</behavior>
				<behavior name="BehFals">
					<clientCredentials>
						<!-- Tutaj wpisujemy odcisk palca certyfikatu NMVS (weryfikacja opakowan)   -->
						<clientCertificate x509FindType="FindByThumbprint" findValue="7873b8fb5d229a348fa70bffbf179c8ead23f584"/>
						<serviceCertificate>
							<authentication revocationMode="NoCheck" certificateValidationMode="None" />
						</serviceCertificate>
					</clientCredentials>
				</behavior>
				<behavior name="BehSMOPL">
					<clientCredentials>
						<!-- Tutaj wpisujemy odcisk palca certyfikatu SMOPL  -->
						<clientCertificate findValue="dd944e2c840468cb557202914fecaa629eab1fb8" storeLocation="CurrentUser" storeName="My" x509FindType="FindByThumbprint"/>
						<serviceCertificate>
							<!-- Tutaj wpisujemy odcisk palca certyfikatu SMOPL  ten sam-->
							<defaultCertificate findValue="dd944e2c840468cb557202914fecaa629eab1fb8" storeLocation="CurrentUser" storeName="My" x509FindType="FindByThumbprint"/>
							<authentication certificateValidationMode="None" trustedStoreLocation="LocalMachine"/>
						</serviceCertificate>
					</clientCredentials>
				</behavior>
			</endpointBehaviors>
		</behaviors>
		<bindings>
			<basicHttpBinding>
				<binding name="KsHTTPS"  maxReceivedMessageSize="1524288" maxBufferSize="1524288" sendTimeout="00:10:00">
					<security mode="Transport" />
				</binding>
				<binding name="FalsBB"  maxBufferSize="5242880" maxReceivedMessageSize="5242880">
					<security mode="Transport">
						<transport clientCredentialType="Certificate" />
					</security>
				</binding>
				<binding name="ServiceBrokerAnonymousSoapBinding" messageEncoding="Mtom"/>
			</basicHttpBinding>
			<customBinding>
				<binding name="ObslugaReceptyWSSoap11Binding">
					<gzipMessageEncoding innerMessageEncoding="textMessageEncoding" />
					<security allowSerializedSigningTokenOnReply="false" enableUnsecuredResponse="true"
            authenticationMode="MutualCertificate" includeTimestamp="false"
            messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
						<secureConversationBootstrap enableUnsecuredResponse="true" authenticationMode="MutualCertificate"
              requireDerivedKeys="false" />
					</security>
					<context protectionLevel="Sign" />
          <httpsTransport maxReceivedMessageSize="5242880" maxBufferSize="5242880"
            requireClientCertificate="true" />
				</binding>
				<binding name="BindSMOPL" openTimeout="00:10:00"
                 closeTimeout="00:10:00"
                 sendTimeout="00:10:00"
                 receiveTimeout="00:10:00">
					<gzipMessageEncodingSMOPL innerMessageEncoding="textMessageEncoding"/>
					<security enableUnsecuredResponse="true" authenticationMode="MutualCertificate"
            includeTimestamp="false" messageProtectionOrder="SignBeforeEncrypt"
            messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
						<secureConversationBootstrap enableUnsecuredResponse="true" authenticationMode="MutualCertificate"
              requireDerivedKeys="false" />
					</security>
					<context protectionLevel="Sign" />
					<httpsTransport maxReceivedMessageSize="52428800" maxBufferSize="52428800" />
				</binding>
			</customBinding>
			<wsHttpBinding>
				<binding name="BindFals"  maxReceivedMessageSize="52428800" >
					<security mode="Transport">
						<transport clientCredentialType="Certificate" />
					</security>
				</binding>
			</wsHttpBinding>
		</bindings>
		<client>
			<!-- adres produkcyjny eRecepta <endpoint address="https://sus.ezdrowie.gov.pl/services/ObslugaReceptyWS.ObslugaReceptyWSHttpSoap11Endpoint" -->
			<!-- adres testowy eRecepta <endpoint address="https://ws-int-p1.csioz.gov.pl/services/ObslugaReceptyWS.ObslugaReceptyWSHttpSoap11Endpoint" -->
			<endpoint address="https://sus.ezdrowie.gov.pl/services/ObslugaReceptyWS.ObslugaReceptyWSHttpSoap11Endpoint"
        behaviorConfiguration="BehEREC" binding="customBinding"
        bindingConfiguration="ObslugaReceptyWSSoap11Binding" contract="RecRef1.ObslugaReceptyWS"
        name="ObslugaReceptyWSHttpSoap11Endpoint">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu WSS eRecepa -->
					<!--<dns value="Apteka_14-uwierzytelnienie danych" />-->
					<dns value="Apteka-uwierzytelnianie danych" />
				</identity>
			</endpoint>
			<endpoint address="https://sus.ezdrowie.gov.pl/services/ObslugaZgodPacjentaWS.ObslugaZgodPacjentaWSHttpSoap11Endpoint"
        behaviorConfiguration="BehEREC" binding="customBinding" bindingConfiguration="ObslugaReceptyWSSoap11Binding"
        contract="ZgodyPacjenta.ObslugaZgodPacjentaWS" name="ObslugaZgodPacjentaWSHttpSoap11Endpoint">
				<identity>
					<dns value="Apteka-uwierzytelnianie danych" />
				</identity>
			</endpoint>
			<!-- Transgraniczne -->
			<endpoint address="https://sus.ezdrowie.gov.pl/services/ObslugaEPbReceptyWS.ObslugaEPbReceptyWSHttpSoap11Endpoint"
        behaviorConfiguration="BehEREC" binding="customBinding" bindingConfiguration="ObslugaReceptyWSSoap11Binding" 
        contract="RecTG.ObslugaEPbReceptyWS" name="ObslugaEPbReceptyWSHttpSoap11Endpoint">
				<identity>
					<dns value="Apteka-uwierzytelnianie danych"/>
				</identity>
			</endpoint>
			<!-- Serializacja -->
			<endpoint address="https://ws-single-transactions-prod-pl.nmvs.eu:8443/WS_SINGLE_TRANSACTIONS_V1/SinglePackServiceV50"
        behaviorConfiguration="BehFals" binding="wsHttpBinding" bindingConfiguration="BindFals"
        contract="FalsSP.ISinglePackServices" name="Port_SinglePackServices">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu NMVS(weryfikacja opakowan) -->
					<dns value="skot1001" />
				</identity>
			</endpoint>
			<endpoint address="https://ws-support-prod-pl.nmvs.eu:8448/WS_SUPPORT_V1/SupportServiceV50"
        behaviorConfiguration="BehFals" binding="wsHttpBinding" bindingConfiguration="BindFals"
        contract="FalsSU.ISupportServices" name="Port_SupportServices">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu NMVS(weryfikacja opakowan) -->
					<dns value="skot1001" />
				</identity>
			</endpoint>
			<endpoint address="https://ws-mixed-bulk-transactions-prod-pl.nmvs.eu:8446/WS_MIXED_BULK_TRANSACTIONS_V1/MixedBulkServiceV50"
        behaviorConfiguration="BehFals" binding="wsHttpBinding" bindingConfiguration="BindFals"
        contract="FalsMB.IMixedBulkServices" name="Port_MixedBulkServices">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu NMVS(weryfikacja opakowan) -->
					<dns value="skot1001" />
				</identity>
			</endpoint>
			<endpoint address="https://ws-bulk-transactions-prod-pl.nmvs.eu:8445/WS_BULK_TRANSACTIONS_V1/BulkServiceV50"
        behaviorConfiguration="BehFals" binding="wsHttpBinding" bindingConfiguration="BindFals"
        contract="FalsBL.IBulkServices" name="Port_BulkServices">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu NMVS(weryfikacja opakowan) -->
					<dns value="skot1001" />
				</identity>
			</endpoint>

			<endpoint address="https://ezwm.nfz.gov.pl/ws-broker-server-ezlec/services/Auth"
        binding="basicHttpBinding" bindingConfiguration="KsHTTPS" contract="KsAuth1.Auth"
        name="KSAuthEndpoint" />
			<endpoint address="https://ezwm.nfz.gov.pl/ws-broker-server-ezlec/services/ServiceBroker"
        binding="basicHttpBinding" bindingConfiguration="KsHTTPS" contract="KSSrvBr.ServiceBroker"
        name="KSServiceBroker" />
			<endpoint address="http://recepty.nfz.gov.pl/ws-broker-server-rzrl/services/ServiceBrokerAnonymous"
          binding="basicHttpBinding" bindingConfiguration="ServiceBrokerAnonymousSoapBinding"
          contract="SkraRec.ServiceBrokerAnonymous" name="ServiceBrokerAnonymous" />
			<endpoint address="https://zsmopl.ezdrowie.gov.pl/cxf/zsmopl/ws/"
        behaviorConfiguration="BehSMOPL" binding="customBinding"
        bindingConfiguration="BindSMOPL" contract="ServiceReference1.ObslugaKomunikatow"
        name="KlientSMOPL">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu SMOPL -->
					<dns value="Apteka-uwierzytelnianie danych" />
					<certificate encodedValue="sha256WithRSAEncryption" />
				</identity>
			</endpoint>
			<endpoint address="https://zsmopl.ezdrowie.gov.pl/cxf/statuskomunikatudmz/"
       behaviorConfiguration="BehSMOPL" binding="customBinding"
       bindingConfiguration="BindSMOPL" contract="SMOPLSt.StatusKomunikatuDMZ" name="StatusKomunikatuDMZ">
				<identity>
					<!-- tutaj wpisujemy Common Name (CN)  z ceryfikatu SMOPL -->
					<dns value="Apteka-uwierzytelnianie danych" />
					<certificate encodedValue="sha256WithRSAEncryption" />
				</identity>
			</endpoint>
			<endpoint address="https://zsmopl.ezdrowie.gov.pl/cxf/stanydmz"  behaviorConfiguration="BehSMOPL" 
			binding="customBinding" bindingConfiguration="BindSMOPL"  contract="SMOPLStan.StanyDMZ" name="StanyMagazynoweDMZ">
				<identity>
					<dns value="Apteka-uwierzytelnianie danych"/>
					<certificate encodedValue="sha256WithRSAEncryption"/>
				</identity>
			</endpoint>
		</client>
		<extensions>
			<behaviorExtensions>
				<add name="CustomClientCreds" type="eRecepta.MyClientCredentialsElement, eRecepta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
			</behaviorExtensions>
			<bindingElementExtensions>
				<add name="gzipMessageEncoding" type="eRecepta.GZipMessageEncodingElement, eRecepta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
				<add name="gzipMessageEncodingSMOPL" type="SMOPL.GZipMessageEncodingElement, SMOPL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
			</bindingElementExtensions>
		</extensions>
	</system.serviceModel>
</configuration>
