Search Unity

Bug Unity Auth: "Curl error 60: Cert verify failed"

Discussion in 'Authentication' started by GearedSun, Dec 29, 2021.

  1. GearedSun

    GearedSun

    Joined:
    Apr 17, 2014
    Posts:
    30
    Hello,

    I've implemented your Unity Authentication Beta service into my project, but unfortunately I can't use it at this point because of this error:

    Unity Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_USER_ERROR1

    It's 100% repro on Galaxy S4 KitKat during:

    Code (CSharp):
    1. await AuthenticationService.Instance.SignInWithGoogleAsync(_UserIDToken);
    with project built using Unity 2020.3.25.

    The error is thrown from:
    Unity.Services.Authentication.Utilities.WebRequest

    Is there anything I can do from my end? The minimum supported API level has to be 19. If you do not plan to support older APIs, then please state the minimum supported API level in your documentation, so we can look for other solutions if neccessary.

    A little update, on Unity 2019.4 the error looks like this:
    Unity Curl error 51: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_EXPIRED
     
    Last edited: Dec 30, 2021
  2. Laurie-Unity

    Laurie-Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    220
    Hi there,

    Thanks for posting your code and the error details.

    The minimum supported API level stated in the Unity Editor is API 19, but we are seeing reports of this error with the Authentication package on Android devices less than API 25.

    The team are investigating this ane we will update this and other related documentation and threads when we have more information or a resolution.

    In the meantime, I think we may be limited to API 25 or above.
     
  3. GearedSun

    GearedSun

    Joined:
    Apr 17, 2014
    Posts:
    30
    Well that is unfortunate.

    In the meantime, I've made an ugly workaround involving copying of Auth and Cloud Save packages into Assets, modifying the packages to work within Assets and adding a custom CertificateHandler to the WebRequest with different handling for APIs 19-24.
     
  4. erickb_unity

    erickb_unity

    Unity Technologies

    Joined:
    Sep 1, 2021
    Posts:
    92
    Small tip: when making changes to packages, it's simpler to just copy it directly to your local Packages folder and make your changes there. Local packages always take precedence over the manifest.