New function X509_CTX_rget_chain(), make SSL_SESSION_print() display return code.
[openssl.git] / apps / speed.c
index 502cb0c8ea083575b570cb411703274fdfce17af..b96733346bc080f4b840f179a547e23c1e1f91e7 100644 (file)
@@ -241,13 +241,14 @@ static double Time_F(int s)
 int MAIN(int argc, char **argv)
        {
        unsigned char *buf=NULL,*buf2=NULL;
-       int ret=1;
+       int mret=1;
 #define ALGOR_NUM      14
 #define SIZE_NUM       5
 #define RSA_NUM                4
 #define DSA_NUM                3
        long count,rsa_count;
-       int i,j,k,rsa_num,rsa_num2;
+       int i,j,k;
+       unsigned rsa_num,rsa_num2;
 #ifndef NO_MD2
        unsigned char md2[MD2_DIGEST_LENGTH];
 #endif
@@ -589,9 +590,9 @@ int MAIN(int argc, char **argv)
 #endif
 
 #ifndef NO_DES
-       des_set_key(&key,sch);
-       des_set_key(&key2,sch2);
-       des_set_key(&key3,sch3);
+       des_set_key_unchecked(&key,sch);
+       des_set_key_unchecked(&key2,sch2);
+       des_set_key_unchecked(&key3,sch3);
 #endif
 #ifndef NO_IDEA
        idea_set_encrypt_key(key16,&idea_ks);
@@ -615,6 +616,7 @@ int MAIN(int argc, char **argv)
        memset(rsa_c,0,sizeof(rsa_c));
 #endif
 #ifndef SIGALRM
+#ifndef NO_DES
        BIO_printf(bio_err,"First we calculate the approximate speed ...\n");
        count=10;
        do      {
@@ -706,10 +708,14 @@ int MAIN(int argc, char **argv)
 #define COND(d)        (count < (d))
 #define COUNT(d) (d)
 #else
+/* not worth fixing */
+# error "You cannot disable DES on systems without SIGALRM."
+#endif /* NO_DES */
+#else
 #define COND(c)        (run)
 #define COUNT(d) (count)
        signal(SIGALRM,sig_done);
-#endif
+#endif /* SIGALRM */
 
 #ifndef NO_MD2
        if (doit[D_MD2])
@@ -1157,7 +1163,7 @@ int MAIN(int argc, char **argv)
                fprintf(stdout,"\n");
                }
 #endif
-       ret=0;
+       mret=0;
 end:
        if (buf != NULL) Free(buf);
        if (buf2 != NULL) Free(buf2);
@@ -1171,7 +1177,7 @@ end:
                if (dsa_key[i] != NULL)
                        DSA_free(dsa_key[i]);
 #endif
-       EXIT(ret);
+       EXIT(mret);
        }
 
 static void print_message(char *s, long num, int length)