看來你需要用下面的參數發送的數據表單URL編碼格式:
cert_text={CERT_CONTENT}
decode_type=certificate
您還需要X-Requested-With: XMLHttpRequest
& Connection: keep-alive
標題:
cert_content=$(cat test.crt)
curl 'https://www.sslshopper.com/assets/snippets/sslshopper/ajax/ajax_decode.php' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Connection: keep-alive' \
--data-urlencode "cert_text=$cert_content" \
--data-urlencode "decode_type=certificate"
但對於這個任務,你並不需要調用一些端點檢查證書,因爲它在https://www.sslshopper.com/certificate-decoder.html自行指定,也可以直接使用:
openssl x509 -in test.crt -noout -subject -enddate -startdate -issuer -serial
HTTP是基於「狀態」。您發出請求或發帖並獲取回覆。一心一意。這就是它的工作原理。 – Rob