Lines Matching refs:crt
156 int write_certificate( mbedtls_x509write_cert *crt, const char *output_file, in write_certificate() argument
166 if( ( ret = mbedtls_x509write_crt_pem( crt, output_buf, 4096, f_rng, p_rng ) ) < 0 ) in write_certificate()
200 mbedtls_x509write_cert crt; in main() local
209 mbedtls_x509write_crt_init( &crt ); in main()
210 mbedtls_x509write_crt_set_md_alg( &crt, MBEDTLS_MD_SHA256 ); in main()
520 mbedtls_x509write_crt_set_subject_key( &crt, subject_key ); in main()
521 mbedtls_x509write_crt_set_issuer_key( &crt, issuer_key ); in main()
526 if( ( ret = mbedtls_x509write_crt_set_subject_name( &crt, opt.subject_name ) ) != 0 ) in main()
533 if( ( ret = mbedtls_x509write_crt_set_issuer_name( &crt, opt.issuer_name ) ) != 0 ) in main()
543 ret = mbedtls_x509write_crt_set_serial( &crt, &serial ); in main()
551 ret = mbedtls_x509write_crt_set_validity( &crt, opt.not_before, opt.not_after ); in main()
564 ret = mbedtls_x509write_crt_set_basic_constraints( &crt, opt.is_ca, in main()
579 ret = mbedtls_x509write_crt_set_subject_key_identifier( &crt ); in main()
592 ret = mbedtls_x509write_crt_set_authority_key_identifier( &crt ); in main()
608 ret = mbedtls_x509write_crt_set_key_usage( &crt, opt.key_usage ); in main()
624 ret = mbedtls_x509write_crt_set_ns_cert_type( &crt, opt.ns_cert_type ); in main()
641 if( ( ret = write_certificate( &crt, opt.output_file, in main()
652 mbedtls_x509write_crt_free( &crt ); in main()