UnityWebRequest Certificate Handler causes "Unknown Error"

I want to validate the certificate of the response of web requests I make from UnityWebRequest. Without certificateHandler line it gets job done and works just right. When I add the line 8 it returns network error, which is called “Unknown Error”. Is this a bug, or am I missing something?

public class WebRequest
{
  using (UnityWebRequest request = new UnityWebRequest("https://www.url.com/list", "POST"))
  {
    request.uploadHandler = new UploadHandlerRaw(someData);
    request.downloadHandler = new DownloadHandlerBuffer();

    //problem line
    request.certificateHandler = new RequestCertificate();

    yield return request.SendWebRequest();

    Debug.Log(request.error);
  }
}
...

internal class RequestCertificate : CertificateHandler
{
  protected override bool ValidateCertificate(byte[] certificateData)
  {
    return true;
  }
}

Looks like a bug. Is you certificate handler actually this - a trust all one?
And also, which platform is this on?

Yes using this exact code I run - except for the url and someData var. Code does not even enter the breakpoint at return true line in the Validatecert method.

2018.3.14f1, in Editor, Windows 10

Please, report a bug.
Thanks.

1 Like