"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ssl.c" between
vsftpd-3.0.4.tar.gz and vsftpd-3.0.5.tar.gz

About: vsftpd is a "secure, fast and scalable" FTP server.

ssl.c  (vsftpd-3.0.4):ssl.c  (vsftpd-3.0.5)
skipping to change at line 743 skipping to change at line 743
unsigned char* outlen, unsigned char* outlen,
const unsigned char* p_in, const unsigned char* p_in,
unsigned int inlen, unsigned int inlen,
void* p_arg) { void* p_arg) {
unsigned int i; unsigned int i;
struct vsf_session* p_sess = (struct vsf_session*) p_arg; struct vsf_session* p_sess = (struct vsf_session*) p_arg;
int is_ok = 0; int is_ok = 0;
(void) p_ssl; (void) p_ssl;
/* Select everything but return an error if we don't like it. */ /* Initialize just in case. */
*p_out = p_in; *p_out = p_in;
*outlen = inlen; *outlen = 0;
if (inlen == 4) { for (i = 0; i < inlen; ++i) {
if (p_in[0] == 3 && p_in[1] == 'f' && p_in[2] == 't' && p_in[3] == 'p') unsigned int left = (inlen - i);
if (left < 4) {
continue;
}
if (p_in[i] == 3 && p_in[i + 1] == 'f' && p_in[i + 2] == 't' &&
p_in[i + 3] == 'p')
{ {
is_ok = 1; is_ok = 1;
*p_out = &p_in[i + 1];
*outlen = 3;
break;
} }
} }
if (!is_ok) if (!is_ok)
{ {
str_alloc_text(&debug_str, "ALPN rejection"); str_alloc_text(&debug_str, "ALPN rejection");
vsf_log_line(p_sess, kVSFLogEntryDebug, &debug_str); vsf_log_line(p_sess, kVSFLogEntryDebug, &debug_str);
} }
if (!is_ok || tunable_debug_ssl) if (!is_ok || tunable_debug_ssl)
{ {
 End of changes. 4 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)