Пример #1
0
 /// <summary>
 /// SSL
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="serverCert"></param>
 /// <param name="clientCert"></param>
 /// <param name="nombreServerCert"></param>
 /// <param name="endpoint"></param>
 /// <param name="clientObject"></param>
 /// <returns></returns>
 public static IScsServiceClient <T> CreateSslClient <T>(ScsEndPoint endpoint, X509Certificate2 serverCert, string hostAddress, SslScsAuthMode authMode, X509Certificate2 clientCert, object clientObject = null) where T : class
 {
     return(new ScsServiceClient <T>(endpoint.CreateSslClient(serverCert, authMode, clientCert, hostAddress), clientObject));
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="endpoint"></param>
 /// <param name="serverCertificate"></param>
 /// <param name="sslHostAddress"></param>
 /// <param name="authMode"></param>
 /// <param name="clientCertificate"></param>
 /// <returns></returns>
 public static IScsClient CreateSslClient(ScsEndPoint endpoint, X509Certificate2 serverCertificate
                                          , string sslHostAddress   = ""
                                          , SslScsAuthMode authMode = SslScsAuthMode.ServerAuth, X509Certificate clientCertificate = null)
 {
     return(endpoint.CreateSslClient(serverCertificate, authMode, clientCertificate, sslHostAddress));
 }