-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL Instructions (Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_UNKNOWN_ERROR) #197
Comments
Hello mate, hope you're doing well Best, |
Hi, thank you for your attention, wait a sec... As you can see, I tried to add some code that I thought could help me, but it didn't work :( Hope you can help me With best wishes, `public class REST : MonoBehaviour
}` |
Hey mate, thanks for sharing! Try this example and please let me know RestClient.Get(new RequestHelper {
Uri = "https://myapi.com",
CertificateHandler = new YourCertificateHandler()
}).Then(response => {
}); |
Unfortunately it doesn't work :( Here is my code for now: `void Update()
|
Hello mate, can you share logs and give me more context about your REST API please? |
Hello, thank you for helping me, I'm using Unity3D, VisualStudio 2019 to be honest, I'm pretty new to the scripting so I can understand not very much... But this is what I'm getting as an error: Also this is my code: `using System; public class REST : MonoBehaviour
}` As for the context - I'm trying to connect to the server, which is protected by the Certificate.pfx and as I understood in this code I should first send the request, that contains the GET thing (forgot what it's name) and Verification of servers certificate. What I've done: |
Also as i understood, I can't call the ValidateCertificate's value (of true or false) that's why, maybe, it throws an error? |
Hello mate, sorry for the delay Are you getting the same error using Happy holidays! <3 |
Unfortunately, it doesn't help at all :( So Now I'm triying to figure out how to setup the certificate on the server correctly, I guess the issue is on the server's side. Could you help me please? Also I would be greaful if you could help me with the Certificate, because the security is pretty vital for the project. Thank you very much and happy holidays :) |
I am having the same issue. Does anyone able to fixes this? @jdnichollsc @Nikit-Kalach NOTE: API's endpoints are working fine in postman |
@AbdullahNarsun please provide a minimal reproducible example as a GitHub repository. Please include these:
I'm available for a few days; I guess I will try my best to fix it. Thanks. |
Thanks for the reply. Sorry, my project got sensitive information/data due to which i wont be able to share it with you. One thing i can do is to share some extra code snippets with you. If that will help you to understand better, than please let me know. |
@AbdullahNarsun in case you missed this keyword minimal reproducible example. Good read: |
@maifeeulasad Please have a look, here is the project with example I also send you an invitation, but later on i made it public. Simply run in unity and click the only button visible to you. |
I have seen your code and tried resolving it with Another interesting thing is At first, I thought this was some issue on our end. But then I wrote a script without our Here is the script, if you are interested:
Sorry, I couldn't be any help. You may create an ticket on Unity forum or their bug reporting center Ref: |
@maifeeulasad Thank you for the help, I also tried it with default web request (UnityWebRequest) and found the same result. Will create an issue on unity forum shortly. |
I'm writing the code that should get some info from the server on the virtual machine with self-signed certificate. I found your package and it's wonderfull! I've searched for few hours, but never found any documentation about the SSL certificates...
Without the SSL Certificate validation i get this error: Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_UNKNOWN_ERROR
Also I tried to find any answer for resolving this problem but never found one so my code would work properly,
Please help,
With best wishes,
Nikita Kalachev
For the code, I just wrote this:
`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEditor;
using Models;
using Proyecto26;
using Proyecto26.Common;
using RSG;
using RSG.Exceptions;
using RSG.Promises;
public class RESTCPack : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log("I'm alive! Hope it'll work!");
}
}`
The text was updated successfully, but these errors were encountered: