Skip to content

Commit

Permalink
Merge pull request #7656 from mprse/ffdh_tls13_v2_drivers
Browse files Browse the repository at this point in the history
FFDH 4: driver-only parity testing - with TLS 1.3
  • Loading branch information
mpg authored Jul 10, 2023
2 parents e183ece + 565353e commit f614bde
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
25 changes: 23 additions & 2 deletions tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2270,8 +2270,8 @@ component_test_psa_crypto_config_accel_ffdh () {
# Configure
# ---------

# Start from default config (no TLS 1.3, no USE_PSA)
helper_libtestdriver1_adjust_config "default"
# start with full (USE_PSA and TLS 1.3)
helper_libtestdriver1_adjust_config "full"

# Disable the module that's accelerated
scripts/config.py unset MBEDTLS_DHM_C
Expand All @@ -2295,6 +2295,27 @@ component_test_psa_crypto_config_accel_ffdh () {

msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated FFDH"
make test

msg "ssl-opt: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated FFDH alg"
tests/ssl-opt.sh -f "ffdh"
}

component_test_psa_crypto_config_reference_ffdh () {
msg "build: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated FFDH"

# Start with full (USE_PSA and TLS 1.3)
helper_libtestdriver1_adjust_config "full"

# Disable things that are not supported
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
make

msg "test suites: MBEDTLS_PSA_CRYPTO_CONFIG with non-accelerated FFDH alg + USE_PSA"
make test

msg "ssl-opt: MBEDTLS_PSA_CRYPTO_CONFIG with non-accelerated FFDH alg + USE_PSA"
tests/ssl-opt.sh -f "ffdh"
}

component_test_psa_crypto_config_accel_pake() {
Expand Down
11 changes: 10 additions & 1 deletion tests/scripts/analyze_outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def do_analyze_driver_vs_reference(outcome_file, args):
('Key ASN1 (OneAsymmetricKey X25519, doesn\'t match masking '
'requirements, from RFC8410 Appendix A but made into version 0)'),
],
}
},
}
},
'analyze_driver_vs_reference_no_ecp_at_all': {
Expand Down Expand Up @@ -328,6 +328,15 @@ def do_analyze_driver_vs_reference(outcome_file, args):
}
}
},
'analyze_driver_vs_reference_ffdh_alg': {
'test_function': do_analyze_driver_vs_reference,
'args': {
'component_ref': 'test_psa_crypto_config_reference_ffdh',
'component_driver': 'test_psa_crypto_config_accel_ffdh',
'ignored_suites': ['dhm'],
'ignored_tests': {}
}
},
}

def main():
Expand Down
2 changes: 1 addition & 1 deletion tests/suites/test_suite_psa_crypto_metadata.function
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ void ecc_key_family(int curve_arg)
}
/* END_CASE */

/* BEGIN_CASE depends_on:MBEDTLS_DHM_C */
/* BEGIN_CASE depends_on:PSA_KEY_TYPE_DH_PUBLIC_KEY:PSA_KEY_TYPE_DH_KEY_PAIR */
void dh_key_family(int group_arg)
{
psa_dh_family_t group = group_arg;
Expand Down

0 comments on commit f614bde

Please sign in to comment.