Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved UnityWebRequest report an error : SSL CA certificate error

Discussion in 'Multiplayer' started by QianXiYa, Jan 23, 2019.

  1. arabymohammedyoussef123

    arabymohammedyoussef123

    Joined:
    Jul 17, 2023
    Posts:
    5
    Hey, I have this basic command and it says SSL CA certificate error in unity editor so what is the problem:

    Code (CSharp):
    1.  
    2.     private IEnumerator SendRegistrationRequest()
    3.     {
    4.         // Get the user input from the InputFields
    5.         string email = emailInput.text;
    6.         string password = passwordInput.text;
    7.         string username = usernameInput.text;
    8.  
    9.         WWWForm form = new WWWForm();
    10.         form.AddField("registerEmail", email);
    11.         form.AddField("registerPass", password);
    12.         form.AddField("registerUser", username);
    13.  
    14.         UnityWebRequest www = UnityWebRequest.Post("https://localhost/EpicGuardiansBackEnd/RegisterUser.php", form);
    15.         yield return www.SendWebRequest();
    16.  
    17.         if (www.result != UnityWebRequest.Result.Success)
    18.         {
    19.             Debug.Log(www.error);
    20.         }
    21.         else
    22.         {
    23.             Debug.Log("Form upload complete!");
    24.             string response = www.downloadHandler.text;
    25.             statusText.text = response;
    26.         }
    27.     }
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,620
    Based on URL you are running local server. Yet you do https, which requires proper security setup.
    Typically for local development one uses plain text http.