Lines Matching refs:length

48  * length, decode the length updating the buffer to point to the character
50 * bytes that made up the DER encoding of the length originally pointed to
58 int length, new_length;
68 * If the High order bit is not set then the length is just the value
73 return (*p); /* return the length */
78 * the number of bytes that contain the DER encoding of the length.
84 /* See if the supplied buffer contains enough bytes for the length. */
89 * Calculate a multibyte length. The length is encoded as an
92 for (length = 0; octets; octets--) {
93 new_length = (length << 8) + *p++;
94 if (new_length < length) /* overflow */
96 length = new_length;
101 return (length);
105 * der_length_size: Return the number of bytes to encode a given length.
123 * put_der_length: Encode the supplied length into the buffer pointed to
124 * by buf. max_length represents the maximum length of the buffer pointed
126 * DER encoded length. We return 0 on success or -l it the length cannot
130 gssint_put_der_length(unsigned int length, unsigned char **buf, unsigned int max_len)
142 /* Single byte is the length */
143 if (length < 128) {
144 *s++ = length;
152 /* Running total of the DER encoding length */
157 * factor to MSO_BIT (24 for 32 bit words) and then shifting the length
166 v = (length >> i) & 0xff;
177 * We go back now and set the first byte to be the length with
197 int length;
204 * tag for APPLICATION 0, Sequence[constructed, definite length]
205 * length of remainder of token
207 * length of mechanism OID
214 * <length> - could be multiple bytes
216 * <length> - assume only one byte, hence OID length < 127
228 /* Skip past the APP/Sequnce byte and the token length */
234 length = *buffer_ptr++;
236 /* check if token length is null */
237 if (length == 0)
240 if (length & 0x80) {
241 if ((length & 0x7f) > 4)
243 buffer_ptr += length & 0x7f;
249 OID->length = (OM_uint32) *(buffer_ptr++);
276 if (token->length >= sizeof(NTLMSSP_SIGNATURE) &&
280 } else if (token->length != 0 &&
284 } else if (token->length == 0) {
381 * (0x0401) + 2-octet network-byte order mech OID length + mech
382 * oid (in DER format, including DER tag and DER length) +
383 * 4-octet network-byte order length of inner portion + inner
404 mechOidDERLen = gssint_der_length_size(mech_type->length);
405 name_buf->length = tokIdLen + mechOidLenLen +
407 mech_type->length +
408 nameLenLen + dispName.length;
409 if ((name_buf->value = (void*)malloc(name_buf->length)) ==
411 name_buf->length = 0;
418 (void) memset(name_buf->value, 0, name_buf->length);
422 /* spec allows only 2 bytes for the mech oid length */
423 mechOidLen = mechOidDERLen + mechOidTagLen + mech_type->length;
428 * DER Encoding of mech OID contains OID Tag (0x06), length and
432 if (gssint_put_der_length(mech_type->length, &buf,
433 (name_buf->length - tokIdLen -2)) != 0) {
434 name_buf->length = 0;
440 (void) memcpy(buf, mech_type->elements, mech_type->length);
441 buf += mech_type->length;
443 /* spec designates the next 4 bytes for the name length */
444 store_32_be(dispName.length, buf);
448 (void) memcpy(buf, dispName.value, dispName.length);
584 union_name->external_name->length = 0;
693 len = srcBuf->length + 1;
695 len = srcBuf->length;
703 (void) memcpy(aBuf->value, srcBuf->value, srcBuf->length);
704 aBuf->length = srcBuf->length;
709 ((char *)aBuf->value)[aBuf->length] = '\0';