TLS error

  • Thread starter Thread starter Zarticho
  • Start date Start date
Z

Zarticho

Guest
Hi,


I'm trying to get it work but I don't know why it's not working...


Here is the code :

Public Function AcceptAllCertifications(ByVal sender As Object, ByVal certification As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As System.Net.Security.SslPolicyErrors) As Boolean
Return True
End Function

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try

ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
ServicePointManager.ServerCertificateValidationCallback = AddressOf AcceptAllCertifications

Dim wr As HttpWebRequest = CType(WebRequest.Create("Accueil"), HttpWebRequest)
wr.Headers.Clear()
Dim collection = New X509Certificate2Collection()
collection.Import("ps.p7b")
wr.ClientCertificates = collection
' wr.Timeout = Timeout.Infinite
wr.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
wr.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
wr.Headers.Add("sec-fetch-mode", "cors")
wr.Headers.Add("sec-fetch-site", "same-origin")
wr.Headers.Add("accept-language", "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7")
wr.Headers.Add("accept-encoding", "gzip, deflate, br")

Dim ws As HttpWebResponse
Try
ws = wr.GetResponse()
Catch ex As Exception
MsgBox(ex.ToString)
End Try

Exit Sub

'... GetResponseStream...etc . it's useless for my issue so I removed it...

Catch ex As Exception
msgbox(ex.tostring)
End Try
End sub




As you can see I tryed to force tls12, to accept all certifications, to load the certification used by playstation.com, to copy the exact same headers I have when I use my browser. I have the error message "The request was aborted: Could not create SSL/TLS secure channel"

Also, I tryed with tls3 (just in case) with .NET 4.8... still not working I have the message : "The client and server cannot communicate, because they do not possess a common algorithm"


It's working with some other website but not with playstation.com ... there is something I missed...


Please, help me :'(

Continue reading...
 

Similar threads

M
Replies
0
Views
537
Mattia Fanti
M
C
Replies
0
Views
188
castlehere
C
S
Replies
0
Views
142
Sivakumar282000
S
M
Replies
0
Views
100
MuzafferAnlas
M
J
Replies
0
Views
126
Jemar Canty
J
Back
Top