diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-03-21 11:14:15 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-03-21 11:14:15 +0100 |
commit | c5a863b3d3caa59cd623a933a51364bc16007ecd (patch) | |
tree | 6e2605b9af1314683e18c5340764255af691b08c /src | |
parent | 356ddd824b0f95d0713daa6d12dbbcb3baf65439 (diff) | |
download | gnutls-c5a863b3d3caa59cd623a933a51364bc16007ecd.tar.gz |
tools: enable compilation with all options disabled
Diffstat (limited to 'src')
-rw-r--r-- | src/common.c | 2 | ||||
-rw-r--r-- | src/crywrap/crywrap.c | 3 | ||||
-rw-r--r-- | src/tests.c | 14 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/common.c b/src/common.c index b7442a53ef..a5eb1fae65 100644 --- a/src/common.c +++ b/src/common.c @@ -342,6 +342,7 @@ int cert_verify(gnutls_session_t session, const char *hostname, const char *purp static void print_dh_info(gnutls_session_t session, const char *str, int print) { +#if defined(ENABLE_DHE) || defined(ENABLE_ANON) printf("- %sDiffie-Hellman parameters\n", str); printf(" - Using prime: %d bits\n", gnutls_dh_get_prime_bits(session)); @@ -415,6 +416,7 @@ print_dh_info(gnutls_session_t session, const char *str, int print) gnutls_free(raw_gen.data); gnutls_dh_params_deinit(dh_params); } +#endif } static void print_ecdh_info(gnutls_session_t session, const char *str) diff --git a/src/crywrap/crywrap.c b/src/crywrap/crywrap.c index 483913b706..1277609be4 100644 --- a/src/crywrap/crywrap.c +++ b/src/crywrap/crywrap.c @@ -565,12 +565,13 @@ _crywrap_tls_session_create(const crywrap_config_t * config) */ static void _crywrap_tls_init(void) { - +#ifdef ENABLE_DHE gnutls_dh_params_init(&dh_params); gnutls_dh_params_import_pkcs3(dh_params, &dh_file, GNUTLS_X509_FMT_PEM); gnutls_certificate_set_dh_params(cred, dh_params); +#endif } /** @} */ diff --git a/src/tests.c b/src/tests.c index 72fa2f7571..e2283fca93 100644 --- a/src/tests.c +++ b/src/tests.c @@ -185,6 +185,7 @@ static gnutls_ecc_curve_t curve = GNUTLS_ECC_CURVE_INVALID; test_code_t test_dhe(gnutls_session_t session) { +#ifdef ENABLE_DHE int ret; sprintf(prio_str, INIT_STR @@ -199,6 +200,8 @@ test_code_t test_dhe(gnutls_session_t session) gnutls_dh_get_pubkey(session, &pubkey); return ret; +#endif + return TEST_IGNORE; } test_code_t test_ecdhe(gnutls_session_t session) @@ -277,7 +280,9 @@ test_code_t test_ocsp_status(gnutls_session_t session) return TEST_FAILED; } -test_code_t test_etm(gnutls_session_t session) +#endif + +test_code_t test_ext_master_secret(gnutls_session_t session) { int ret; @@ -296,13 +301,13 @@ test_code_t test_etm(gnutls_session_t session) if (ret < 0) return TEST_FAILED; - if (gnutls_session_etm_status(session) != 0) + if (gnutls_session_ext_master_secret_status(session) != 0) return TEST_SUCCEED; return TEST_FAILED; } -test_code_t test_ext_master_secret(gnutls_session_t session) +test_code_t test_etm(gnutls_session_t session) { int ret; @@ -321,12 +326,11 @@ test_code_t test_ext_master_secret(gnutls_session_t session) if (ret < 0) return TEST_FAILED; - if (gnutls_session_ext_master_secret_status(session) != 0) + if (gnutls_session_etm_status(session) != 0) return TEST_SUCCEED; return TEST_FAILED; } -#endif test_code_t test_safe_renegotiation_scsv(gnutls_session_t session) { |