|
-
Jan 11th, 2008, 07:52 AM
#1
Thread Starter
Fanatic Member
FTPWebRequest using SSL
I'm having problems accessing a webserver using SSL. It works fine without it, but when I set FTPWebRequest.EnableSSL = True, I get the following error:
"The remote certificate is invalid according to the validation procedure"
The FTP server I'm trying to connect to does not require the client to have a certificate. It issues it's own certificate. Does anyone know what I have to do to get this to work?
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Jan 11th, 2008, 11:34 AM
#2
Re: FTPWebRequest using SSL
Is the certificate that the server issues valid itself? Also, if you're willing to ignore such certificate issue errors, then implement an ICertificatePolicy class which returns true for every check of validation results.
-
Jan 14th, 2008, 03:52 AM
#3
Thread Starter
Fanatic Member
Re: FTPWebRequest using SSL
Well, I'm informed that it is valid but I have idea how I would check it.
Anyway, I think I've done something similar by implementing the following:
Code:
Private Function CertificateAuthenticate( _
ByVal sender As Object, _
ByVal certificate As X509Certificate, _
ByVal chain As X509Chain, _
ByVal sslPolicyErrors As SslPolicyErrors _
) As Boolean
Return True
End Function
Public Sub New()
ServicePointManager.ServerCertificateValidationCallback = New System.Net.Security.RemoteCertificateValidationCallback(AddressOf CertificateAuthenticate)
End Sub
I must say that it seems like a rather convoluted way of doing things. Why I couldn't just turn off certificate checking on the FTPWebRequest object I don't know...
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|