Lines Matching refs:ret

75     int ret;  in x509_csr_get_version()  local
77 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_csr_get_version()
79 if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) in x509_csr_get_version()
85 return( MBEDTLS_ERR_X509_INVALID_VERSION + ret ); in x509_csr_get_version()
97 int ret; in mbedtls_x509_csr_parse_der() local
133 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_csr_parse_der()
152 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_csr_parse_der()
156 return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); in mbedtls_x509_csr_parse_der()
165 if( ( ret = x509_csr_get_version( &p, end, &csr->version ) ) != 0 ) in mbedtls_x509_csr_parse_der()
168 return( ret ); in mbedtls_x509_csr_parse_der()
184 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_csr_parse_der()
188 return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); in mbedtls_x509_csr_parse_der()
191 if( ( ret = mbedtls_x509_get_name( &p, p + len, &csr->subject ) ) != 0 ) in mbedtls_x509_csr_parse_der()
194 return( ret ); in mbedtls_x509_csr_parse_der()
202 if( ( ret = mbedtls_pk_parse_subpubkey( &p, end, &csr->pk ) ) != 0 ) in mbedtls_x509_csr_parse_der()
205 return( ret ); in mbedtls_x509_csr_parse_der()
218 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_csr_parse_der()
222 return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); in mbedtls_x509_csr_parse_der()
233 if( ( ret = mbedtls_x509_get_alg( &p, end, &csr->sig_oid, &sig_params ) ) != 0 ) in mbedtls_x509_csr_parse_der()
236 return( ret ); in mbedtls_x509_csr_parse_der()
239 if( ( ret = mbedtls_x509_get_sig_alg( &csr->sig_oid, &sig_params, in mbedtls_x509_csr_parse_der()
247 if( ( ret = mbedtls_x509_get_sig( &p, end, &csr->sig ) ) != 0 ) in mbedtls_x509_csr_parse_der()
250 return( ret ); in mbedtls_x509_csr_parse_der()
268 int ret; in mbedtls_x509_csr_parse() local
285 ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; in mbedtls_x509_csr_parse()
287 ret = mbedtls_pem_read_buffer( &pem, in mbedtls_x509_csr_parse()
292 if( ret == 0 ) in mbedtls_x509_csr_parse()
297 if( ( ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen ) ) != 0 ) in mbedtls_x509_csr_parse()
298 return( ret ); in mbedtls_x509_csr_parse()
303 else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) in mbedtls_x509_csr_parse()
306 return( ret ); in mbedtls_x509_csr_parse()
319 int ret; in mbedtls_x509_csr_parse_file() local
323 if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) in mbedtls_x509_csr_parse_file()
324 return( ret ); in mbedtls_x509_csr_parse_file()
326 ret = mbedtls_x509_csr_parse( csr, buf, n ); in mbedtls_x509_csr_parse_file()
331 return( ret ); in mbedtls_x509_csr_parse_file()
343 int ret; in mbedtls_x509_csr_info() local
351 ret = mbedtls_snprintf( p, n, "%sCSR version : %d", in mbedtls_x509_csr_info()
355 ret = mbedtls_snprintf( p, n, "\n%ssubject name : ", prefix ); in mbedtls_x509_csr_info()
357 ret = mbedtls_x509_dn_gets( p, n, &csr->subject ); in mbedtls_x509_csr_info()
360 ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); in mbedtls_x509_csr_info()
363 ret = mbedtls_x509_sig_alg_gets( p, n, &csr->sig_oid, csr->sig_pk, csr->sig_md, in mbedtls_x509_csr_info()
367 if( ( ret = mbedtls_x509_key_size_helper( key_size_str, BEFORE_COLON, in mbedtls_x509_csr_info()
370 return( ret ); in mbedtls_x509_csr_info()
373 ret = mbedtls_snprintf( p, n, "\n%s%-" BC "s: %d bits\n", prefix, key_size_str, in mbedtls_x509_csr_info()