Lines Matching refs:ret

72     int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;  in x509_crl_get_version()  local
74 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_crl_get_version()
76 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_crl_get_version()
82 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_VERSION, ret ) ); in x509_crl_get_version()
99 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_crl_ext() local
108 if( ( ret = mbedtls_x509_get_ext( p, end, ext, 0 ) ) != 0 ) in x509_get_crl_ext()
109 return( ret ); in x509_get_crl_ext()
126 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_ext()
128 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_ext()
133 if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &len, in x509_get_crl_ext()
136 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_ext()
141 if( ( ret = mbedtls_asn1_get_bool( p, end_ext_data, in x509_get_crl_ext()
143 ( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) ) in x509_get_crl_ext()
145 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_ext()
149 if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &len, in x509_get_crl_ext()
151 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_ext()
179 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_crl_entry_ext() local
193 if( ( ret = mbedtls_asn1_get_tag( p, end, &ext->len, in x509_get_crl_entry_ext()
196 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_get_crl_entry_ext()
201 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_entry_ext()
212 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_entry_ext()
214 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret ) ); in x509_get_crl_entry_ext()
233 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_entries() local
240 if( ( ret = mbedtls_asn1_get_tag( p, end, &entry_len, in x509_get_entries()
243 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_get_entries()
246 return( ret ); in x509_get_entries()
257 if( ( ret = mbedtls_asn1_get_tag( p, end, &len2, in x509_get_entries()
260 return( ret ); in x509_get_entries()
267 if( ( ret = mbedtls_x509_get_serial( p, end2, &cur_entry->serial ) ) != 0 ) in x509_get_entries()
268 return( ret ); in x509_get_entries()
270 if( ( ret = mbedtls_x509_get_time( p, end2, in x509_get_entries()
272 return( ret ); in x509_get_entries()
274 if( ( ret = x509_get_crl_entry_ext( p, end2, in x509_get_entries()
276 return( ret ); in x509_get_entries()
298 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_crl_parse_der() local
357 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
376 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
380 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_FORMAT, ret ) ); in mbedtls_x509_crl_parse_der()
392 if( ( ret = x509_crl_get_version( &p, end, &crl->version ) ) != 0 || in mbedtls_x509_crl_parse_der()
393 ( ret = mbedtls_x509_get_alg( &p, end, &crl->sig_oid, &sig_params1 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
396 return( ret ); in mbedtls_x509_crl_parse_der()
407 if( ( ret = mbedtls_x509_get_sig_alg( &crl->sig_oid, &sig_params1, in mbedtls_x509_crl_parse_der()
420 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
424 return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_FORMAT, ret ) ); in mbedtls_x509_crl_parse_der()
427 if( ( ret = mbedtls_x509_get_name( &p, p + len, &crl->issuer ) ) != 0 ) in mbedtls_x509_crl_parse_der()
430 return( ret ); in mbedtls_x509_crl_parse_der()
439 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->this_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
442 return( ret ); in mbedtls_x509_crl_parse_der()
445 if( ( ret = mbedtls_x509_get_time( &p, end, &crl->next_update ) ) != 0 ) in mbedtls_x509_crl_parse_der()
447 if( ret != ( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_DATE, in mbedtls_x509_crl_parse_der()
449 ret != ( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_DATE, in mbedtls_x509_crl_parse_der()
453 return( ret ); in mbedtls_x509_crl_parse_der()
465 if( ( ret = x509_get_entries( &p, end, &crl->entry ) ) != 0 ) in mbedtls_x509_crl_parse_der()
468 return( ret ); in mbedtls_x509_crl_parse_der()
477 ret = x509_get_crl_ext( &p, end, &crl->crl_ext ); in mbedtls_x509_crl_parse_der()
479 if( ret != 0 ) in mbedtls_x509_crl_parse_der()
482 return( ret ); in mbedtls_x509_crl_parse_der()
499 if( ( ret = mbedtls_x509_get_alg( &p, end, &sig_oid2, &sig_params2 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
502 return( ret ); in mbedtls_x509_crl_parse_der()
515 if( ( ret = mbedtls_x509_get_sig( &p, end, &crl->sig ) ) != 0 ) in mbedtls_x509_crl_parse_der()
518 return( ret ); in mbedtls_x509_crl_parse_der()
537 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_crl_parse() local
552 ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; in mbedtls_x509_crl_parse()
554 ret = mbedtls_pem_read_buffer( &pem, in mbedtls_x509_crl_parse()
559 if( ret == 0 ) in mbedtls_x509_crl_parse()
569 if( ( ret = mbedtls_x509_crl_parse_der( chain, in mbedtls_x509_crl_parse()
573 return( ret ); in mbedtls_x509_crl_parse()
579 return( ret ); in mbedtls_x509_crl_parse()
601 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_crl_parse_file() local
605 if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) in mbedtls_x509_crl_parse_file()
606 return( ret ); in mbedtls_x509_crl_parse_file()
608 ret = mbedtls_x509_crl_parse( chain, buf, n ); in mbedtls_x509_crl_parse_file()
613 return( ret ); in mbedtls_x509_crl_parse_file()
628 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_crl_info() local
636 ret = mbedtls_snprintf( p, n, "%sCRL version : %d", in mbedtls_x509_crl_info()
640 ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); in mbedtls_x509_crl_info()
642 ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); in mbedtls_x509_crl_info()
645 ret = mbedtls_snprintf( p, n, "\n%sthis update : " \ in mbedtls_x509_crl_info()
652 ret = mbedtls_snprintf( p, n, "\n%snext update : " \ in mbedtls_x509_crl_info()
661 ret = mbedtls_snprintf( p, n, "\n%sRevoked certificates:", in mbedtls_x509_crl_info()
667 ret = mbedtls_snprintf( p, n, "\n%sserial number: ", in mbedtls_x509_crl_info()
671 ret = mbedtls_x509_serial_gets( p, n, &entry->serial ); in mbedtls_x509_crl_info()
674 ret = mbedtls_snprintf( p, n, " revocation date: " \ in mbedtls_x509_crl_info()
684 ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); in mbedtls_x509_crl_info()
687 ret = mbedtls_x509_sig_alg_gets( p, n, &crl->sig_oid, crl->sig_pk, crl->sig_md, in mbedtls_x509_crl_info()
691 ret = mbedtls_snprintf( p, n, "\n" ); in mbedtls_x509_crl_info()