diff -ruN curl-7.13.0/include/curl/curl.h curl-7.13.0.mp/include/curl/curl.h
--- curl-7.13.0/include/curl/curl.h	2005-01-26 00:13:12.000000000 +0200
+++ curl-7.13.0.mp/include/curl/curl.h	2005-02-12 23:42:32.000000000 +0200
@@ -885,6 +885,15 @@
   /* zero terminated string for pass on to the FTP server when asked for
      "account" info */
   CINIT(FTP_ACCOUNT, OBJECTPOINT, 134),
+  
+  /* Path of the dynamic engine */
+  CINIT(SSLENGINE_PATH, OBJECTPOINT, 135),
+
+  /* ID of the dynamic module */
+  CINIT(SSLENGINE_ID, OBJECTPOINT, 136),
+  
+  /* Path of the PKCS#11 module */
+  CINIT(SSLENGINE_PKCS11, OBJECTPOINT, 137),
 
   CURLOPT_LASTENTRY /* the last unused */
 } CURLoption;
diff -ruN curl-7.13.0/lib/ssluse.c curl-7.13.0.mp/lib/ssluse.c
--- curl-7.13.0/lib/ssluse.c	2005-02-01 00:55:32.000000000 +0200
+++ curl-7.13.0.mp/lib/ssluse.c	2005-02-12 23:43:46.000000000 +0200
@@ -524,7 +524,7 @@
     return;
 
   init_ssl++; /* never again */
-
+#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1
 #ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
   ENGINE_load_builtin_engines();
 #endif
@@ -595,6 +595,23 @@
     ENGINE_free(data->state.engine);
   }
   data->state.engine = NULL;
+  
+  if (!strcmp(engine, "dynamic")) {
+    if ((!data->state.engine_path || !data->state.engine_id)
+        || !ENGINE_ctrl_cmd_string(e, "SO_PATH", data->state.engine_path, 0)
+        || !ENGINE_ctrl_cmd_string(e, "ID", data->state.engine_id, 0)
+        || !ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0)
+        || (data->state.engine_pkcs11 && !ENGINE_ctrl_cmd_string(e, "MODULE_PATH", data->state.engine_pkcs11, 0))) {
+      ENGINE_free(e);
+      failf(data, "Failed to set attributes of dynamic engine!");
+      return (CURLE_SSL_ENGINE_NOTFOUND);
+    }
+  }
+  
+  if (!ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)) {
+    failf(data, "Failed to load dynamic engine!");
+    return (CURLE_SSL_ENGINE_NOTFOUND);
+  }
   if (!ENGINE_init(e)) {
     char buf[256];
 
diff -ruN curl-7.13.0/lib/url.c curl-7.13.0.mp/lib/url.c
--- curl-7.13.0/lib/url.c	2005-01-30 14:42:15.000000000 +0200
+++ curl-7.13.0.mp/lib/url.c	2005-02-12 23:44:10.000000000 +0200
@@ -1162,6 +1162,28 @@
      */
     result = Curl_SSL_set_engine_default(data);
     break;
+
+  case CURLOPT_SSLENGINE_PATH:
+    /*
+     * Set the path of the dynamic module
+     */
+    data->state.engine_path = va_arg(param, char *);
+    break;
+
+  case CURLOPT_SSLENGINE_ID:
+    /*
+     * Set the path of the dynamic module
+     */
+    data->state.engine_id = va_arg(param, char *);
+    break;    
+
+  case CURLOPT_SSLENGINE_PKCS11:
+    /*
+     * Set the path of the PKCS#11 module
+     */
+    data->state.engine_pkcs11 = va_arg(param, char *);
+    break;
+
   case CURLOPT_CRLF:
     /*
      * Kludgy option to enable CRLF convertions. Subject for removal.
diff -ruN curl-7.13.0/lib/urldata.h curl-7.13.0.mp/lib/urldata.h
--- curl-7.13.0/lib/urldata.h	2005-01-29 15:08:59.000000000 +0200
+++ curl-7.13.0.mp/lib/urldata.h	2005-02-12 23:44:20.000000000 +0200
@@ -783,6 +783,9 @@
 
 #if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
   ENGINE *engine;
+  char *engine_path;
+  char *engine_id;
+  char *engine_pkcs11;
 #endif /* USE_SSLEAY */
 };
 
diff -ruN curl-7.13.0/src/main.c curl-7.13.0.mp/src/main.c
--- curl-7.13.0/src/main.c	2005-01-27 17:59:01.000000000 +0200
+++ curl-7.13.0.mp/src/main.c	2005-02-12 23:45:32.000000000 +0200
@@ -343,6 +343,9 @@
     "    --key-type <type> Private key file type (DER/PEM/ENG) (SSL)",
     "    --pass  <pass>  Pass phrase for the private key (SSL)",
     "    --engine <eng>  Crypto engine to use (SSL). \"--engine list\" for list",
+    "    --engine-path <path> Path of the dynamic crypto engine (SSL).",
+    "    --engine-id <id> Id of the dynamic crypto engine (SSL).",
+    "    --engine-pkcs11 <path> Path of the PKCS#11 module to use with engine (SSL).",
     "    --cacert <file> CA certificate to verify peer against (SSL)",
     "    --capath <directory> CA directory (made using c_rehash) to verify",
     "                    peer against (SSL)",
@@ -493,6 +496,9 @@
   char *key_type;
   char *key_passwd;
   char *engine;
+  char *engine_path;
+  char *engine_id;
+  char *engine_pkcs11;
   bool list_engines;
   bool crlf;
   char *customrequest;
@@ -1279,6 +1285,9 @@
     {"Ee","pass",        TRUE},
     {"Ef","engine",      TRUE},
     {"Eg","capath ",     TRUE},
+    {"Eh","engine-path", TRUE},
+    {"Ei","engine-id",   TRUE},
+    {"Ej","engine-pkcs11", TRUE},    
     {"f", "fail",        FALSE},
     {"F", "form",        TRUE},
     {"g", "globoff",     FALSE},
@@ -1795,6 +1804,15 @@
         /* CA cert directory */
         GetStr(&config->capath, nextarg);
         break;
+      case 'h': /* crypto engine path */
+        GetStr(&config->engine_path, nextarg);
+        break;
+      case 'i': /* crypto engine id */
+        GetStr(&config->engine_id, nextarg);
+        break;
+      case 'j': /* pkcs11 path  */
+        GetStr(&config->engine_pkcs11, nextarg);
+        break;
       default: /* certificate file */
         {
           char *ptr = strchr(nextarg, ':');
@@ -3622,6 +3640,12 @@
         res = CURLE_OK;
 
         /* new in curl ?? */
+        if (config->engine_path) {
+          res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_PATH, config->engine_path);
+        }
+        if (config->engine_id) {
+          res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_ID, config->engine_id);
+        }
         if (config->engine) {
           res = curl_easy_setopt(curl, CURLOPT_SSLENGINE, config->engine);
           curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1);

