Lines Matching full:length

18 static void asn1_put_length(unsigned char **pp, int length);
23 * If there is 0 or 1 byte left, the length check should pick things up in _asn1_check_infinite_end()
110 * Decode a length field.
111 * The short form is a single byte defining a length 0 - 127.
113 * the number of following octets that contain the length. These octets
158 * constructed == 2 for indefinite length constructed
160 void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, in ASN1_put_object() argument
186 asn1_put_length(&p, length); in ASN1_put_object()
200 static void asn1_put_length(unsigned char **pp, int length) in asn1_put_length() argument
205 if (length <= 127) { in asn1_put_length()
206 *(p++) = (unsigned char)length; in asn1_put_length()
208 len = length; in asn1_put_length()
214 p[i] = length & 0xff; in asn1_put_length()
215 length >>= 8; in asn1_put_length()
222 int ASN1_object_size(int constructed, int length, int tag) in ASN1_object_size() argument
226 if (length < 0) in ASN1_object_size()
238 if (length > 127) { in ASN1_object_size()
239 int tmplen = length; in ASN1_object_size()
246 if (ret >= INT_MAX - length) in ASN1_object_size()
248 return ret + length; in ASN1_object_size()
256 if (!ASN1_STRING_set(dst, str->data, str->length)) in ASN1_STRING_copy()
294 * Verify that the length fits within an integer for assignment to in ASN1_STRING_set()
295 * str->length below. The additional 1 is subtracted to allow for the in ASN1_STRING_set()
302 if ((size_t)str->length <= len || str->data == NULL) { in ASN1_STRING_set()
316 str->length = len; in ASN1_STRING_set()
338 str->length = len; in ASN1_STRING_set0()
381 OPENSSL_cleanse(a->data, a->length); in ASN1_STRING_clear_free()
389 i = (a->length - b->length); in ASN1_STRING_cmp()
391 if (a->length != 0) in ASN1_STRING_cmp()
392 i = memcmp(a->data, b->data, a->length); in ASN1_STRING_cmp()
404 return x->length; in ASN1_STRING_length()
410 x->length = len; in ASN1_STRING_length_set()
437 size_t length = 0, sep_len; in ossl_sk_ASN1_UTF8STRING2text() local
448 length += sep_len; in ossl_sk_ASN1_UTF8STRING2text()
449 length += ASN1_STRING_length(current); in ossl_sk_ASN1_UTF8STRING2text()
450 if (max_len != 0 && length > max_len) in ossl_sk_ASN1_UTF8STRING2text()
453 if ((result = OPENSSL_malloc(length + 1)) == NULL) in ossl_sk_ASN1_UTF8STRING2text()
459 length = ASN1_STRING_length(current); in ossl_sk_ASN1_UTF8STRING2text()
464 strncpy(p, (const char *)ASN1_STRING_get0_data(current), length); in ossl_sk_ASN1_UTF8STRING2text()
465 p += length; in ossl_sk_ASN1_UTF8STRING2text()