cURL / Mailing Lists / curl-library / Single Mail


libcurl & smartcards

From: Mckinney, Lee <>
Date: Thu, 31 Dec 2015 20:19:28 +0000

Our project is looking to: [upon PKI challenge from a server]
1. display/list the certificates contained on a smartcard/CAC to allow user selection of a cert
2. present PIN challenge for the selected cert
3. if correct PIN, grant access to the server resource

Out of the box, libcurl does present a PIN challenge for what we assume is an auto-selected user cert:

res = CURLE_OK;
curl_easy_setopt(curl, CURLOPT_URL, "<an-https-url>"
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);

res = curl_easy_perform(curl);

What is the next step?
How do we read certificates from a smartcard/CAC and challenge the user
as part of the execution of

curl_easy_perform(curl) ?


Lee McKinney / Senior Software Engineer, CSM, SA
VENCORE, Services & Solutions Inc.
P 228.688.8199
1103 Balch Blvd, Ste 210, Stennis Space Center, MS 39529
The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

List admin:
Received on 2015-12-31