apps/speed.c: Fix build errors on OPENSSL_NO_{RSA,DSA,EC,DEPECATED_3_0}
@@ -155,8 +155,12 @@ static int usertime = 1;
static double Time_F(int s);
static void print_message(const char *s, long num, int length, int tm);
+#if (!defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || (!defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
static void pkey_print_message(const char *str, const char *str2,
long num, unsigned int bits, int sec);
+#endif
static void print_result(int alg, int run_no, int count, double time_used);
#ifndef NO_FORK
static int do_multi(int multi, int size_num);
@@ -1509,8 +1513,9 @@ int speed_main(int argc, char **argv)
#ifndef NO_FORK
int multi = 0;
#endif
-#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) \
- || !defined(OPENSSL_NO_EC)
+#if (!defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || (!defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
long rsa_count = 1;
#endif
openssl_speed_sec_t seconds = { SECONDS, RSA_SECONDS, DSA_SECONDS,
@@ -3222,7 +3227,7 @@ int speed_main(int argc, char **argv)
}
}
}
-# endif
+# endif /* OPENSSL_NO_DEPRECATED_3_0 */
for (testnum = 0; testnum < EC_NUM; testnum++) {
int ecdh_checks = 1;
@@ -4103,6 +4108,9 @@ static void print_message(const char *s, long num, int length, int tm)
#endif
}
+#if (!defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || (!defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)) \
+ || !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
static void pkey_print_message(const char *str, const char *str2, long num,
unsigned int bits, int tm)
{
@@ -4120,6 +4128,7 @@ static void pkey_print_message(const char *str, const char *str2, long num,
(void)BIO_flush(bio_err);
# endif
}
+#endif
static void print_result(int alg, int run_no, int count, double time_used)
{
