--- old/src/support.c	Sat Oct 21 17:18:42 2006
+++ src/support.c	Sun Oct 28 16:37:13 2007
@@ -260,9 +260,24 @@
 		bzero( ret->addr, BUFF_MAX_SIZE );
 
 		strncpy( ret->addr, &url_s[7], BUFF_MAX_SIZE);
+#ifdef USE_CURL
+	} else if(( strncmp("http://", url_s, 6 ) == 0) || ( strncmp("https://", url_s, 7 ) == 0)) {
+
+        if( strncmp("http://", url_s, 6 ) == 0)
+        {
+		    ret->proto = OCSP_CRL_PROTO_HTTP;
+            tmp_s = &url_s[7];
+        }
+        else
+        {
+            ret->proto = OCSP_CRL_PROTO_HTTPS;
+            tmp_s = &url_s[8];
+        }
+#else
 	} else if( strncmp("http://", url_s, 6 ) == 0) {
 		ret->proto = OCSP_CRL_PROTO_HTTP;
 		tmp_s = &url_s[7];
+#endif
 
 		if( (tmp_s3 = strchr(tmp_s, '@')) != NULL ) {
 			tmp_s2 = strchr( tmp_s, ':' );
@@ -308,7 +323,12 @@
 				tmp_s = &url_s[7];
 			}
 		} else {
-			ret->port = OCSP_DEFAULT_HTTP_PORT;
+#ifdef USE_CURL
+            if (ret->proto == OCSP_CRL_PROTO_HTTPS)
+                ret->port = OCSP_DEFAULT_HTTPS_PORT;
+            else
+#endif
+                ret->port = OCSP_DEFAULT_HTTP_PORT;
 		}
 
 		if( strchr( tmp_s, '/' )) {
