mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-10 23:20:12 +08:00
Fix warnings
This commit is contained in:
parent
8760949918
commit
1233e05263
@ -38,10 +38,9 @@ int readtls(struct clientparam *param, int direction, unsigned char *buf, int bu
|
|||||||
#define PROTOLEN (32)
|
#define PROTOLEN (32)
|
||||||
|
|
||||||
|
|
||||||
int parsehello(int type, unsigned char *hello, int len, char *sni, int * snipos, int *lv, char * proto){
|
int parsehello(int type, unsigned char *hello, unsigned len, char *sni, int * snipos, int *lv, char * proto){
|
||||||
int hlen;
|
|
||||||
unsigned offset;
|
unsigned offset;
|
||||||
unsigned slen, cslen, elen, snllen, snlen, alpnlen;
|
unsigned hlen, slen, cslen, elen, snllen, snlen, alpnlen;
|
||||||
int snifound=0;
|
int snifound=0;
|
||||||
|
|
||||||
if(len < 64) return -1;
|
if(len < 64) return -1;
|
||||||
@ -184,7 +183,7 @@ void * tlsprchild(struct clientparam* param) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lv = param->clibuf[2];
|
lv = param->clibuf[2];
|
||||||
res = parsehello(1, param->clibuf, res, sni, &snipos, &lv, proto);
|
res = parsehello(1, param->clibuf, (unsigned)res, sni, &snipos, &lv, proto);
|
||||||
if(res > 0){
|
if(res > 0){
|
||||||
if(param->hostname){
|
if(param->hostname){
|
||||||
myfree(param->hostname);
|
myfree(param->hostname);
|
||||||
@ -225,7 +224,7 @@ void * tlsprchild(struct clientparam* param) {
|
|||||||
res = tlstobufsrv(param, 0);
|
res = tlstobufsrv(param, 0);
|
||||||
if(res <= 0 || param->srvbuf[0] != 22) RETURN(340-res);
|
if(res <= 0 || param->srvbuf[0] != 22) RETURN(340-res);
|
||||||
lv = param->srvbuf[2];
|
lv = param->srvbuf[2];
|
||||||
res = parsehello(2, param->srvbuf, res, sni, &snipos, &lv, proto);
|
res = parsehello(2, param->srvbuf, (unsigned)res, sni, &snipos, &lv, proto);
|
||||||
if (res < 0) RETURN(350-res);
|
if (res < 0) RETURN(350-res);
|
||||||
}
|
}
|
||||||
if(param->srv->requirecert > 2){
|
if(param->srv->requirecert > 2){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user