Fix minor compile errors

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2022-07-27 14:34:58 +01:00
parent abdb0df91d
commit ec9f6b4de1
2 changed files with 3 additions and 2 deletions

View file

@ -816,7 +816,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
mbedtls_strerror( ret, buf, 1024 );
mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_ext_key_usage returned -0x%02x - %s\n\n", -ret, buf );
mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_ext_key_usage returned -0x%02x - %s\n\n", (unsigned int) -ret, buf );
goto exit;
}

View file

@ -349,7 +349,8 @@ void x509_crt_check( char *subject_key_file, char *subject_pwd,
TEST_ASSERT( mbedtls_x509write_crt_set_ns_cert_type( &crt, cert_type ) == 0 );
if( strcmp( ext_key_usage, "NULL" ) != 0 )
{
mbedtls_asn1_sequence exts[2] = { };
mbedtls_asn1_sequence exts[2];
memset(exts, 0, sizeof(exts));
#define SET_OID(x, oid) \
do { x.len = MBEDTLS_OID_SIZE(oid); x.p = (unsigned char*)oid; \
x.tag = MBEDTLS_ASN1_OID; } while( 0 )