看来你需要用下面的参数发送的数据表单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