Use curl to read certificate protected web pages
curl https://web.mit.edu
requires a MIT personal web certificate,
and will give an error if curl doesn't present a certificate.
You can make things work if you:
- Get a certificate in Firefox
- Export the certificate from Firefox, and save in your account.
- Convert the certificate to a PEM format for curl to read
- Tell curl to use the exported certificate
Assuming that step #2 saved a certificate into a file named,
you can perform step #3 with "openssl":
openssl pkcs12 -in certificate.p12 -nodes -out ~/Private/certificate.pem
PROTECT THE CERTIFICATE FILE If people get your certificate file, they can do everything that can be done with certificates, such as changing your password, etc. |
Once you have a certificate file, step #4 is done by:
curl --cert ~/Private/certificate.pem --capath /mit/apache-ssl/certificates https://web.mit.edu/