You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Sidney Markowitz <si...@sidney.com> on 2004/07/06 16:57:55 UTC

suggestion wanted

I put together a test case to verify that SSL works. It should only be 
run when the build was started with perl makefile.PL ENABLE_SSL=yes. 
Everything I've thought of about how to get a conditional in the test 
seems kludgy to me.

Can someone suggest how you think the test can best be conditionalized?

Thanks,

  -- sidney

Re: suggestion wanted

Posted by Daniel Quinlan <qu...@pathname.com>.
Sidney Markowitz <si...@sidney.com> writes:

> I put together a test case to verify that SSL works. It should only be 
> run when the build was started with perl makefile.PL ENABLE_SSL=yes. 
> Everything I've thought of about how to get a conditional in the test 
> seems kludgy to me.
> 
> Can someone suggest how you think the test can best be conditionalized?

In addition to what Theo said, you could read spamc/config.h and on the
perl side, testing for IO::Socket::SSL is easy.  I'd always do the test
if spamc has SSL support and if IO::Socket::SSL is installed.

Daniel

-- 
Daniel Quinlan
http://www.pathname.com/~quinlan/

Re: suggestion wanted

Posted by "Malte S. Stretz" <ms...@gmx.net>.
On Tuesday 06 July 2004 17:35 CET Theo Van Dinter wrote:
> On Wed, Jul 07, 2004 at 02:57:55AM +1200, Sidney Markowitz wrote:
> > Everything I've thought of about how to get a conditional in the test
> > seems kludgy to me.
>
> I was thinking that right now "spamc -V" will return:
>
> SpamAssassin Client version 3.0.0-pre1-r21475
>
> for both SSL and non-SSL versions, and that perhaps we should make it:
>
> SpamAssassin Client version 3.0.0-pre1-r21475 (SSL)

Great idea, even if its not used for SSL detection. I created a quick patch 
which does something like this :) It's bug 3571.

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Re: suggestion wanted

Posted by Theo Van Dinter <fe...@kluge.net>.
On Wed, Jul 07, 2004 at 02:57:55AM +1200, Sidney Markowitz wrote:
> Everything I've thought of about how to get a conditional in the test 
> seems kludgy to me.

I was thinking that right now "spamc -V" will return:

SpamAssassin Client version 3.0.0-pre1-r21475

for both SSL and non-SSL versions, and that perhaps we should make it:

SpamAssassin Client version 3.0.0-pre1-r21475 (SSL)

or something instead of the only way of telling being the addition of
the -S option.  Unfortunately, something like "spamc -V -S" doesn't
generate an error w/no SSL, so ...

So for right now, you could run "spamc -h" and look for the -S option,
but that's really klugy.  The arguably not-klugy version is to add SSL
info to the -V output, then just look for that in the test.

There'll have to be a metadata store somewhere that says SSL is enabled,
so we may as well just use the binary for that purpose IMO.

-- 
Randomly Generated Tagline:
Anything simple is stated in the most complicated manner.