Hi,
   I am getting this error with respect to the source code below

     50                 curl_easy_setopt(curl, CURLOPT_URL, "
https://192.2.84.200:443/aspect1/1.sq1";);
     51                 /* Do not do the transfer - only connect to host */
     52                 curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
     53
     54                 ca_path = curl_getenv("SSL_CERT_DIR");
     55                 //ca_path = curlx_getenv("CURL_CA_BUNDLE");
     56                 if(ca_path != "\0")
     57                         printf("CA PATH = %s\n",ca_path);
     58                 //setting parameter for SSL-3/TLS
     59
     60                 /* cert is stored PEM coded in file... */
     61                 /* since PEM is default, we needn't set it for PEM
*/
     62                 curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM");
     63
     64                 /* set the cert for client authentication */
     65
curl_easy_setopt(curl,CURLOPT_CAPATH,"/home/aspect1/AKHI/curl-loader-0.47/SSL/");
     66
curl_easy_setopt(curl,CURLOPT_SSLCERT,"dms-https-client_crt.pem");
     67
     68                 /* sorry, for engine we must set the passphrase
     69                    (if the key has one...) */
     70
     71                 /* set the private key (file or ID in engine) */
     72
curl_easy_setopt(curl,CURLOPT_SSLKEY,"dms-https-client_key.pem");
     73                 curl_easy_setopt(curl,CURLOPT_KEYPASSWD,"123456");
     74
     75
     76                 /* set the file with the certs vaildating the server
*/
     77                 curl_easy_setopt(curl,CURLOPT_CAINFO,"my-ca.pem");
     78
     79                 /* disconnect if we can't validate server's cert */
     80                 curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1L);
     81                 //curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER,
0L);
     82
     83                 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
     84                 curl_easy_setopt(curl, CURLOPT_SSLVERSION,
CURL_SSLVERSION_SSLv3);
     85                 res = curl_easy_perform(curl);


And I am getting this error in output instead i m giving the correct
password for private key file.

* About to connect() to 192.2.84.200 port 443 (#0)
*   Trying 192.2.84.200... * connected
* Connected to 192.2.84.200 (192.2.84.200) port 443 (#0)
* unable to use client certificate (no key found or wrong pass phrase?)
* Closing connection #0
* Problem with the local SSL certificate
Error: Problem with the local SSL certificate

Please help me solve this.

Thanks,
Sourav

Reply via email to