В Symfonycasts «Платформа API: серьезные API RESTful» Глава 6 есть команда cURL curl -X GET "https://localhost:8000/api" -H "accept: application/ld+json". Выполнение этой команды (с добавлением -v) в Windows приводит к
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying ::1:8000...
* Connected to localhost (::1) port 8000 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: self signed certificate in certificate chain
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
В системе Linux (Ubuntu 20.04) с существующим проектом Symfony, идентичным тому, который использовался в Windows выше, та же команда дает ожидаемый {"@context":"/api/contexts/Entrypoint","@id":"/api","@type":"Entrypoint","nonprofit":"/api/nonprofits"}
В обоих случаях команды symfony server:start -d а также symfony server:ca:install был запущен.
Я думаю, что мне нужно знать, как добавить сертификат в Windows, который удовлетворит опасения cURL: «… curl не удалось проверить легитимность сервера …»
