Lines Matching refs:length

47  * length, decode the length updating the buffer to point to the character
49 * bytes that made up the DER encoding of the length originally pointed to
57 int length, new_length;
67 * If the High order bit is not set then the length is just the value
72 return (*p); /* return the length */
77 * the number of bytes that contain the DER encoding of the length.
83 /* See if the supplied buffer contains enough bytes for the length. */
88 * Calculate a multibyte length. The length is encoded as an
91 for (length = 0; octets; octets--) {
92 new_length = (length << 8) + *p++;
93 if (new_length < length) /* overflow */
95 length = new_length;
100 return (length);
104 * der_length_size: Return the number of bytes to encode a given length.
122 * put_der_length: Encode the supplied length into the buffer pointed to
123 * by buf. max_length represents the maximum length of the buffer pointed
125 * DER encoded length. We return 0 on success or -l it the length cannot
129 gssint_put_der_length(unsigned int length, unsigned char **buf, unsigned int max_len)
141 /* Single byte is the length */
142 if (length < 128) {
143 *s++ = length;
151 /* Running total of the DER encoding length */
156 * factor to MSO_BIT (24 for 32 bit words) and then shifting the length
165 v = (length >> i) & 0xff;
176 * We go back now and set the first byte to be the length with
196 int length;
203 * tag for APPLICATION 0, Sequence[constructed, definite length]
204 * length of remainder of token
206 * length of mechanism OID
213 * <length> - could be multiple bytes
215 * <length> - assume only one byte, hence OID length < 127
227 /* Skip past the APP/Sequnce byte and the token length */
233 length = *buffer_ptr++;
235 /* check if token length is null */
236 if (length == 0)
239 if (length & 0x80) {
240 if ((length & 0x7f) > 4)
242 buffer_ptr += length & 0x7f;
248 OID->length = (OM_uint32) *(buffer_ptr++);
273 if (token->length >= sizeof(NTLMSSP_SIGNATURE) &&
277 } else if (token->length != 0 &&
281 } else if (token->length == 0) {
378 * (0x0401) + 2-octet network-byte order mech OID length + mech
379 * oid (in DER format, including DER tag and DER length) +
380 * 4-octet network-byte order length of inner portion + inner
401 mechOidDERLen = gssint_der_length_size(mech_type->length);
402 name_buf->length = tokIdLen + mechOidLenLen +
404 mech_type->length +
405 nameLenLen + dispName.length;
406 if ((name_buf->value = (void*)malloc(name_buf->length)) ==
408 name_buf->length = 0;
415 (void) memset(name_buf->value, 0, name_buf->length);
419 /* spec allows only 2 bytes for the mech oid length */
420 mechOidLen = mechOidDERLen + mechOidTagLen + mech_type->length;
425 * DER Encoding of mech OID contains OID Tag (0x06), length and
429 if (gssint_put_der_length(mech_type->length, &buf,
430 (name_buf->length - tokIdLen -2)) != 0) {
431 name_buf->length = 0;
437 (void) memcpy(buf, mech_type->elements, mech_type->length);
438 buf += mech_type->length;
440 /* spec designates the next 4 bytes for the name length */
441 store_32_be(dispName.length, buf);
445 (void) memcpy(buf, dispName.value, dispName.length);
581 union_name->external_name->length = 0;
690 len = srcBuf->length + 1;
692 len = srcBuf->length;
700 (void) memcpy(aBuf->value, srcBuf->value, srcBuf->length);
701 aBuf->length = srcBuf->length;
706 ((char *)aBuf->value)[aBuf->length] = '\0';