【发布时间】:2016-01-22 11:10:03
【问题描述】:
我有一个 WCF 服务和一个桌面客户端。我使用 net.tcp 绑定。我有自己的身份验证方法,但是我希望对消息进行加密。所以我在双方都安装了相同的证书。我的配置如下:
<endpointBehaviors>
<behavior name="CustomBehavior">
<clientCredentials>
<clientCertificate storeLocation="CurrentUser" storeName="Root" findValue="myCertificateIssuer" x509FindType="FindByIssuerName" />
</clientCredentials>
</behavior>
</endpointBehaviors>
...
<binding name="simpleTCP" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" >
<security mode="None">
<message clientCredentialType="Certificate"/>
</security>
</binding>
我在服务器上也有相同的配置。该解决方案正在运行,但我不知道它是否真的加密了消息。我是否正确地认为,此配置关闭了默认身份验证,但仍加密通道?
提前致谢
【问题讨论】:
标签: c# wcf encryption tcp certificate