Lines Matching refs:crl
262 mbedtls_x509_crl *crl = chain; in mbedtls_x509_crl_parse_der() local
267 if( crl == NULL || buf == NULL ) in mbedtls_x509_crl_parse_der()
277 while( crl->version != 0 && crl->next != NULL ) in mbedtls_x509_crl_parse_der()
278 crl = crl->next; in mbedtls_x509_crl_parse_der()
280 if( crl->version != 0 && crl->next == NULL ) in mbedtls_x509_crl_parse_der()
282 crl->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl ) ); in mbedtls_x509_crl_parse_der()
284 if( crl->next == NULL ) in mbedtls_x509_crl_parse_der()
286 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
290 mbedtls_x509_crl_init( crl->next ); in mbedtls_x509_crl_parse_der()
291 crl = crl->next; in mbedtls_x509_crl_parse_der()
302 crl->raw.p = p; in mbedtls_x509_crl_parse_der()
303 crl->raw.len = buflen; in mbedtls_x509_crl_parse_der()
316 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
322 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
330 crl->tbs.p = p; in mbedtls_x509_crl_parse_der()
335 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
340 crl->tbs.len = end - crl->tbs.p; in mbedtls_x509_crl_parse_der()
348 if( ( ret = x509_crl_get_version( &p, end, &crl->version ) ) != 0 || in mbedtls_x509_crl_parse_der()
349 ( ret = mbedtls_x509_get_alg( &p, end, &crl->sig_oid, &sig_params1 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
351 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
355 crl->version++; in mbedtls_x509_crl_parse_der()
357 if( crl->version > 2 ) in mbedtls_x509_crl_parse_der()
359 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
363 if( ( ret = mbedtls_x509_get_sig_alg( &crl->sig_oid, &sig_params1, in mbedtls_x509_crl_parse_der()
364 &crl->sig_md, &crl->sig_pk, in mbedtls_x509_crl_parse_der()
365 &crl->sig_opts ) ) != 0 ) in mbedtls_x509_crl_parse_der()
367 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
374 crl->issuer_raw.p = p; in mbedtls_x509_crl_parse_der()
379 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
383 if( ( ret = mbedtls_x509_get_name( &p, p + len, &crl->issuer ) ) != 0 ) in mbedtls_x509_crl_parse_der()
385 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
389 crl->issuer_raw.len = p - crl->issuer_raw.p; in mbedtls_x509_crl_parse_der()
395 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->this_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
397 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
401 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->next_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
408 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
421 if( ( ret = x509_get_entries( &p, end, &crl->entry ) ) != 0 ) in mbedtls_x509_crl_parse_der()
423 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
431 if( crl->version == 2 ) in mbedtls_x509_crl_parse_der()
433 ret = x509_get_crl_ext( &p, end, &crl->crl_ext ); in mbedtls_x509_crl_parse_der()
437 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
444 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
449 end = crl->raw.p + crl->raw.len; in mbedtls_x509_crl_parse_der()
457 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
461 if( crl->sig_oid.len != sig_oid2.len || in mbedtls_x509_crl_parse_der()
462 memcmp( crl->sig_oid.p, sig_oid2.p, crl->sig_oid.len ) != 0 || in mbedtls_x509_crl_parse_der()
467 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
471 if( ( ret = mbedtls_x509_get_sig( &p, end, &crl->sig ) ) != 0 ) in mbedtls_x509_crl_parse_der()
473 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
479 mbedtls_x509_crl_free( crl ); in mbedtls_x509_crl_parse_der()
581 const mbedtls_x509_crl *crl ) in mbedtls_x509_crl_info() argument
592 prefix, crl->version ); in mbedtls_x509_crl_info()
597 ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); in mbedtls_x509_crl_info()
602 crl->this_update.year, crl->this_update.mon, in mbedtls_x509_crl_info()
603 crl->this_update.day, crl->this_update.hour, in mbedtls_x509_crl_info()
604 crl->this_update.min, crl->this_update.sec ); in mbedtls_x509_crl_info()
609 crl->next_update.year, crl->next_update.mon, in mbedtls_x509_crl_info()
610 crl->next_update.day, crl->next_update.hour, in mbedtls_x509_crl_info()
611 crl->next_update.min, crl->next_update.sec ); in mbedtls_x509_crl_info()
614 entry = &crl->entry; in mbedtls_x509_crl_info()
642 ret = mbedtls_x509_sig_alg_gets( p, n, &crl->sig_oid, crl->sig_pk, crl->sig_md, in mbedtls_x509_crl_info()
643 crl->sig_opts ); in mbedtls_x509_crl_info()
655 void mbedtls_x509_crl_init( mbedtls_x509_crl *crl ) in mbedtls_x509_crl_init() argument
657 memset( crl, 0, sizeof(mbedtls_x509_crl) ); in mbedtls_x509_crl_init()
663 void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) in mbedtls_x509_crl_free() argument
665 mbedtls_x509_crl *crl_cur = crl; in mbedtls_x509_crl_free()
672 if( crl == NULL ) in mbedtls_x509_crl_free()
709 crl_cur = crl; in mbedtls_x509_crl_free()
716 if( crl_prv != crl ) in mbedtls_x509_crl_free()