Repository: godot
Issue: Can't send http client requests (ssl handshake fail)
Labels: bug,topic:network,topic:dotnet

### Godot version

3.5

### System information

mac os montery 12.3.1

### Issue description

i'm trying to use a .net library of a service that i'm  owning with godot, the library is used to send http client requests to an API endpoint, this works with no problem on Unity 3D or any .net project
that is the [library](https://www.nucle.cloud/.net) i'm trying to use
this is the [github](https://github.com/nuclecloud/dotnet) source code of the library, 
this is the code i'm writing in Godot
```
public class test : Node
{
	public override void _Ready()
	{
		 Create();
	}

	public async void Create()
	{
	   var newUser= await  User.Create("b943b785-2416-11ed-8c17-f23c938ec173", "kassy@gmail.com", "P@ssword","kassy");
		GD.Print("new user id= "+newUser.id);
	}
}
```

i'm getting this 
```
E 0:00:01.418   Boolean Mono.Btls.MonoBtlsContext.ProcessHandshake(): System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
  at /root/mono-6.12.0.182/external/boringssl/ssl/handshake_client.c:1132
  <C++ Error>   Unhandled exception
  <C++ Source>  :0 @ Boolean Mono.Btls.MonoBtlsContext.ProcessHandshake()()
  <Stack Trace> :0 @ Boolean Mono.Btls.MonoBtlsContext.ProcessHandshake()()
                :0 @ Mono.Net.Security.AsyncOperationStatus Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus , Boolean )()
                :0 @ ()
                :0 @ Mono.Net.Security.AsyncOperationStatus Mono.Net.Security.AsyncHandshakeRequest.Run(Mono.Net.Security.AsyncOperationStatus )()
                :0 @ void Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext()()
                :0 @ --- End of inner exception stack trace ---()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__48.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult()()
                :0 @ void System.Net.Http.ConnectHelper+<EstablishSslConnectionAsyncCore>d__5.MoveNext()()
                :0 @ --- End of inner exception stack trace ---()
                :0 @ void System.Net.Http.ConnectHelper+<EstablishSslConnectionAsyncCore>d__5.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.Net.Security.SslStream System.Threading.Tasks.ValueTask`1[[System.Net.Security.SslStream, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Result()()
                :0 @ System.Net.Security.SslStream System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[[System.Net.Security.SslStream, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResult()()
                :0 @ void System.Net.Http.HttpConnectionPool+<CreateConnectionAsync>d__44.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.ValueTuple`2[System.Net.Http.HttpConnection,System.Net.Http.HttpResponseMessage] System.Threading.Tasks.ValueTask`1[[System.ValueTuple`2[[System.Net.Http.HttpConnection, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Result()()
                :0 @ System.ValueTuple`2[System.Net.Http.HttpConnection,System.Net.Http.HttpResponseMessage] System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[[System.ValueTuple`2[[System.Net.Http.HttpConnection, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResult()()
                :0 @ void System.Net.Http.HttpConnectionPool+<WaitForCreatedConnectionAsync>d__49.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.ValueTuple`2[System.Net.Http.HttpConnection,System.Net.Http.HttpResponseMessage] System.Threading.Tasks.ValueTask`1[[System.ValueTuple`2[[System.Net.Http.HttpConnection, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Result()()
                :0 @ System.ValueTuple`2[System.Net.Http.HttpConnection,System.Net.Http.HttpResponseMessage] System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[[System.ValueTuple`2[[System.Net.Http.HttpConnection, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResult()()
                :0 @ void System.Net.Http.HttpConnectionPool+<SendWithRetryAsync>d__39.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.Net.Http.HttpResponseMessage System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].GetResult()()
                :0 @ void System.Net.Http.RedirectHandler+<SendAsync>d__4.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.Net.Http.HttpResponseMessage System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].GetResult()()
                :0 @ void System.Net.Http.HttpClient+<FinishSendAsyncBuffered>d__62.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ System.Net.Http.HttpResponseMessage System.Runtime.CompilerServices.TaskAwaiter`1[[System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].GetResult()()
                :0 @ void Nucle.Cloud.User+<Create>d__0.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task )()
                :0 @ void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task )()
                :0 @ Nucle.Cloud.UserModel System.Runtime.CompilerServices.TaskAwaiter`1[[Nucle.Cloud.UserModel, NucleCloudLibrary, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null]].GetResult()()
                test.cs:21 @ void test+<Create>d__1.MoveNext()()
                :0 @ void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()()
                :0 @ void System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0(System.Object )()
                GodotSynchronizationContext.cs:21 @ void Godot.GodotSynchronizationContext.ExecutePendingContinuations()()
                GodotTaskScheduler.cs:59 @ void Godot.GodotTaskScheduler.Activate()()
                :0 @ ()

```
i can upload 



### Steps to reproduce

just hit play, you will get the error in the console

### Minimal reproduction project

[NucleCloud.zip](https://github.com/godotengine/godot/files/9591964/NucleCloud.zip)