mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 21:39:54 +00:00
Fix structures initialized too late in tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
2336555444
commit
391005cb3b
@ -54,11 +54,11 @@ void pkcs7_verify( char *pkcs7_file, char *crt, char *filetobesigned, int do_has
|
||||
mbedtls_pkcs7 pkcs7;
|
||||
mbedtls_x509_crt x509;
|
||||
|
||||
USE_PSA_INIT();
|
||||
|
||||
mbedtls_pkcs7_init( &pkcs7 );
|
||||
mbedtls_x509_crt_init( &x509 );
|
||||
|
||||
USE_PSA_INIT();
|
||||
|
||||
res = mbedtls_x509_crt_parse_file( &x509, crt );
|
||||
TEST_EQUAL( res, 0 );
|
||||
|
||||
@ -127,12 +127,12 @@ void pkcs7_verify_multiple_signers( char *pkcs7_file, char *crt1, char *crt2, ch
|
||||
mbedtls_x509_crt x509_1;
|
||||
mbedtls_x509_crt x509_2;
|
||||
|
||||
USE_PSA_INIT();
|
||||
|
||||
mbedtls_pkcs7_init( &pkcs7 );
|
||||
mbedtls_x509_crt_init( &x509_1 );
|
||||
mbedtls_x509_crt_init( &x509_2 );
|
||||
|
||||
USE_PSA_INIT();
|
||||
|
||||
res = mbedtls_pk_load_file( pkcs7_file, &pkcs7_buf, &buflen );
|
||||
TEST_EQUAL( res, 0 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user