Lines Matching refs:ret

81     int ret;  in x509_crl_get_version()  local
83 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_crl_get_version()
85 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_crl_get_version()
91 return( MBEDTLS_ERR_X509_INVALID_VERSION + ret ); in x509_crl_get_version()
104 int ret; in x509_get_crl_ext() local
108 if( ( ret = mbedtls_x509_get_ext( p, end, ext, 0) ) != 0 ) in x509_get_crl_ext()
110 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_get_crl_ext()
113 return( ret ); in x509_get_crl_ext()
118 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_ext()
120 return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); in x509_get_crl_ext()
139 int ret; in x509_get_crl_entry_ext() local
153 if( ( ret = mbedtls_asn1_get_tag( p, end, &ext->len, in x509_get_crl_entry_ext()
156 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_get_crl_entry_ext()
161 return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); in x509_get_crl_entry_ext()
172 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_entry_ext()
174 return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); in x509_get_crl_entry_ext()
193 int ret; in x509_get_entries() local
200 if( ( ret = mbedtls_asn1_get_tag( p, end, &entry_len, in x509_get_entries()
203 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_get_entries()
206 return( ret ); in x509_get_entries()
216 if( ( ret = mbedtls_asn1_get_tag( p, end, &len2, in x509_get_entries()
219 return( ret ); in x509_get_entries()
227 if( ( ret = mbedtls_x509_get_serial( p, end2, &cur_entry->serial ) ) != 0 ) in x509_get_entries()
228 return( ret ); in x509_get_entries()
230 if( ( ret = mbedtls_x509_get_time( p, end2, in x509_get_entries()
232 return( ret ); in x509_get_entries()
234 if( ( ret = x509_get_crl_entry_ext( p, end2, in x509_get_entries()
236 return( ret ); in x509_get_entries()
258 int ret; in mbedtls_x509_crl_parse_der() local
313 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
332 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
336 return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); 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()
352 return( ret ); 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()
376 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_crl_parse_der()
380 return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); 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()
386 return( ret ); 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()
398 return( ret ); 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()
403 if( ret != ( MBEDTLS_ERR_X509_INVALID_DATE + in mbedtls_x509_crl_parse_der()
405 ret != ( MBEDTLS_ERR_X509_INVALID_DATE + in mbedtls_x509_crl_parse_der()
409 return( ret ); in mbedtls_x509_crl_parse_der()
421 if( ( ret = x509_get_entries( &p, end, &crl->entry ) ) != 0 ) in mbedtls_x509_crl_parse_der()
424 return( ret ); in mbedtls_x509_crl_parse_der()
433 ret = x509_get_crl_ext( &p, end, &crl->crl_ext ); in mbedtls_x509_crl_parse_der()
435 if( ret != 0 ) in mbedtls_x509_crl_parse_der()
438 return( ret ); in mbedtls_x509_crl_parse_der()
455 if( ( ret = mbedtls_x509_get_alg( &p, end, &sig_oid2, &sig_params2 ) ) != 0 ) in mbedtls_x509_crl_parse_der()
458 return( ret ); in mbedtls_x509_crl_parse_der()
471 if( ( ret = mbedtls_x509_get_sig( &p, end, &crl->sig ) ) != 0 ) in mbedtls_x509_crl_parse_der()
474 return( ret ); in mbedtls_x509_crl_parse_der()
493 int ret; in mbedtls_x509_crl_parse() local
508 ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; in mbedtls_x509_crl_parse()
510 ret = mbedtls_pem_read_buffer( &pem, in mbedtls_x509_crl_parse()
515 if( ret == 0 ) in mbedtls_x509_crl_parse()
525 if( ( ret = mbedtls_x509_crl_parse_der( chain, in mbedtls_x509_crl_parse()
528 return( ret ); in mbedtls_x509_crl_parse()
533 else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) in mbedtls_x509_crl_parse()
536 return( ret ); in mbedtls_x509_crl_parse()
556 int ret; in mbedtls_x509_crl_parse_file() local
560 if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) in mbedtls_x509_crl_parse_file()
561 return( ret ); in mbedtls_x509_crl_parse_file()
563 ret = mbedtls_x509_crl_parse( chain, buf, n ); in mbedtls_x509_crl_parse_file()
568 return( ret ); in mbedtls_x509_crl_parse_file()
583 int ret; in mbedtls_x509_crl_info() local
591 ret = mbedtls_snprintf( p, n, "%sCRL version : %d", in mbedtls_x509_crl_info()
595 ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); in mbedtls_x509_crl_info()
597 ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); in mbedtls_x509_crl_info()
600 ret = mbedtls_snprintf( p, n, "\n%sthis update : " \ in mbedtls_x509_crl_info()
607 ret = mbedtls_snprintf( p, n, "\n%snext update : " \ in mbedtls_x509_crl_info()
616 ret = mbedtls_snprintf( p, n, "\n%sRevoked certificates:", in mbedtls_x509_crl_info()
622 ret = mbedtls_snprintf( p, n, "\n%sserial number: ", in mbedtls_x509_crl_info()
626 ret = mbedtls_x509_serial_gets( p, n, &entry->serial ); in mbedtls_x509_crl_info()
629 ret = mbedtls_snprintf( p, n, " revocation date: " \ in mbedtls_x509_crl_info()
639 ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); 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()
646 ret = mbedtls_snprintf( p, n, "\n" ); in mbedtls_x509_crl_info()