search for: buffer_append_c

Displaying 2 results from an estimated 2 matches for "buffer_append_c".

2004 Aug 09
1
[PATCH] RPA authentication mechanism
...HALLENGE_LEN) { + *error = "invalid user response"; + return FALSE; + } + + if (p != end) { + *error = "unneeded data found"; + return FALSE; + } + + return TRUE; +} + +static void +buffer_append_asn1_length(buffer_t *buf, unsigned int length) +{ + if (length < 0x80) { + buffer_append_c(buf, length); + } else if (length < 0x100) { + buffer_append_c(buf, 0x81); + buffer_append_c(buf, length); + } else { + buffer_append_c(buf, 0x82); + buffer_append_c(buf, length >> 8); + buffer_append_c(buf, length & 0xff); + } +} + +static const char * +mech_rpa_build_token2(stru...
2004 Oct 22
1
[PATCH] support OEM encoding in NTLM messages
...nicode ? sizeof(ucs2le_t) : 1; } return str_c(str); } -static unsigned int append_string(buffer_t *buf, const char *str, int ucase) +static unsigned int append_string(buffer_t *buf, const char *str, + int ucase, int unicode) { unsigned int length = 0; for ( ; *str; str++) { buffer_append_c(buf, ucase ? toupper(*str) : *str); - buffer_append_c(buf, 0); - length += sizeof(ucs2le_t); + if (unicode) { + buffer_append_c(buf, 0); + length++; + } + length++; } return length; } static void ntlmssp_append_string(buffer_t *buf, size_t buffer_offset, - const char *str)...