The remote certificate is invalid according to the validation procedure (Windows)

Dear Gurus!
The task is to ensure the interaction of two networks (Internet and intranet) through the cloud, programmatically with help of WebDavClient WebDavClient. When accessing from the Internet - everything is fine, when accessing from the local network I get an error message

The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors

I am only a user of this cloud. What can be done to work around the problem. I haven’t come across a ssl - certificate before. What I can read to understand how the problem can be solved.
Thanks in advance
P.S. There is no Internet in local network and so I need http connection without ssl, since no connection to certification authority center. However, even if I use an nttp connection, the error is the same. On the other hand, in the browser, the http connection is established without error. Previously asking a question - about trust non-ssl connection