mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-21 16:45:03 -05:00
make code C-compliant
This commit is contained in:
parent
9475d9689b
commit
77ef29358d
7
probe.c
7
probe.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
# probe.c: Code for probing protocols
|
# probe.c: Code for probing protocols
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007-2012 Yves Rutschle
|
# Copyright (C) 2007-2015 Yves Rutschle
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it
|
# This program is free software; you can redistribute it
|
||||||
# and/or modify it under the terms of the GNU General Public
|
# and/or modify it under the terms of the GNU General Public
|
||||||
@ -221,6 +221,7 @@ static int is_sni_protocol(const char *p, int len, struct proto *proto)
|
|||||||
{
|
{
|
||||||
int valid_tls;
|
int valid_tls;
|
||||||
char *hostname;
|
char *hostname;
|
||||||
|
char **sni_hostname;
|
||||||
|
|
||||||
valid_tls = parse_tls_header(p, len, &hostname);
|
valid_tls = parse_tls_header(p, len, &hostname);
|
||||||
|
|
||||||
@ -232,9 +233,7 @@ static int is_sni_protocol(const char *p, int len, struct proto *proto)
|
|||||||
/* Assume does not match */
|
/* Assume does not match */
|
||||||
valid_tls = PROBE_NEXT;
|
valid_tls = PROBE_NEXT;
|
||||||
|
|
||||||
char **sni_hostname = proto->data;
|
for (sni_hostname = proto->data; *sni_hostname; sni_hostname++)
|
||||||
|
|
||||||
for (; *sni_hostname; sni_hostname++)
|
|
||||||
if(!strcmp(hostname, *sni_hostname)) {
|
if(!strcmp(hostname, *sni_hostname)) {
|
||||||
valid_tls = PROBE_MATCH;
|
valid_tls = PROBE_MATCH;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user