-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to make the Appium dotnet driver to trust the Appium server certificate? #455
Comments
I think this question should be placed under appium repo. @mykola-mokhnach / @KazuCocoa do we have such argument that we can pass to appium server? |
It is dotnet client thing. I guess the endpoint has Then, a client should relax the validation like ignoring the validation. I haven't dug into the dotnet client's options to relax the validation, but it might have. |
@KazuCocoa, Trying to replicate this from my side. I followed this guide: https://appium.io/docs/en/2.3/guides/tls/ Here are the logs:
|
@Dor-bl Please always try the most recent server version. The 2.5.1 one is pretty out of date |
@mykola-mokhnach Updated to 2.11.3, but still got the same outcome:
|
I've checked it locally and it looks like there is a bug in logging. The server itself does start using a secure protocol though. appium/appium#20449 should fix the log line |
@mykola-mokhnach, Indeed the latest version fixes the log line.
|
I am not an expect in dotnet. Try to check available configuration options for the HTTP client library there. There must be something, that could allow to ignore/skip certificates validation. Another solution might be to import your self-signed certificate into the Root CA on the client machine. |
@nvborisenko, Do you guys already implemented something similar on the Selenium side? On the same topic, is it possible to modify Selenium HTTPCommandExecutor with my own HttpClient? couldn't find a way. |
I have posted a feature request, seems very easy to implement. Looked through your repo, and it will be possible to configure HttpClient. |
Will be available in Selenium v4.29 (in one week?). So you will be able to: class AppiumHttpCommandExecutor : HttpCommandExecutor
{
override HttpClientHandler CreateHttpClientHandler()
{
var handler = base.CreateHttpClientHandler();
handler.ServerCertificateCustomValidationCallback += ... => return true;
}
} Notice: ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; Changing global static behavior by library is not very good. |
@Dor-bl Selenium 4.29 has been released, you can give it a try. |
Hi there,

I am trying to use an SSL enabled Appium server, but when I try to open a session, I get this exception
Is there any way to instruct the client to trust the Appium server certificate? Similar to what the "Allow Unauthorized Certificates" option does in Appium Desktop:
I am using Appium web driver version 4.3.1.
Appium server 1.19.0
Thanks,
A
The text was updated successfully, but these errors were encountered: