From e460f26b1994d9eafa0ffdb33730f72c35d3f02c Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 18 Aug 2018 00:34:42 +0500 Subject: [PATCH] src/Cedar/IPsec_PPP: remove dead code, unused fuction found by coverity, cppcheck [src/Cedar/IPsec_PPP.c:2655]: (style) The function 'MsChapV2Client_GenerateChallenge' is never used. --- src/Cedar/IPsec_PPP.c | 16 ---------------- src/Cedar/IPsec_PPP.h | 1 - 2 files changed, 17 deletions(-) diff --git a/src/Cedar/IPsec_PPP.c b/src/Cedar/IPsec_PPP.c index 6721172a..eebda7eb 100644 --- a/src/Cedar/IPsec_PPP.c +++ b/src/Cedar/IPsec_PPP.c @@ -2312,10 +2312,6 @@ PPP_LCP *ParseLCP(USHORT protocol, void *data, UINT size) c->OptionList = NewListFast(NULL); // Code - if (size < 1) - { - goto LABEL_ERROR; - } c->Code = buf[0]; buf++; size--; @@ -2655,18 +2651,6 @@ void MsChapV2Server_GenerateChallenge(UCHAR *dst) Rand(dst, 16); } -// Generate the MS-CHAPv2 client-side challenge -void MsChapV2Client_GenerateChallenge(UCHAR *dst) -{ - // Validate arguments - if (dst == NULL) - { - return; - } - - Rand(dst, 16); -} - // Generate a 8 bytes challenge void MsChapV2_GenerateChallenge8(UCHAR *dst, UCHAR *client_challenge, UCHAR *server_challenge, char *username) { diff --git a/src/Cedar/IPsec_PPP.h b/src/Cedar/IPsec_PPP.h index 58f94519..66571313 100644 --- a/src/Cedar/IPsec_PPP.h +++ b/src/Cedar/IPsec_PPP.h @@ -329,7 +329,6 @@ bool IsHubExistsWithLock(CEDAR *cedar, char *hubname); void GenerateNtPasswordHash(UCHAR *dst, char *password); void GenerateNtPasswordHashHash(UCHAR *dst_hash, UCHAR *src_hash); void MsChapV2Server_GenerateChallenge(UCHAR *dst); -void MsChapV2Client_GenerateChallenge(UCHAR *dst); void MsChapV2_GenerateChallenge8(UCHAR *dst, UCHAR *client_challenge, UCHAR *server_challenge, char *username); void MsChapV2Client_GenerateResponse(UCHAR *dst, UCHAR *challenge8, UCHAR *nt_password_hash); void MsChapV2Server_GenerateResponse(UCHAR *dst, UCHAR *nt_password_hash_hash, UCHAR *client_response, UCHAR *challenge8);