int main (int argc, char *const *argv) { unsigned int errorCount = 0; const char *aes256_sha_tlsv1 = "AES256-SHA"; const char *des_cbc3_sha_tlsv1 = "DES-CBC3-SHA"; gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif if (0 != curl_global_init (CURL_GLOBAL_ALL)) { fprintf (stderr, "Error: %s\n", strerror (errno)); return -1; } if (curl_uses_nss_ssl() == 0) { aes256_sha_tlsv1 = "rsa_aes_256_sha"; des_cbc3_sha_tlsv1 = "rsa_aes_128_sha"; } errorCount += test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1); errorCount += test_cipher_option (NULL, des_cbc3_sha_tlsv1, CURL_SSLVERSION_TLSv1); print_test_result (errorCount, argv[0]); curl_global_cleanup (); return errorCount != 0; }
int main (int argc, char *const *argv) { unsigned int errorCount = 0; const char *aes256_sha_tlsv1 = "AES256-SHA"; (void)argc; /* Unused. Silent compiler warning. */ #ifdef MHD_HTTPS_REQUIRE_GRYPT gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif #endif /* MHD_HTTPS_REQUIRE_GRYPT */ if (!testsuite_curl_global_init ()) return 99; if (NULL == curl_version_info (CURLVERSION_NOW)->ssl_version) { fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n"); curl_global_cleanup (); return 77; } if (curl_uses_nss_ssl() == 0) { aes256_sha_tlsv1 = "rsa_aes_256_sha"; } errorCount += test_secure_get (NULL, aes256_sha_tlsv1, CURL_SSLVERSION_TLSv1); print_test_result (errorCount, argv[0]); curl_global_cleanup (); return errorCount != 0 ? 1 : 0; }
int main (int argc, char *const *argv) { unsigned int errorCount = 0; gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); #ifdef GCRYCTL_INITIALIZATION_FINISHED gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #endif if (setup_ca_cert () == NULL) { fprintf (stderr, MHD_E_TEST_FILE_CREAT); return -1; } if (0 != curl_global_init (CURL_GLOBAL_ALL)) { fprintf (stderr, "Error (code: %u)\n", errorCount); return -1; } char *aes256_sha = "AES256-SHA"; if (curl_uses_nss_ssl() == 0) { aes256_sha = "rsa_aes_256_sha"; } errorCount += test_secure_get (NULL, aes256_sha, CURL_SSLVERSION_TLSv1); print_test_result (errorCount, argv[0]); curl_global_cleanup (); if (0 != remove (ca_cert_file_name)) fprintf (stderr, "Failed to remove `%s'\n", ca_cert_file_name); return errorCount != 0; }