Cannot find RemoteCertificateValidationCallback in ClientWebSocketOptions
Hello i am trying to bypass ssl certs by setting RemoteCertificateValidationCallback in the websocket options but they dont exist?
error:
msdn article: https://learn.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocketoptions.remotecertificatevalidationcallback?view=net-8.0#system-net-websockets-clientwebsocketoptions-remotecertificatevalidationcallback
ClientWebSocketOptions.RemoteCertificateValidationCallback Property...
Gets or sets the callback to validate a server certificate.
21 Replies
yes, it says it is only available in .NET Core
you are probably using .NET Framework
ah duh, sorry.
do you think there is any way to bypass certs on clientwebsocket then without that?
yes
hold
try setting
ServicePointManager.ServerCertificateValidationCallback
yup i have already set that
still not workign thourhg
presumably you are getting an exception because the validation fails
what is the exception, and what is the call stack
yes, i have noticed the two problems i am getting are the fact that
- when i set the scheme to
ws
it returns Unable to connect to remote server
- when i use wss
it returns the ssl verification error
1secthis is when i use the
ws
schemethis is the server i am attempting to connect to
which is up
ah. i guess you are using xamarin. hm
hm? what is xamarin?
hm. well. maybe not
this server is written in python using sockets(because im lazy :p)
is it unity? what are you using to write this
godot
but i am using c#'s web library to handle web stuff
well, uh, i would suggest updating to a newer version of godot, which would let you use RemoteCertificateValidationCallback
unfortunately that isnt possible :(
the games codebase is already established and migrating from godot 3.5 to godot 4 is equivalent to rewriting the entire game. here is the codebase https://github.com/anthony-63/FluxV2
GitHub
GitHub - anthony-63/FluxV2: FluxV2, rhythm game written in godot. O...
FluxV2, rhythm game written in godot. Originally written by kermeet, and continued by me. - anthony-63/FluxV2
yes it has worked
thank you!