![]() Point is to make the traffic encrypted andĮven with self-issued certificates it is just that. If issuer is non-trusted authority and you connect to there, I understand the non-secure point but if you know the issuer or if it is yourself (you create client applications also), this approach is just fine. For example this works fine:ĭim objReq As HttpWebRequest = WebRequest.Create("") Dim objResp As HttpWebResponse = CType(objReq.GetResponse(), HttpWebResponse) Dim reader As New IO.StreamReader(objResp.GetResponseStream)ĭim str As String = reader.ReadToEnd reader.Close() objResp.Close() Response.Write(str) Article you pointed concerns only and only client certificates (and in this case there were not them in use). ![]() If certificate is valid (trusted authority and so on), it will create connection just fine without any tricks. ServicePointManager.CertificatePolicy = New M圜ertificateValidation() Then used it in client application before calling web service(my client was ASP.NET page using WebRequests as I was testing this functionality): _ ByVal cert As X509Certificate, ByVal request As WebRequest, ByVal problem As Integer) _ As Boolean Implements ICertificatePolicy.CheckValidationResult 'Return true to specify that certificate is always validated Return True End Function End Class I created class like this: Imports System Imports System.Net Imports 509Certificates Public Class M圜ertificateValidation Implements ICertificatePolicy Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, NET Framework: ICertificatePolicy interface's docs). I just wanted to get SSL work with self-issued certificates so I did it easy way(there's good example in. ![]() Solution was to implement my own Certificate validation policy. Have you created the certificate yourself? If yes, it suppose it always shows you the confirmation box when you are trying to access the resource (with browser) using https saying that certification authority is not trusted? Anyway, I had same sort of problem
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |