We are trying to reference a certificate for a client endpoint configuration in our WCF configuration file.
The configuration looks like this:
<client>
<endpoint address="https://domain.server.com/path/service.asmx"
binding="basicHttpBinding" bindingConfiguration="TestServiceSoap"
contract="..." name="...">
<identity>
<certificateReference storeName="TrustedPublisher"
x509FindType="FindBySubjectDistinguishedName"
findValue="...">....
For a test-certificate, the "Subject" property looks like this:
CN = demo.domain.com
OU = Company
O = Company
L = City
S = County
C = CountryCode
This works, if we provide the following for the findValue
attribute above:
CN=demo.domain.com, OU=Company, O=Company, L=City, S=County, C=CountryCode
However, for a certificate we have from a third party, they have added their address as one part of this, so the above list of identifiers looks like this:
CN = demo.domain.com
OU = Company
STREET = Mainstreet 1, Town Center
L = City
S = County
C = CountryCode
Obviously, the comma in the STREET part will not work, as our string now contains "Town Center" as a separate part with no name.
How do we specify that we want to find the certificate using this list of identifiers?
CN=demo.domain.com, OU=Company, O=Company, STREET=Mainstreet 1, Town Center, L=City, S=County, C=CountryCode
^-- Argh!