cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl with openssl and no engines

From: Peter Sylvester <Peter.Sylvester_at_edelweb.fr>
Date: Fri, 24 Sep 2004 16:46:13 +0200 (MEST)

hello,

I think the code in lib/url.c that takes an openssl engine should
read like:

  case CURLOPT_SSLENGINE:
    /*
     * String that holds the SSL crypto engine.
     */
    {
      const char *cpTemp = va_arg(param, char *);
      if (cpTemp && cpTemp[0]) {
#ifdef HAVE_OPENSSL_ENGINE_H
      ENGINE *e = ENGINE_by_id(cpTemp);
        if (e) {
          if (data->engine) {
            ENGINE_free(data->engine);
          }
          data->engine = e;
        }
        else {
          failf(data, "SSL Engine '%s' not found", cpTemp);
          return CURLE_SSL_ENGINE_NOTFOUND;
       }
#else
      return CURLE_SSL_ENGINE_NOTFOUND;
#endif
      }
    }
    break;

since the src/main.c unconditionally sets CURLOPT_SSLENGINE
with an empty argument.

Alternatively, the src/main.c could be changed.
Received on 2004-09-24