示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="endpoint"></param>
 /// <param name="clientCert"></param>
 /// <param name="nombreServerCert"></param>
 /// <param name="pingTimeout"></param>
 /// <param name="remoteCertificateFalidatonCallback"></param>
 /// <param name="localCertificateSelectionCallback"></param>
 /// <returns></returns>
 public static IScsClient CreateSecureClient(ScsEndPoint endpoint, X509Certificate2 clientCert, string nombreServerCert, TimeSpan pingTimeout, Func <object, X509Certificate, X509Chain, SslPolicyErrors, bool> remoteCertificateFalidatonCallback = null, Func <object, string, X509CertificateCollection, X509Certificate, string[], X509Certificate> localCertificateSelectionCallback = null)
 {
     return(endpoint.CreateSecureClient(clientCert, nombreServerCert, pingTimeout.Seconds <= 0?30000:pingTimeout.Seconds, remoteCertificateFalidatonCallback, localCertificateSelectionCallback));
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="clientCert"></param>
 /// <param name="nombreServerCert"></param>
 /// <param name="endpoint"></param>
 /// <param name="pingTimeout"></param>
 /// <param name="remoteCertificateFalidatonCallback"></param>
 /// <param name="localCertificateSelectionCallback"></param>
 /// <param name="clientObject"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 public static IScsServiceClient <T> CreateSecureClient <T>(X509Certificate2Collection clientCert, string nombreServerCert, ScsEndPoint endpoint, TimeSpan pingTimeout = default(TimeSpan), Func <object, X509Certificate, X509Chain, SslPolicyErrors, bool> remoteCertificateFalidatonCallback = null, Func <object, string, X509CertificateCollection, X509Certificate, string[], X509Certificate> localCertificateSelectionCallback = null, object clientObject = null) where T : class
 {
     return(new ScsServiceClient <T>(endpoint.CreateSecureClient(clientCert, nombreServerCert, pingTimeout.Seconds <= 0?30000:pingTimeout.Seconds, remoteCertificateFalidatonCallback, localCertificateSelectionCallback), clientObject));
 }
示例#3
0
 /// <summary>
 /// SSL
 /// </summary>
 /// <param name="endpoint"></param>
 /// <param name="serverCert"></param>
 /// <param name="clientCert"></param>
 /// <param name="nombreServerCert"></param>
 /// <returns></returns>
 public static IScsClient CreateSecureClient(ScsEndPoint endpoint, X509Certificate2 serverCert, X509Certificate2 clientCert, string nombreServerCert)
 {
     return(endpoint.CreateSecureClient(serverCert, clientCert, nombreServerCert));
 }
示例#4
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> CreateSecureClient <T>(X509Certificate2 serverCert, X509Certificate2 clientCert, string nombreServerCert, ScsEndPoint endpoint, object clientObject = null) where T : class
 {
     return(new ScsServiceClient <T>(endpoint.CreateSecureClient(serverCert, clientCert, nombreServerCert), clientObject));
 }