If certification verification fails, the connection going to be terminated and the HTTPReqest's State will be set as HTTPRequestStates.Error. The request's Exception property is a reference to an exception containing more information about the issue:
voidOnRequestFinished(HTTPRequestreq,HTTPResponseresp){switch(req.State){// The request finished without any problem.caseHTTPRequestStates.Finished:Debug.Log("Done!");break;// The request finished with an unexpected error. The request's Exception property may contain more info about the error.caseHTTPRequestStates.Error:Debug.LogError("Request Finished with Error! "+(req.Exception!=null?(req.Exception.Message+"\n"+req.Exception.StackTrace):"No Exception"));TlsFatalAlerttlsException=req.ExceptionasTlsFatalAlert;if(tlsException!=null)Debug.LogException(tlsException);break;default:Debug.LogError("Processing the request failed!");break;}}
For a failed TLS verification, it should produce two log lines, something like this: