Lines Matching refs:len

214     size_t len;  in x509_get_version()  local
216 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_version()
228 end = *p + len; in x509_get_version()
251 size_t len; in x509_get_dates() local
253 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_dates()
257 end = *p + len; in x509_get_dates()
286 if( ( ret = mbedtls_asn1_get_tag( p, end, &uid->len, in x509_get_uid()
296 *p += uid->len; in x509_get_uid()
307 size_t len; in x509_get_basic_constraints() local
317 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_basic_constraints()
361 if( bs.len != 1 ) in x509_get_ns_cert_type()
381 if( bs.len < 1 ) in x509_get_key_usage()
387 for( i = 0; i < bs.len && i < sizeof( unsigned int ); i++ ) in x509_get_key_usage()
448 size_t len, tag_len; in x509_get_subject_alt_name() local
454 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_subject_alt_name()
458 if( *p + len != end ) in x509_get_subject_alt_name()
502 buf->len = tag_len; in x509_get_subject_alt_name()
503 *p += buf->len; in x509_get_subject_alt_name()
525 size_t len; in x509_get_crt_ext() local
548 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crt_ext()
552 end_ext_data = *p + len; in x509_get_crt_ext()
557 if( ( ret = mbedtls_asn1_get_tag( p, end, &extn_oid.len, MBEDTLS_ASN1_OID ) ) != 0 ) in x509_get_crt_ext()
561 *p += extn_oid.len; in x509_get_crt_ext()
573 if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &len, in x509_get_crt_ext()
577 end_ext_octet = *p + len; in x509_get_crt_ext()
666 size_t len; in x509_crt_parse_der_core() local
682 len = buflen; in x509_crt_parse_der_core()
683 end = p + len; in x509_crt_parse_der_core()
691 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in x509_crt_parse_der_core()
698 if( len > (size_t) ( end - p ) ) in x509_crt_parse_der_core()
704 crt_end = p + len; in x509_crt_parse_der_core()
707 crt->raw.len = crt_end - buf; in x509_crt_parse_der_core()
708 crt->raw.p = p = mbedtls_calloc( 1, crt->raw.len ); in x509_crt_parse_der_core()
712 memcpy( p, buf, crt->raw.len ); in x509_crt_parse_der_core()
715 p += crt->raw.len - len; in x509_crt_parse_der_core()
716 end = crt_end = p + len; in x509_crt_parse_der_core()
723 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in x509_crt_parse_der_core()
730 end = p + len; in x509_crt_parse_der_core()
731 crt->tbs.len = end - crt->tbs.p; in x509_crt_parse_der_core()
770 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in x509_crt_parse_der_core()
777 if( ( ret = mbedtls_x509_get_name( &p, p + len, &crt->issuer ) ) != 0 ) in x509_crt_parse_der_core()
783 crt->issuer_raw.len = p - crt->issuer_raw.p; in x509_crt_parse_der_core()
803 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in x509_crt_parse_der_core()
810 if( len && ( ret = mbedtls_x509_get_name( &p, p + len, &crt->subject ) ) != 0 ) in x509_crt_parse_der_core()
816 crt->subject_raw.len = p - crt->subject_raw.p; in x509_crt_parse_der_core()
889 if( crt->sig_oid.len != sig_oid2.len || in x509_crt_parse_der_core()
890 memcmp( crt->sig_oid.p, sig_oid2.p, crt->sig_oid.len ) != 0 || in x509_crt_parse_der_core()
891 sig_params1.len != sig_params2.len || in x509_crt_parse_der_core()
892 ( sig_params1.len != 0 && in x509_crt_parse_der_core()
893 memcmp( sig_params1.p, sig_params2.p, sig_params1.len ) != 0 ) ) in x509_crt_parse_der_core()
1110 size_t len = strlen( path ); in mbedtls_x509_crt_parse_path() local
1115 if( len > MAX_PATH - 3 ) in mbedtls_x509_crt_parse_path()
1120 memcpy( filename, path, len ); in mbedtls_x509_crt_parse_path()
1121 filename[len++] = '\\'; in mbedtls_x509_crt_parse_path()
1122 p = filename + len; in mbedtls_x509_crt_parse_path()
1123 filename[len++] = '*'; in mbedtls_x509_crt_parse_path()
1125 w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, in mbedtls_x509_crt_parse_path()
1134 len = MAX_PATH - len; in mbedtls_x509_crt_parse_path()
1137 memset( p, 0, len ); in mbedtls_x509_crt_parse_path()
1144 p, (int) len - 1, in mbedtls_x509_crt_parse_path()
1234 if( cur->buf.len + sep_len >= n ) in x509_info_subject_alt_name()
1240 n -= cur->buf.len + sep_len; in x509_info_subject_alt_name()
1243 for( i = 0; i < cur->buf.len; i++ ) in x509_info_subject_alt_name()
1588 if( cur_oid->len == usage_len && in mbedtls_x509_crt_check_extended_key_usage()
1610 while( cur != NULL && cur->serial.len != 0 ) in mbedtls_x509_crt_is_revoked()
1612 if( crt->serial.len == cur->serial.len && in mbedtls_x509_crt_is_revoked()
1613 memcmp( crt->serial.p, cur->serial.p, crt->serial.len ) == 0 ) in mbedtls_x509_crt_is_revoked()
1643 crl_list->issuer_raw.len != ca->subject_raw.len || in x509_crt_verifycrl()
1645 crl_list->issuer_raw.len ) != 0 ) in x509_crt_verifycrl()
1681 mbedtls_md( md_info, crl_list->tbs.p, crl_list->tbs.len, hash ); in x509_crt_verifycrl()
1688 crl_list->sig.p, crl_list->sig.len ) != 0 ) in x509_crt_verifycrl()
1722 static int x509_memcasecmp( const void *s1, const void *s2, size_t len ) in x509_memcasecmp() argument
1728 for( i = 0; i < len; i++ ) in x509_memcasecmp()
1756 if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' ) in x509_check_wildcard()
1771 if( cn_len - cn_idx == name->len - 1 && in x509_check_wildcard()
1772 x509_memcasecmp( name->p + 1, cn + cn_idx, name->len - 1 ) == 0 ) in x509_check_wildcard()
1789 a->len == b->len && in x509_string_cmp()
1790 memcmp( a->p, b->p, b->len ) == 0 ) in x509_string_cmp()
1797 a->len == b->len && in x509_string_cmp()
1798 x509_memcasecmp( a->p, b->p, b->len ) == 0 ) in x509_string_cmp()
1826 a->oid.len != b->oid.len || in x509_name_cmp()
1827 memcmp( a->oid.p, b->oid.p, b->oid.len ) != 0 ) in x509_name_cmp()
1874 child->raw.len == parent->raw.len && in x509_crt_check_parent()
1875 memcmp( child->raw.p, parent->raw.p, child->raw.len ) == 0 ) in x509_crt_check_parent()
1934 mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ); in x509_crt_verify_top()
1947 if( child->subject_raw.len == trust_ca->subject_raw.len && in x509_crt_verify_top()
1949 child->issuer_raw.len ) == 0 ) in x509_crt_verify_top()
1973 child->sig.p, child->sig.len ) != 0 ) in x509_crt_verify_top()
1995 ( child->subject_raw.len != trust_ca->subject_raw.len || in x509_crt_verify_top()
1997 child->issuer_raw.len ) != 0 ) ) in x509_crt_verify_top()
2075 mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ); in x509_crt_verify_child()
2082 child->sig.p, child->sig.len ) != 0 ) in x509_crt_verify_child()
2210 if( cur->buf.len == cn_len && in mbedtls_x509_crt_verify_with_profile()
2214 if( cur->buf.len > 2 && in mbedtls_x509_crt_verify_with_profile()
2233 if( name->val.len == cn_len && in mbedtls_x509_crt_verify_with_profile()
2237 if( name->val.len > 2 && in mbedtls_x509_crt_verify_with_profile()
2373 mbedtls_zeroize( cert_cur->raw.p, cert_cur->raw.len ); in mbedtls_x509_crt_free()