This is a second patch to ab in 2.0.54 package.
It fixes the things below against the first patch.

1. The resulting shared key bit length is now the
  number of effective bits.

2. Now ab does not dump core in case of SSL handshake
  error.

--
Masaoki Kobayashi
<[EMAIL PROTECTED]>
--- ab.c.org    2005-05-08 23:36:00.000000000 +0900
+++ ab.c        2005-05-11 20:47:00.000000000 +0900
@@ -91,7 +91,7 @@
  * ab - or to due to a change in the distribution it is compiled with 
  * (such as an APR change in for example blocking).
  */
-#define AP_AB_BASEREVISION "2.0.41-dev-ssl-patch"    
+#define AP_AB_BASEREVISION "2.0.41-dev-ssl-patch-2"
 
 /*
  * BUGS:
@@ -548,10 +548,10 @@
            if (ssl_info == NULL) {
                SSL_CIPHER *ci;
                X509 *cert;
-               int sk_bits, pk_bits;
+               int sk_bits, pk_bits, swork;
 
                ci = SSL_get_current_cipher(c->ssl);
-               SSL_CIPHER_get_bits(ci, &sk_bits);
+               sk_bits = SSL_CIPHER_get_bits(ci, &swork);
                cert = SSL_get_peer_certificate(c->ssl);
                if (cert)
                    pk_bits = EVP_PKEY_bits(X509_get_pubkey(cert));
@@ -586,6 +586,7 @@
            BIO_printf(bio_err, "SSL handshake failed (%d).\n", ecode);
            ERR_print_errors(bio_err);
            close_connection(c);
+           do_next = 0;
            break;
        }
     }
@@ -723,7 +724,7 @@
     printf("Server Hostname:        %s\n", hostname);
     printf("Server Port:            %hd\n", port);
 #ifdef AB_USE_SSL
-    if (is_ssl)
+    if (is_ssl && ssl_info)
     printf("SSL/TLS Protocol:       %s\n", ssl_info);
 #endif
     printf("\n");
@@ -1697,7 +1698,7 @@
     if (!use_html) {
        printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " 
<$Revision: 1.121.2.12 $> apache-2.0");
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, 
http://www.zeustech.net/\n";);
-       printf("Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/\n";);
+       printf("Copyright (c) 1998-2005 The Apache Software Foundation, 
http://www.apache.org/\n";);
        printf("\n");
     }
     else {

Reply via email to