develooper Front page | perl.qpsmtpd | Postings from July 2005

Testing STARTTLS (Re: [Patch] STARTTLS support (forkserver only))

Thread Previous | Thread Next
From:
Charlie Brady
Date:
July 8, 2005 10:37
Subject:
Testing STARTTLS (Re: [Patch] STARTTLS support (forkserver only))
Message ID:
Pine.LNX.4.61.0507081333010.3695@e-smith.charlieb.ott.istop.com

For those interested in dabbling with STARTTLS, it's very useful to have a 
convenient scriptable testing tool. I've been using swaks 
(http://jetmore.org/john/code/#swaks) which has been extremely useful.
Thanks John!

The current version however has a bug which you'll need to fix if you want 
to make any sense of test results. Here's a patch:

--- swaks.20050625.8.orig       2005-07-08 12:04:17.000000000 -0400
+++ swaks.20050625.8    2005-07-08 12:05:00.000000000 -0400
@@ -666,7 +666,9 @@
      } else {
        # The 'do' allows for multi-line responses
        if ($G::link{tls}{active}) {
-        $buff = Net::SSLeay::read($G::link{tls}{ssl});
+        do {
+          $buff .= Net::SSLeay::read($G::link{tls}{ssl});
+        } while ($buff !~ /^\d\d\d /m);
        } else {
          do {
            if ($G::link{type} eq 'pipe') {





Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About