zoukankan      html  css  js  c++  java
  • WCF NetTcpBinding Transport安全模式(8) ClientCredentialType证书验证模式 PeerOrChainTrust验证模式

    WCF NetTcpBinding Transport安全模式(8)    ClientCredentialType证书验证模式----    PeerOrChainTrust验证模式

    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/
    原文链接:http://www.cnblogs.com/xuanhun/ 更多内容,请访问我的个人站点 对编程,安全感兴趣的,加qq群:hacking-1群:303242737,hacking-2群:147098303,nw.js,electron交流群 313717550。
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
    关注我:关注玄魂的微信公众号

  • 相关阅读:
    网络编程-Python的socket库
    Python -用虚拟环境保存库文件
    Python --文件的读写
    VIM--常用操作
    libpcap -学习1
    Python -装饰器
    C++ 关于map,function的简单应用
    UVAlive 3635 (13.08.23)
    C语言中的整型提升(integral promotion)
    [置顶] 从一位数组中提取最小k个元素
  • 原文地址:https://www.cnblogs.com/xuanhun/p/2560102.html
Copyright © 2011-2022 走看看