+ 1

How to use curl to make request to secure public ip (0.0.0.0) django server without error?

I get the following error when i make request to the url ( above ip:port ) . I have secured it using mkcert . (Did following steps to add certificate , mkcert -install, mkcert -cert-file rootCA.pem -key-file rootCA-key.pem localhost 127.0.0.1(in project root)) And the following line to run server using root CA and rootCA -key file : python manage.py runserver_plus --cert-file rootCA.pem --key-file rootCA-key.pem Now i made a curl request : "curl https://127.0.0.1:8000/ but i get the following error , "curl: (60) SSL certificate problem: unable to get local issuer certificate" I used google to search on the issue(someone said it is os not recognising the certificates) but couldn't understand anything on how to solve it . Any help is much appreciated! Ps: i am using termux and device is using android os. Edit: i followed this article for http to https. https://timonweb.com/django/https-django-development-server-ssl-certificate/

21st Sep 2021, 4:54 PM
Abhay
Abhay - avatar
3 Réponses
+ 1
You made need to add the key to your OS's keystore, or you can try the -k option in curl to avoid validation.
24th Sep 2021, 4:13 AM
sokayvich
+ 1
Great to hear!
24th Sep 2021, 11:34 AM
sokayvich
0
sokayvich thks a lot ! Between i don't know how can i add the key to os keystore in android but after searching a bit i came across an answer that talked about getting server certificate (using openssl) , so i ran the required command to get the certificate and then used it in the curl request to do successful secure request .
24th Sep 2021, 9:22 AM
Abhay
Abhay - avatar