From 23419560c99a014cc3c8b3275657df7d66026954 Mon Sep 17 00:00:00 2001 From: josesimoes Date: Thu, 5 May 2022 11:20:33 +0100 Subject: [PATCH] Remove prompt to exit in all programs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Simões --- programs/aes/crypt_and_hash.c | 5 ----- programs/hash/generic_sum.c | 5 ----- programs/hash/hello.c | 5 ----- programs/pkey/dh_client.c | 5 ----- programs/pkey/dh_genprime.c | 5 ----- programs/pkey/dh_server.c | 5 ----- programs/pkey/ecdh_curve25519.c | 5 ----- programs/pkey/ecdsa.c | 5 ----- programs/pkey/gen_key.c | 5 ----- programs/pkey/key_app.c | 5 ----- programs/pkey/key_app_writer.c | 5 ----- programs/pkey/mpi_demo.c | 5 ----- programs/pkey/pk_decrypt.c | 5 ----- programs/pkey/pk_encrypt.c | 5 ----- programs/pkey/pk_sign.c | 5 ----- programs/pkey/pk_verify.c | 5 ----- programs/pkey/rsa_decrypt.c | 5 ----- programs/pkey/rsa_encrypt.c | 5 ----- programs/pkey/rsa_genkey.c | 5 ----- programs/pkey/rsa_sign.c | 5 ----- programs/pkey/rsa_sign_pss.c | 5 ----- programs/pkey/rsa_verify.c | 5 ----- programs/pkey/rsa_verify_pss.c | 5 ----- programs/ssl/dtls_client.c | 5 ----- programs/ssl/dtls_server.c | 5 ----- programs/ssl/ssl_client1.c | 5 ----- programs/ssl/ssl_client2.c | 8 -------- programs/ssl/ssl_fork_server.c | 5 ----- programs/ssl/ssl_mail_client.c | 5 ----- programs/ssl/ssl_pthread_server.c | 5 ----- programs/ssl/ssl_server.c | 5 ----- programs/ssl/ssl_server2.c | 5 ----- programs/test/benchmark.c | 5 ----- programs/test/selftest.c | 4 ---- programs/test/udp_proxy.c | 5 ----- programs/util/pem2der.c | 5 ----- programs/util/strerror.c | 5 ----- programs/x509/cert_app.c | 5 ----- programs/x509/cert_req.c | 5 ----- programs/x509/cert_write.c | 5 ----- programs/x509/crl_app.c | 5 ----- programs/x509/req_app.c | 5 ----- 42 files changed, 212 deletions(-) diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c index 74ea88c3c..728854875 100644 --- a/programs/aes/crypt_and_hash.c +++ b/programs/aes/crypt_and_hash.c @@ -137,11 +137,6 @@ int main( int argc, char *argv[] ) list++; } -#if defined(_WIN32) - mbedtls_printf( "\n Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - goto exit; } diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c index 9243f0a4a..f38a9769d 100644 --- a/programs/hash/generic_sum.c +++ b/programs/hash/generic_sum.c @@ -192,11 +192,6 @@ int main( int argc, char *argv[] ) list++; } -#if defined(_WIN32) - mbedtls_printf( "\n Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } diff --git a/programs/hash/hello.c b/programs/hash/hello.c index d2b6910f6..cb8de8b71 100644 --- a/programs/hash/hello.c +++ b/programs/hash/hello.c @@ -59,11 +59,6 @@ int main( void ) mbedtls_printf( "\n\n" ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( MBEDTLS_EXIT_SUCCESS ); } #endif /* MBEDTLS_MD5_C */ diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c index d633e4d1b..45de57b46 100644 --- a/programs/pkey/dh_client.c +++ b/programs/pkey/dh_client.c @@ -300,11 +300,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_AES_C && MBEDTLS_DHM_C && MBEDTLS_ENTROPY_C && diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c index 174a363f2..9ada4eae1 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -186,11 +186,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_FS_IO && diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index 75713ff58..29563088f 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -322,11 +322,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_AES_C && MBEDTLS_DHM_C && MBEDTLS_ENTROPY_C && diff --git a/programs/pkey/ecdh_curve25519.c b/programs/pkey/ecdh_curve25519.c index ca046fd24..dff548086 100644 --- a/programs/pkey/ecdh_curve25519.c +++ b/programs/pkey/ecdh_curve25519.c @@ -222,11 +222,6 @@ int main( int argc, char *argv[] ) exit: -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_ecdh_free( &ctx_srv ); mbedtls_ecdh_free( &ctx_cli ); mbedtls_ctr_drbg_free( &ctr_drbg ); diff --git a/programs/pkey/ecdsa.c b/programs/pkey/ecdsa.c index 550a230e8..c1c50702b 100644 --- a/programs/pkey/ecdsa.c +++ b/programs/pkey/ecdsa.c @@ -232,11 +232,6 @@ int main( int argc, char *argv[] ) exit: -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_ecdsa_free( &ctx_verify ); mbedtls_ecdsa_free( &ctx_sign ); mbedtls_ctr_drbg_free( &ctr_drbg ); diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index 7535eee3f..8779519b6 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -435,11 +435,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_PK_WRITE_C && MBEDTLS_PEM_WRITE_C && MBEDTLS_FS_IO && diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c index 42039024a..bd16b24b9 100644 --- a/programs/pkey/key_app.c +++ b/programs/pkey/key_app.c @@ -324,11 +324,6 @@ cleanup: mbedtls_mpi_free( &D ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &DP ); mbedtls_mpi_free( &DQ ); mbedtls_mpi_free( &QP ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c index ed6addfef..df1e50248 100644 --- a/programs/pkey/key_app_writer.c +++ b/programs/pkey/key_app_writer.c @@ -454,11 +454,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_PK_PARSE_C && MBEDTLS_PK_WRITE_C && MBEDTLS_FS_IO && diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c index 63417522b..eed8dfcfc 100644 --- a/programs/pkey/mpi_demo.c +++ b/programs/pkey/mpi_demo.c @@ -101,11 +101,6 @@ cleanup: mbedtls_printf( "\nAn error occurred.\n" ); } -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_FS_IO */ diff --git a/programs/pkey/pk_decrypt.c b/programs/pkey/pk_decrypt.c index f1bfd8a15..b09b6b889 100644 --- a/programs/pkey/pk_decrypt.c +++ b/programs/pkey/pk_decrypt.c @@ -162,11 +162,6 @@ exit: } #endif -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && diff --git a/programs/pkey/pk_encrypt.c b/programs/pkey/pk_encrypt.c index 293c0a089..3df11f7fd 100644 --- a/programs/pkey/pk_encrypt.c +++ b/programs/pkey/pk_encrypt.c @@ -165,11 +165,6 @@ exit: } #endif -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_ENTROPY_C && diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c index 2ab428dc2..7b5d8e171 100644 --- a/programs/pkey/pk_sign.c +++ b/programs/pkey/pk_sign.c @@ -164,11 +164,6 @@ exit: } #endif -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c index 51735070d..e82653b51 100644 --- a/programs/pkey/pk_verify.c +++ b/programs/pkey/pk_verify.c @@ -136,11 +136,6 @@ exit: } #endif -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_SHA256_C && diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c index 42ec6a7a4..c01a5cf63 100644 --- a/programs/pkey/rsa_decrypt.c +++ b/programs/pkey/rsa_decrypt.c @@ -196,11 +196,6 @@ exit: mbedtls_mpi_free( &D ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &DP ); mbedtls_mpi_free( &DQ ); mbedtls_mpi_free( &QP ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_FS_IO */ diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c index f7ff68f9d..25a42d323 100644 --- a/programs/pkey/rsa_encrypt.c +++ b/programs/pkey/rsa_encrypt.c @@ -172,11 +172,6 @@ exit: mbedtls_entropy_free( &entropy ); mbedtls_rsa_free( &rsa ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_ENTROPY_C && diff --git a/programs/pkey/rsa_genkey.c b/programs/pkey/rsa_genkey.c index e48050af4..67711bd66 100644 --- a/programs/pkey/rsa_genkey.c +++ b/programs/pkey/rsa_genkey.c @@ -161,11 +161,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_RSA_C && diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c index 5aa592d03..1df9b13b1 100644 --- a/programs/pkey/rsa_sign.c +++ b/programs/pkey/rsa_sign.c @@ -177,11 +177,6 @@ exit: mbedtls_mpi_free( &D ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &DP ); mbedtls_mpi_free( &DQ ); mbedtls_mpi_free( &QP ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c index 7ec7335be..8078ab624 100644 --- a/programs/pkey/rsa_sign_pss.c +++ b/programs/pkey/rsa_sign_pss.c @@ -172,11 +172,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_RSA_C && diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c index 1b3e19397..a8b1abb84 100644 --- a/programs/pkey/rsa_verify.c +++ b/programs/pkey/rsa_verify.c @@ -151,11 +151,6 @@ exit: mbedtls_rsa_free( &rsa ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c index d6634badd..3a207785c 100644 --- a/programs/pkey/rsa_verify_pss.c +++ b/programs/pkey/rsa_verify_pss.c @@ -146,11 +146,6 @@ int main( int argc, char *argv[] ) exit: mbedtls_pk_free( &pk ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c index 2bebb0df1..e06d535ee 100644 --- a/programs/ssl/dtls_client.c +++ b/programs/ssl/dtls_client.c @@ -346,11 +346,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - /* Shell can not handle large exit numbers -> 1 for errors */ if( ret < 0 ) ret = 1; diff --git a/programs/ssl/dtls_server.c b/programs/ssl/dtls_server.c index 5d1cccbe6..931744937 100644 --- a/programs/ssl/dtls_server.c +++ b/programs/ssl/dtls_server.c @@ -416,11 +416,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - /* Shell can not handle large exit numbers -> 1 for errors */ if( ret < 0 ) ret = 1; diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c index 3f7256fa8..a80ff713c 100644 --- a/programs/ssl/ssl_client1.c +++ b/programs/ssl/ssl_client1.c @@ -305,11 +305,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index f741d9963..cecd4cbd9 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -3134,14 +3134,6 @@ exit: mbedtls_memory_buffer_alloc_free(); #endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ -#if defined(_WIN32) - if( opt.query_config_mode == DFL_QUERY_CONFIG_MODE ) - { - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); - } -#endif - // Shell can not handle large exit numbers -> 1 for errors if( ret < 0 ) ret = 1; diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index 694fc3b7a..07b3e6fb5 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -407,11 +407,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 32960ad41..664a38490 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -848,11 +848,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index a8db4d8b1..ac14789d3 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -515,11 +515,6 @@ exit: mbedtls_memory_buffer_alloc_free(); #endif -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( ret ); } diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index 95557fb05..3b663726c 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -386,11 +386,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( ret ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index d728b95e3..770f87ff4 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -4213,11 +4213,6 @@ exit: if( opt.query_config_mode == DFL_QUERY_CONFIG_MODE ) { mbedtls_printf( " done.\n" ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif } // Shell can not handle large exit numbers -> 1 for errors diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 6ff2eb882..b88c38194 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -1280,11 +1280,6 @@ int main( int argc, char *argv[] ) mbedtls_memory_buffer_alloc_free(); #endif -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( 0 ); } diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 0c40686f7..a314bd22d 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -537,10 +537,6 @@ int main( int argc, char *argv[] ) { mbedtls_printf( " [ All tests PASS ]\n\n" ); } -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif } if( suites_failed > 0) diff --git a/programs/test/udp_proxy.c b/programs/test/udp_proxy.c index 41a90a9ad..fadcd38ab 100644 --- a/programs/test/udp_proxy.c +++ b/programs/test/udp_proxy.c @@ -1015,11 +1015,6 @@ exit: mbedtls_net_free( &server_fd ); mbedtls_net_free( &listen_fd ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } diff --git a/programs/util/pem2der.c b/programs/util/pem2der.c index e273200a9..cf6a56c6c 100644 --- a/programs/util/pem2der.c +++ b/programs/util/pem2der.c @@ -279,11 +279,6 @@ int main( int argc, char *argv[] ) exit: free( pem_buffer ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BASE64_C && MBEDTLS_FS_IO */ diff --git a/programs/util/strerror.c b/programs/util/strerror.c index 4b776d340..f91da1307 100644 --- a/programs/util/strerror.c +++ b/programs/util/strerror.c @@ -78,11 +78,6 @@ int main( int argc, char *argv[] ) mbedtls_printf("Last error was: -0x%04x - %s\n\n", (unsigned int) -val, error_buf ); } -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( val ); } #endif /* MBEDTLS_ERROR_C */ diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c index 3d8f37b64..985b9704c 100644 --- a/programs/x509/cert_app.c +++ b/programs/x509/cert_app.c @@ -486,11 +486,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index ed42079b4..7460bbf1c 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -389,11 +389,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_X509_CSR_WRITE_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 763f8684f..793982d5a 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -793,11 +793,6 @@ exit: mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_X509_CRT_WRITE_C && MBEDTLS_X509_CRT_PARSE_C && diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c index 2720b1d8e..aa353be0a 100644 --- a/programs/x509/crl_app.c +++ b/programs/x509/crl_app.c @@ -138,11 +138,6 @@ int main( int argc, char *argv[] ) exit: mbedtls_x509_crl_free( &crl ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CRL_PARSE_C && diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c index fd316e223..24324ff3d 100644 --- a/programs/x509/req_app.c +++ b/programs/x509/req_app.c @@ -138,11 +138,6 @@ int main( int argc, char *argv[] ) exit: mbedtls_x509_csr_free( &csr ); -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - mbedtls_exit( exit_code ); } #endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CSR_PARSE_C &&