From owner-freebsd-questions Sun Jun 8 12:50:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA14702 for questions-outgoing; Sun, 8 Jun 1997 12:50:35 -0700 (PDT) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA14697 for ; Sun, 8 Jun 1997 12:50:30 -0700 (PDT) Received: from ppro.tar.com (ppro.tar.com [204.95.187.9]) by ns.tar.com (8.8.5/8.8.5) with SMTP id OAA23580; Sun, 8 Jun 1997 14:49:53 -0500 (CDT) Message-Id: <199706081949.OAA23580@ns.tar.com> From: "Richard Seaman, Jr." To: "Khetan Gajjar" Cc: "freebsd-questions@freebsd.org" Date: Sun, 08 Jun 97 14:49:52 -0500 Reply-To: "Richard Seaman, Jr." Priority: Normal X-Mailer: PMMail 1.92 For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: Apache with SSL or shttp Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk You wrote: >I hand-applied the patches from ftp.ox.ac.uk to 1.2b11, and >hand-applied the patches from the pkg.SSL (those that differed). >It compiled great, but when ever I tried to run the httpsd, it would >sigsegv. >Anyone got a *WORKING* port of Apache+SSL, preferably against 1.2 >(seeing that it's just been released) ? >I'm tired of hand-diffing all these blasted files, having it compile >and then sigsegv. There were significant changes to http_main.c between Apache 1.2b10 and 1.2b11 or 1.2 release. The line ApacheSSLSetupConnection(current_conn); gets put in the wrong place by SSLPatch -- current_conn is NULL when this gets called in the wrong place, which is why you get your sigsegv. Try this patch (to 1.2 release -- should be the same for 1.2b11), plus all the other patches in SSLpatch except for those for http_main.c: *** /usr/ports/www/apache/work/apache_1.2.0/src/http_main.c Wed May 28 23:50:27 1997 --- http_main.c Sun Jun 8 14:27:36 1997 *************** *** 1852,1857 **** --- 1852,1867 ---- * until no requests are left or we decide to close. */ + #ifdef APACHE_SSL + /* + * This returns false if the connection cannot be setup, + * so maybe we should do something with this here... + * however it also blocks the BUFF connections + * so the next bit should fall out anyway! + */ + ApacheSSLSetupConnection(current_conn); + #endif + while ((r = read_request(current_conn)) != NULL) { /* ok we've read the request... it's a little too late *************** *** 2110,2115 **** --- 2120,2126 ---- { struct sockaddr_in sa_server; int saved_sd; + static BOOL bFirst=TRUE; int remaining_children_to_start; standalone = 1; *************** *** 2131,2140 **** kill_cleanups_for_fd (pconf, scoreboard_fd); } #endif ! clear_pool (pconf); ! ptrans = make_sub_pool (pconf); - server_conf = read_config (pconf, ptrans, server_confname); open_logs (server_conf, pconf); set_group_privs (); accept_mutex_init (pconf); --- 2142,2156 ---- kill_cleanups_for_fd (pconf, scoreboard_fd); } #endif ! if(!bFirst) ! { ! clear_pool (pconf); ! ptrans = make_sub_pool (pconf); ! server_conf = read_config(pconf, ptrans, server_confname); ! } ! else ! bFirst=FALSE; open_logs (server_conf, pconf); set_group_privs (); accept_mutex_init (pconf); *************** *** 2148,2154 **** } #endif ! default_server_hostnames (server_conf); if (listeners == NULL) { if (!is_graceful) { --- 2164,2170 ---- } #endif ! /* default_server_hostnames (server_conf);*/ if (listeners == NULL) { if (!is_graceful) { *************** *** 2393,2399 **** server_conf = read_config (pconf, ptrans, server_confname); if(standalone) { ! clear_pool (pconf); /* standalone_main rereads... */ standalone_main(argc, argv); } else { --- 2409,2415 ---- server_conf = read_config (pconf, ptrans, server_confname); if(standalone) { ! /* clear_pool (pconf); /* standalone_main rereads... */ standalone_main(argc, argv); } else {