Lines Matching refs:len

16 static int traverse_string(const unsigned char *p, int len, int inform,
36 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, in ASN1_mbstring_copy() argument
39 return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0); in ASN1_mbstring_copy()
42 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, in ASN1_mbstring_ncopy() argument
54 if (len == -1) in ASN1_mbstring_ncopy()
55 len = strlen((const char *)in); in ASN1_mbstring_ncopy()
58 if (len < 0) in ASN1_mbstring_ncopy()
65 if (len & 1) { in ASN1_mbstring_ncopy()
69 nchar = len >> 1; in ASN1_mbstring_ncopy()
73 if (len & 3) { in ASN1_mbstring_ncopy()
77 nchar = len >> 2; in ASN1_mbstring_ncopy()
83 ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar); in ASN1_mbstring_ncopy()
91 nchar = len; in ASN1_mbstring_ncopy()
112 if (traverse_string(in, len, inform, type_str, &mask) < 0) { in ASN1_mbstring_ncopy()
155 if (!ASN1_STRING_set(dest, in, len)) { in ASN1_mbstring_ncopy()
185 traverse_string(in, len, inform, out_utf8, &outlen); in ASN1_mbstring_ncopy()
199 traverse_string(in, len, inform, cpyfunc, &p); in ASN1_mbstring_ncopy()
208 static int traverse_string(const unsigned char *p, int len, int inform, in traverse_string() argument
214 while (len) { in traverse_string()
217 len--; in traverse_string()
221 len -= 2; in traverse_string()
227 len -= 4; in traverse_string()
229 ret = UTF8_getc(p, len, &value); in traverse_string()
232 len -= ret; in traverse_string()
263 int *outlen, len; in out_utf8() local
265 len = UTF8_putc(NULL, -1, value); in out_utf8()
266 if (len <= 0) in out_utf8()
267 return len; in out_utf8()
269 *outlen += len; in out_utf8()