Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend "full" config to non-boolean options and pass Clang+Asan #2684

Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
95f5cbc
Don't systematically rebuild programs
gilles-peskine-arm Jun 7, 2019
5d26e7c
Pass -m32 to the linker as well
gilles-peskine-arm Jun 7, 2019
c00d4a1
Move config.h boolean options to their appropriate section
gilles-peskine-arm Jun 7, 2019
606dec0
Test suites: cope with psa_crypto_init failure
gilles-peskine-arm Jun 7, 2019
1c18472
Test PSA functions against PSA_SUCCESS, not 0
gilles-peskine-arm Jun 7, 2019
9088867
Make test suites compatible with #include <assert.h>
gilles-peskine-arm Jun 7, 2019
deaa5c6
Support MBEDTLS_CHECK_PARAMS defined as assert
gilles-peskine-arm Jun 7, 2019
a7d9d16
config.pl full: enable non-boolean options as well
gilles-peskine-arm Jun 7, 2019
f0d5e73
Fix misuse of signed ints in the HAVEGE module
gilles-peskine-arm Jun 7, 2019
1b5a9f4
Document CSR memory management for mbedtls_x509_csr_parse
gilles-peskine-arm Jun 7, 2019
621c92b
Fix memory leak in x509_csr_check_opaque
gilles-peskine-arm Jun 7, 2019
af8f902
Add Clang+Asan component in the full configuration
gilles-peskine-arm Jun 7, 2019
b0d799e
Don't set PSA_CRYPTO_C if it isn't going to be used
gilles-peskine-arm Jun 7, 2019
49997f5
Update crypto submodule to the precursor branch
gilles-peskine-arm Jun 7, 2019
8a5bf34
Only "veryfull" enables module configuration options
gilles-peskine-arm Jun 11, 2019
8ec70a1
Switch some tests to the veryfull config
gilles-peskine-arm Jun 11, 2019
a27a6f7
Remove obsolete options from config.pl
gilles-peskine-arm Jun 11, 2019
5823888
Document why configuration options are excluded from full
gilles-peskine-arm Jun 11, 2019
6a0668d
Remove redundant comment
gilles-peskine-arm Jun 11, 2019
fe00d0a
Don't uncomment MBEDTLS_SSL_CIPHERSUITES in veryfull config
gilles-peskine-arm Jun 11, 2019
bf8525e
config.pl full: enable MBEDTLS_PLATFORM_xxx_yyy_ALT too
gilles-peskine-arm Jun 11, 2019
e33c713
Remove mbedtls_param_failed from programs
gilles-peskine-arm Jun 12, 2019
9d79d83
Move MBEDTLS_PARAM_FAILED to the "System support" section
gilles-peskine-arm Jun 12, 2019
83c1121
Add all.sh component that exercises invalid_param checks
gilles-peskine-arm Jun 12, 2019
84847d5
Macros with arguments aren't features
gilles-peskine-arm Jun 12, 2019
e902502
Update crypto submodule on the precursor branch
gilles-peskine-arm Jun 12, 2019
4e84309
config.pl full: Exclude MBEDTLS_ENTROPY_FORCE_SHA256
gilles-peskine-arm Jun 12, 2019
24ecfba
all.sh: Test MBEDTLS_ENTROPY_FORCE_SHA256
gilles-peskine-arm Jun 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions tests/suites/test_suite_x509write.function
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,29 @@ static int x509_crt_verifycsr( const unsigned char *buf, size_t buflen )
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
const mbedtls_md_info_t *md_info;
mbedtls_x509_csr csr;
int ret;

mbedtls_x509_csr_init( &csr );
Patater marked this conversation as resolved.
Show resolved Hide resolved

if( mbedtls_x509_csr_parse( &csr, buf, buflen ) != 0 )
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
ret = mbedtls_x509_csr_parse( &csr, buf, buflen );
if( ret != 0 )
goto exit;

md_info = mbedtls_md_info_from_type( csr.sig_md );
if( mbedtls_md( md_info, csr.cri.p, csr.cri.len, hash ) != 0 )
{
/* Note: this can't happen except after an internal error */
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
ret = MBEDTLS_ERR_X509_BAD_INPUT_DATA;
Patater marked this conversation as resolved.
Show resolved Hide resolved
goto exit;
}

if( mbedtls_pk_verify_ext( csr.sig_pk, csr.sig_opts, &csr.pk,
csr.sig_md, hash, mbedtls_md_get_size( md_info ),
csr.sig.p, csr.sig.len ) != 0 )
{
return( MBEDTLS_ERR_X509_CERT_VERIFY_FAILED );
}
ret = mbedtls_pk_verify_ext( csr.sig_pk, csr.sig_opts, &csr.pk,
csr.sig_md, hash, mbedtls_md_get_size( md_info ),
csr.sig.p, csr.sig.len );
Patater marked this conversation as resolved.
Show resolved Hide resolved

return( 0 );
exit:
mbedtls_x509_csr_free( &csr );
return( ret );
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */

Expand Down