Untitled


SUBMITTED BY: Guest

DATE: Nov. 13, 2013, 9:04 p.m.

FORMAT: Text only

SIZE: 1.1 kB

HITS: 937

  1. Imports System
  2. Imports System.Net
  3. Imports System.Security.Cryptography.X509Certificates
  4. Public Class clsSSL
  5. Public Function AcceptAllCertifications(ByVal sender As Object, ByVal certification As System.Security.Cryptography.X509Certificates.X509Certificate, ByVal chain As System.Security.Cryptography.X509Certificates.X509Chain, ByVal sslPolicyErrors As System.Net.Security.SslPolicyErrors) As Boolean
  6. Return True
  7. End Function
  8. End Class
  9. ServicePointManager.ServerCertificateValidationCallback = New System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications)
  10. Delegate 'System.Net.Security.RemoteCertificateValidationCallback' requires an 'AddressOf' expression or lambda expression as the only argument to its constructor.
  11. ServicePointManager.ServerCertificateValidationCallback = AddressOf AcceptAllCertifications
  12. ServicePointManager.ServerCertificateValidationCallback = _
  13. New RemoteCertificateValidationCallback(AddressOf AcceptAllCertifications)

comments powered by Disqus