cURL / Mailing Lists / curl-library / Single Mail

curl-library

a question about using ssl with libcurl

From: 黄志军 <hzhijun_at_huawei.com>
Date: Thu, 12 Aug 2004 14:24:06 +0800

Now i am tesing to use libcurl's methods to connect with a http server (version:apache-1.3.28 mod_ssl-2.8.15 openssl-0.9.6h[engine])
my test program is simplessl.c from curl-7.12.0 's docs/examples.

i found that there are some requirements for this to work as belows, but how to prepare certificate like 'testcert.pem' or 'cacert.pem'? and
how do i find the crypto engine and how to use it?

   1. set pCertFile to the file with the client certificate
   2. if the key is passphrase protected, set pPassphrase to the
        passphrase you use
   3. if you are using a crypto engine:
   3.1. set a #define USE_ENGINE
   3.2. set pEngine to the name of the crypto engine you use
   3.3. set pKeyName to the key identifier you want to use
   4. if you don't use a crypto engine:
   4.1. set pKeyName to the file name of your client key
   4.2. if the format of the key file is DER, set pKeyType to "DER"

when i make the simplessl and execute it, the return value of calling curl_easy_perform method is 58 which i found is "CURLE_SSL_CERTPROBLEM".
How to deal with local certificate problem?

Anyone can help me? thanks a lot

Regards!
Received on 2004-08-12