cURL HTTP and API Workflows/Mutual TLS with client cert

Authenticate using a client certificate and key.

Section: HTTP Auth and Security

Mutual TLS with client cert

bash
bash
curl --cert client.crt --key client.key https://mtls.example.com
Explanation

Use mTLS when the server requires client certificates.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing HTTP Auth and Security
Use a custom CA bundle
Trust a specific CA certificate file.
OpenIn sheetbashsame section
Skip TLS certificate verification
Disable certificate verification for testing only.
OpenIn sheetbashsame section
HTTP Basic auth
Authenticate with username and password.
OpenIn sheetbashsame section
Bearer token auth
Send a Bearer token for OAuth-style APIs.
OpenIn sheetbashsame section
API key in header
Send an API key header.
OpenIn sheetbashsame section
API key in query string
Pass an API key in the URL.
OpenIn sheetbashsame section