Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 37723 invoked from network); 21 Oct 2004 19:03:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Oct 2004 19:03:26 -0000 Received: (qmail 55268 invoked by uid 500); 21 Oct 2004 19:02:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 55113 invoked by uid 500); 21 Oct 2004 19:02:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 55061 invoked by uid 99); 21 Oct 2004 19:02:46 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [65.168.58.10] (HELO sneezy.vandervecken.com) (65.168.58.10) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 21 Oct 2004 12:02:44 -0700 Received: from cyrus.vandervecken.com ([64.124.43.248] helo=cyrus) by sneezy.vandervecken.com with esmtp (Exim 4.34) id 1CKiCr-0000YU-OD for dev@httpd.apache.org; Thu, 21 Oct 2004 14:02:37 -0500 Received: from geoff by cyrus with local (Exim 4.34) id 1CKiCo-0004TG-FB for dev@httpd.apache.org; Thu, 21 Oct 2004 12:02:34 -0700 From: Geoff Thorpe To: dev@httpd.apache.org Subject: Re: Apache with Security Processor - Interesting Date: Thu, 21 Oct 2004 15:02:33 -0400 User-Agent: KMail/1.7 References: <200410202010.53233.geoff@geoffthorpe.net> <54f1458d04102110057de11284@mail.gmail.com> In-Reply-To: <54f1458d04102110057de11284@mail.gmail.com> Sender: Geoff Thorpe MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410211502.33629.geoff@geoffthorpe.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On October 21, 2004 01:05 pm, Madhusudan Mathihalli wrote: > On Wed, 20 Oct 2004 20:10:53 -0400, Geoff Thorpe wrote: > > Did the control-command support ever make it into a cvs-worthy form? > > Nope - I don't believe it is in the CVS. Can you re-send the patch ? Um, all I have is an old version for mod_ssl (apache 1.3) on my website (in the "crypto" page) - it adds the SSLCryptoDeviceCtrl directive. IIRC, one of the Bill's on this list ported this to 2.* form, you may be able to find it in the archives I guess (I'm at work and so not able to trawl for this right now). Note, I wasn't terribly pleased with how I implemented it, so I don't pretend to suggest this is the Right Way(tm). > > That's a far more general way to squash this issue. > > Well.. I'm not sure of that - it'll probably be more clear after > seeing your patch. AFAICT, we have so some how force Apache to load > the dynamic engine - and that's pretty much what my patch does. Yes, and in your implementation you're doing this by issuing various control-commands exposed by the "dynamic" engine to achieve it. This magic may be a suitable transparent behaviour to use when the specified engine can't be initialised directly, but it's still limited to whatever logic you hard-code into the existing SSLCryptoDevice directive. Any other commands supported by the "dynamic" engine (let alone any supported by the targetted engine once it's loaded) would be inaccessible unless someone goes in and adds further C logic. Eg. if an engine requires configuration/authorisation, it can expose those details as control-commands and as long as there's a mechanism to pass arbitrary commands from the configuration file through, then Apache wouldn't need to be any the wiser. Eg. the existing autoloading magic, plus additional device-specific setup/control, could be achieved with; SSLCryptoDevice dynamic SSLCryptoDeviceCtrl SO_PATH:/lib/.../foobar.so SSLCryptoDeviceCtrl LOAD [... the "dynamic" engine is now replaced by the loaded engine...] SSLCryptoDeviceCtrl FOOBAR_LOGFILE:[...] SSLCryptoDeviceCtrl FOOBAR_AUTH:[...] ... [... appending 'post' executes commands after ENGINE_init() ...] SSLCryptoDeviceCtrl FOOBAR_LOCK post ... Without something like this, the functionality is limited to whatever is explicitly coded into apache, which I think is a little limiting. Also useful will be some alterations that allow HSM keys to be used - I can help with that if you like, but it'll definitely need control-command support first. NB: Another way forward is to try and hook into Steve Henson's revisions to the configuration code. This essentially offloads all of this sort of stuff to an openssl-specific configuration file that is "executed" at the appropriate moment(s). We'd need to get Steve involved in that discussion though if you're interested (there are potential pros and cons to this). Cheers, Geoff -- Geoff Thorpe geoff@geoffthorpe.net http://www.geoffthorpe.net/