Issue with certificate with Custom connector

Hi,

we created a custom connector and we test the connection in Asset Management > Asset > "our_custom_connector" > Test connection, but we have a certificate error. (The remote certificate is invalid according to the validation procedure).

Here's the log of the connection test:

2023-02-21T17:16:16+01:00 Information Platform framework version 7.1.0.1862
2023-02-21T17:16:16+01:00 Information Initializing CheckSystem platform task 1141cbb3-b203-11ed-af8f-d257bba52508
2023-02-21T17:16:16+01:00 Debug ############### Operation Parameters ################
2023-02-21T17:16:16+01:00 Debug Address xxxxx
2023-02-21T17:16:16+01:00 Debug FuncUserName xxxx
2023-02-21T17:16:16+01:00 Debug FuncPassword **secret**
2023-02-21T17:16:16+01:00 Information Running "CheckSystem" handler on platform "xxxx" in "Scriptable"
2023-02-21T17:16:16+01:00 Debug Running script in nested scope
2023-02-21T17:16:16+01:00 Information Defining 3 functions for operation
2023-02-21T17:16:16+01:00 Information Finished defining functions
2023-02-21T17:16:16+01:00 Debug Executing BaseAddress component
2023-02-21T17:16:16+01:00 Information Setting session base address to "">https://xxxx"
2023-02-21T17:16:16+01:00 Debug Executing NewHttpRequest component
2023-02-21T17:16:16+01:00 Debug Executing Headers component
2023-02-21T17:16:16+01:00 Debug Adding header [ "User-Agent" : "Safeguard" ]
2023-02-21T17:16:16+01:00 Debug Executing SetItem component
2023-02-21T17:16:16+01:00 Debug Executing Request component
2023-02-21T17:16:16+01:00 Information Base address = "https:/xxxx"
2023-02-21T17:16:16+01:00 Debug Request has content of type "application/json"
2023-02-21T17:16:16+01:00 Information Sending request [Get "/login"] [AllowRedirect=True] [Skip SSL Validation="Value(Input=True)"] [Persist Cookies=True]
2023-02-21T17:16:16+01:00 Warning HTTP Request threw an exception
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Hercules.Modules.Scriptable.Components.Request.RequestComponent.OnExecute(ScriptableModuleContext context, IVariableRepository variables, RequestComponentModel requestModel) in D:\a\1\s\Source\Hercules.WebService\Modules\Modules\Scriptable\Components\Request\RequestComponent.cs:line 129

The certified is self-signed and the CN doesn't match to hostname.
To bypass SSL we added:

"IgnoreServerCertAuthentication": true

on our json, but we still get the same error.
Can anyone help?

Thank you,
Elena