开发者

WCF client certificate signing : how to?

So I have a WCF service where I have various pa开发者_如何学Pythonrts of the service contract with a ProtectionLevel of Sign. I set the credentials on the client side by choosing a certificate from the certificate store. This is fine.

However ....

  1. Does this client certificate need to be in the 3rd party certificate store on the server for this to work?
  2. If this is the case how can I configure a service which accepts any client certificate?
  3. And finally how do I access the signing certificate within the implementation of the operations which require signed messages? Just the signing certificate subject name would do fine!

Thanks


Ah the joy of self answering.

So

  1. "It depends". If you have ChainOrPeer validation then both the chain or the presence of the certificate in the trusted people store results in success. Only validating on chain obviously checks the chain, setting Peer validation uses the store, and None lets everything through.

  2. Set the validation mode to none

  3. The SecurityContext for the request contains an X509CertificateClaimSet which in turn exposes the certificate itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜