Lines Matching defs:length

44  * length, decode the length updating the buffer to point to the character
46 * bytes that made up the DER encoding of the length originally pointed to
55 int length, new_length;
65 * If the High order bit is not set then the length is just the value
70 return (*p); /* return the length */
75 * the number of bytes that contain the DER encoding of the length.
81 /* See if the supplied buffer contains enough bytes for the length. */
86 * Calculate a multibyte length. The length is encoded as an
89 for (length = 0; octets; octets--) {
90 new_length = (length << 8) + *p++;
91 if (new_length < length) /* overflow */
93 length = new_length;
98 return (length);
102 * der_length_size: Return the number of bytes to encode a given length.
120 * put_der_length: Encode the supplied length into the buffer pointed to
121 * by buf. max_length represents the maximum length of the buffer pointed
123 * DER encoded length. We return 0 on success or -l it the length cannot
127 gssint_put_der_length(unsigned int length, unsigned char **buf,
140 /* Single byte is the length */
141 if (length < 128) {
142 *s++ = length;
150 /* Running total of the DER encoding length */
155 * factor to MSO_BIT (24 for 32 bit words) and then shifting the length
164 v = (length >> i) & 0xff;
175 * 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++);
274 if (token->length >= sizeof (NTLMSSP_SIGNATURE) &&
278 } else if (token->length != 0 &&
282 } 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
400 mechOidDERLen = gssint_der_length_size(mech_type->length);
401 name_buf->length = tokIdLen + mechOidLenLen +
403 mech_type->length +
404 nameLenLen + dispName.length;
405 if ((name_buf->value = (void*)malloc(name_buf->length)) ==
407 name_buf->length = 0;
414 (void) memset(name_buf->value, 0, name_buf->length);
418 /* spec allows only 2 bytes for the mech oid length */
419 mechOidLen = mechOidDERLen + mechOidTagLen + mech_type->length;
424 * DER Encoding of mech OID contains OID Tag (0x06), length and
428 if (gssint_put_der_length(mech_type->length, &buf,
429 (name_buf->length - tokIdLen -2)) != 0) {
430 name_buf->length = 0;
436 (void) memcpy(buf, mech_type->elements, mech_type->length);
437 buf += mech_type->length;
439 /* spec designates the next 4 bytes for the name length */
440 store_32_be(dispName.length, buf);
444 (void) memcpy(buf, dispName.value, dispName.length);
579 union_name->external_name->length = 0;
688 len = srcBuf->length + 1;
690 len = srcBuf->length;
698 (void) memcpy(aBuf->value, srcBuf->value, srcBuf->length);
699 aBuf->length = srcBuf->length;
704 ((char *)aBuf->value)[aBuf->length] = '\0';