ssl/s3_clnt.c: fix intermittent failures.
authorAndy Polyakov <appro@openssl.org>
Thu, 12 Mar 2015 07:54:28 +0000 (08:54 +0100)
committerAndy Polyakov <appro@openssl.org>
Thu, 12 Mar 2015 07:54:28 +0000 (08:54 +0100)
[and respect error return value in ssltest.c]

Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/s3_clnt.c
ssl/ssltest.c

index 1e611c44bebf65d963d63c416d43b2702adaeceb..b37a7339f4ab78a1006b279fbd23e4a916b33c2f 100644 (file)
@@ -2580,6 +2580,7 @@ int ssl3_send_client_key_exchange(SSL *s)
                 DH_free(dh_clnt);
                 goto err;
             }
+            pmslen = n;
 
             if (s->s3->flags & TLS1_FLAGS_SKIP_CERT_VERIFY)
                 n = 0;
index 7a157a694b8e0d6764dfa5cef3be822e09558ee9..12d3efb50c5a409a93320557e62bcf2911ad47ab 100644 (file)
@@ -1707,13 +1707,14 @@ int main(int argc, char *argv[])
             ret = doit_biopair(s_ssl, c_ssl, bytes, &s_time, &c_time);
         else
             ret = doit(s_ssl, c_ssl, bytes);
+       if (ret)  break;
     }
 
     if (!verbose) {
         print_details(c_ssl, "");
     }
-    if ((number > 1) || (bytes > 1L))
-        BIO_printf(bio_stdout, "%d handshakes of %ld bytes done\n", number,
+    if ((i > 1) || (bytes > 1L))
+        BIO_printf(bio_stdout, "%d handshakes of %ld bytes done\n", i,
                    bytes);
     if (print_time) {
 #ifdef CLOCKS_PER_SEC