Hi there, In the file apps/speed.c, line 2717~2737 & line 2738~2758 are exactly duplicated. These code are used to retrieve RSA speed testing result via pipes from forked child process by "-muliti $n" command line param, however, for some reason, the "+F2:" tag handling code are copied twice, one by one, which creates this duplication.
The attached patch simply remove the duplicated part. ##################################################################### diff -ur openssl-orig/apps/speed.c openssl-work/apps/speed.c --- openssl-orig/apps/speed.c 2013-02-25 14:10:52.000000000 +0800 +++ openssl-work/apps/speed.c 2013-02-25 15:01:16.740855800 +0800 @@ -2735,27 +2735,6 @@ else rsa_results[k][1]=d; } - else if(!strncmp(buf,"+F2:",4)) - { - int k; - double d; - - p=buf+4; - k=atoi(sstrsep(&p,sep)); - sstrsep(&p,sep); - - d=atof(sstrsep(&p,sep)); - if(n) - rsa_results[k][0]=1/(1/rsa_results[k][0]+1/d); - else - rsa_results[k][0]=d; - - d=atof(sstrsep(&p,sep)); - if(n) - rsa_results[k][1]=1/(1/rsa_results[k][1]+1/d); - else - rsa_results[k][1]=d; - } #ifndef OPENSSL_NO_DSA else if(!strncmp(buf,"+F3:",4)) { ##################################################################### -- Regards, Huang Le (Eric, Alibaba DevOps) Email: 4tarhl AT gmail.com, le.hl AT alibaba-inc.com
mydiffs.patch
Description: Binary data