• Home
  • Raw
  • Download

Lines Matching refs:crt

61 int verify_none( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags )
64 ((void) crt);
71 int verify_all( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags )
74 ((void) crt);
146 int verify_fatal( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags )
150 ((void) crt);
205 int verify_print( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags )
216 ret = mbedtls_x509_serial_gets( p, n, &crt->serial );
222 ret = mbedtls_x509_dn_gets( p, n, &crt->subject );
306 int parse_crt_ext_cb( void *p_ctx, mbedtls_x509_crt const *crt, mbedtls_x509_buf const *oid,
309 ( void ) crt;
407 mbedtls_x509_crt crt;
414 mbedtls_x509_crt_init( &crt );
417 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
419 if( crt.ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME )
421 cur = &crt.subject_alt_names;
439 mbedtls_x509_crt_free( &crt );
446 mbedtls_x509_crt crt;
450 mbedtls_x509_crt_init( &crt );
453 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
454 res = mbedtls_x509_crt_info( buf, 2000, "", &crt );
462 mbedtls_x509_crt_free( &crt );
551 mbedtls_x509_crt crt;
566 mbedtls_x509_crt_init( &crt );
569 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
576 ret = mbedtls_x509_crt_verify_restartable( &crt, &ca, NULL,
588 ret = mbedtls_x509_crt_verify_restartable( &crt, &ca, NULL,
595 mbedtls_x509_crt_free( &crt );
606 mbedtls_x509_crt crt;
615 mbedtls_x509_crt_init( &crt );
646 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
650 …res = mbedtls_x509_crt_verify_with_profile( &crt, &ca, &crl, profile, cn_name, &flags, f_vrfy, NUL…
662 …res = mbedtls_x509_crt_verify_with_ca_cb( &crt, ca_callback, &ca, profile, cn_name, &flags, f_vrfy…
669 mbedtls_x509_crt_free( &crt );
681 mbedtls_x509_crt crt;
685 mbedtls_x509_crt_init( &crt );
688 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
694 ret = mbedtls_x509_crt_verify_with_ca_cb( &crt, ca_callback_fail, &ca,
701 mbedtls_x509_crt_free( &crt );
711 mbedtls_x509_crt crt;
716 mbedtls_x509_crt_init( &crt );
722 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
728 ret = mbedtls_x509_crt_verify_with_profile( &crt, &ca, NULL,
737 mbedtls_x509_crt_free( &crt );
746 mbedtls_x509_crt crt;
750 mbedtls_x509_crt_init( &crt );
753 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
755 res = mbedtls_x509_dn_gets( buf, 2000, &crt.subject );
757 res = mbedtls_x509_dn_gets( buf, 2000, &crt.issuer );
767 mbedtls_x509_crt_free( &crt );
774 mbedtls_x509_crt crt;
776 mbedtls_x509_crt_init( &crt );
778 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
781 TEST_ASSERT( mbedtls_x509_time_is_past( &crt.valid_from ) == result );
783 TEST_ASSERT( mbedtls_x509_time_is_past( &crt.valid_to ) == result );
788 mbedtls_x509_crt_free( &crt );
795 mbedtls_x509_crt crt;
797 mbedtls_x509_crt_init( &crt );
799 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
802 TEST_ASSERT( mbedtls_x509_time_is_future( &crt.valid_from ) == result );
804 TEST_ASSERT( mbedtls_x509_time_is_future( &crt.valid_to ) == result );
809 mbedtls_x509_crt_free( &crt );
816 mbedtls_x509_crt crt;
818 mbedtls_x509_crt_init( &crt );
820 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == result );
823 mbedtls_x509_crt_free( &crt );
830 mbedtls_x509_crt crt;
838 mbedtls_x509_crt_init( &crt );
840 TEST_ASSERT( mbedtls_x509_crt_parse_der( &crt, buf->x, buf->len ) == ( result ) );
844 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
853 mbedtls_x509_crt_free( &crt );
854 mbedtls_x509_crt_init( &crt );
856 TEST_ASSERT( mbedtls_x509_crt_parse_der_nocopy( &crt, buf->x, buf->len ) == ( result ) );
862 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
872 mbedtls_x509_crt_free( &crt );
873 mbedtls_x509_crt_init( &crt );
875 …TEST_ASSERT( mbedtls_x509_crt_parse_der_with_ext_cb( &crt, buf->x, buf->len, 0, NULL, NULL ) == ( …
879 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
889 mbedtls_x509_crt_free( &crt );
890 mbedtls_x509_crt_init( &crt );
892 …TEST_ASSERT( mbedtls_x509_crt_parse_der_with_ext_cb( &crt, buf->x, buf->len, 1, NULL, NULL ) == ( …
896 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
906 mbedtls_x509_crt_free( &crt );
913 mbedtls_x509_crt crt;
927 mbedtls_x509_crt_init( &crt );
929 …TEST_ASSERT( mbedtls_x509_crt_parse_der_with_ext_cb( &crt, buf->x, buf->len, 0, parse_crt_ext_cb, …
933 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
943 mbedtls_x509_crt_free( &crt );
944 mbedtls_x509_crt_init( &crt );
946 …TEST_ASSERT( mbedtls_x509_crt_parse_der_with_ext_cb( &crt, buf->x, buf->len, 1, parse_crt_ext_cb, …
950 res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt );
960 mbedtls_x509_crt_free( &crt );
1048 * We expect chain_dir to contain certificates 00.crt, 01.crt, etc.
1049 * with NN.crt signed by NN-1.crt
1179 mbedtls_x509_crt crt;
1181 mbedtls_x509_crt_init( &crt );
1183 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
1185 TEST_ASSERT( mbedtls_x509_crt_check_key_usage( &crt, usage ) == ret );
1188 mbedtls_x509_crt_free( &crt );
1196 mbedtls_x509_crt crt;
1198 mbedtls_x509_crt_init( &crt );
1201 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 );
1203 …TEST_ASSERT( mbedtls_x509_crt_check_extended_key_usage( &crt, (const char *)oid->x, oid->len ) == …
1206 mbedtls_x509_crt_free( &crt );