smartcard - SSLv3 mutual authentication using libcurl and smart card -
i need establish communication channel consume webservice using sslv3 mutual authentication, libcurl , smart card, store client certificate, key pair , responsible signatures, encryptions, etc.
for testing purposes, without using smart card, following brief code runs smoothly:
.... (soap message configurations) .... curl_easy_setopt (curl, curlopt_use_ssl, curlusessl_all); curl_easy_setopt (curl, curlopt_sslversion, 3); curl_easy_setopt (curl, curlopt_ssl_verifypeer, 1); curl_easy_setopt (curl, curlopt_ssl_verifyhost, 2); curl_easy_setopt (curl, curlopt_sslcert, "clientcertificatefile"); curl_easy_setopt (curl, curlopt_keypasswd, "testprivatekeypass"); curl_easy_setopt (curl, curlopt_sslkey, "testprivatekeyfile"); curl_easy_setopt (curl, curlopt_cainfo, "cacertificatefile"); curl_easy_setopt (curl, curlopt_url, "urltowebservice"); curl_easy_perform (curl);
after running code, can establish communication using sslv3 , expected response webservice. however, need establish secure channel using smart card. have free access following information:
- "clientcertificatefile" - stored on smart card, in pem format. can read through access function.
- "cacertificatefile" - stored on disk, in pem format. can read through access function.
- "urltowebservice" - stored in application.
"testprivatekeyfile" , "testprivatekeypass" temporary files used testing , should replaced smart card.
my doubt is: how use smart card replace private key , password in libcurl setup process?
the smart card not allow access private key, public key, expected. can send smart card data signed or encrypted, using private key, , resulting buffer.
is there way redirect part of sslv3 connection handshake use smart card? setting in lib ssl, or libcurl?
thanks listening!
Comments
Post a Comment