I set expected client certificate to "A":
host.Credentials.ClientCertificate.SetCertificate("A", ...);
host.Credentials.ServiceCertificate.SetCertificate("B", ...);
Binding:
new NetTcpBinding
{
Security =
{
Mode = SecurityMode.TransportWithMessageCredential,
Transport = { ProtectionLevel = ProtectionLevel.EncryptAndSign },
Message = { ClientCredentialType = MessageCredentialType.Certificate }
}
}
I expect the server to allow only clients with certificate "A". But instead it allows other trusted certificates too. I've changed client app.config to use "B" instead of "A" and it still works!
What's wrong in my setup?