Lines Matching refs:crt
210 mbedtls_x509write_cert crt;
227 mbedtls_x509write_crt_init( &crt );
254 mbedtls_x509write_crt_set_version( &crt, ver );
256 TEST_ASSERT( mbedtls_x509write_crt_set_serial( &crt, &serial ) == 0 );
257 TEST_ASSERT( mbedtls_x509write_crt_set_validity( &crt, not_before,
259 mbedtls_x509write_crt_set_md_alg( &crt, md_type );
260 TEST_ASSERT( mbedtls_x509write_crt_set_issuer_name( &crt, issuer_name ) == 0 );
261 TEST_ASSERT( mbedtls_x509write_crt_set_subject_name( &crt, subject_name ) == 0 );
262 mbedtls_x509write_crt_set_subject_key( &crt, &subject_key );
264 mbedtls_x509write_crt_set_issuer_key( &crt, key );
266 if( crt.version >= MBEDTLS_X509_CRT_VERSION_3 )
269 TEST_ASSERT( mbedtls_x509write_crt_set_basic_constraints( &crt, is_ca,
271 TEST_ASSERT( mbedtls_x509write_crt_set_subject_key_identifier( &crt ) == 0 );
273 TEST_ASSERT( mbedtls_x509write_crt_set_authority_key_identifier( &crt ) == 0 );
275 TEST_ASSERT( mbedtls_x509write_crt_set_key_usage( &crt, key_usage ) == 0 );
277 TEST_ASSERT( mbedtls_x509write_crt_set_ns_cert_type( &crt, cert_type ) == 0 );
280 ret = mbedtls_x509write_crt_pem( &crt, buf, sizeof( buf ),
301 der_len = mbedtls_x509write_crt_der( &crt, buf, sizeof( buf ),
309 ret = mbedtls_x509write_crt_der( &crt, buf, (size_t)( der_len - 1 ),
314 mbedtls_x509write_crt_free( &crt );