本文共 913 字,大约阅读时间需要 3 分钟。
PeerOrChainTrust验证模式验证证书是否位于 TrustedPeople 证书存储区中,或通过构建证书信任链来验证证书。如果证书通过任一验证方法,就是受信任的。设置验证模式为“PeerOrChainTrust”的配置如以下代码所示。
在服务端设置验证客户端凭据模式为“PeerOrChainTrust”:
<clientCertificate >
<certificate findValue="XuanhunClient"
storeLocation="CurrentUser"
storeName="My"
x509FindType="FindBySubjectName"/>
<authentication certificateValidationMode="PeerOrChainTrust" trustedStoreLocation="CurrentUser" />
</clientCertificate>
在客户端设置验证服务端凭据模式为“PeerOrChainTrust”:
<serviceCertificate >
<defaultCertificate
x509FindType="FindBySubjectName"
storeLocation="CurrentUser"
storeName="TrustedPeople"
findValue="XuanhunServer"
/>
<authentication certificateValidationMode="PeerOrChainTrust" />
</serviceCertificate>
--------------注:本文部分内容改编自《.NET 安全揭秘》
本文转自玄魂博客园博客,原文链接:http://www.cnblogs.com/xuanhun/archive/2012/06/24/2560102.html,如需转载请自行联系原作者