I would really appreciate any help about this problem I’m having with curl.
I’m trying to prepare a curl command to get some data from the web.
This command works on my laptop but I can not get it to work on Home Assistant.
The response should be “31.03.2023” after jq parses the output.
I tried to add -legacy_server_connect, -legacyrenegotiation and –insecure to the culr command but it didn’t help.
I also added the following to openssl.cnf and did an export OPENSSL_CONF=/etc/ssl/openssl.cnf
but that didn’t help too.
[default_sect]
Options = UnsafeLegacyRenegotiation
Here is my curl command and the error response.
curl 'https://www.epdk.gov.tr/Detay/GetFastAccessList' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'Accept-Language: en-US,en;q=0.9,tr;q=0.8' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'DNT: 1' \
-H 'Origin: https://www.epdk.gov.tr' \
-H 'Referer: https://www.epdk.gov.tr/Detay/Icerik/3-1327/elektrik-faturalarina-esas-tarife-tablolari' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'sec-ch-ua: "Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
--data-raw '{"fId":"1327"}' \
--compressed | jq '.model[0].RgDate'
curl: (35) OpenSSL/3.1.0: error:0A000152:SSL routines::unsafe legacy renegotiation disabled