F-1297: fix RSA signature verification check that always passed regardless of result
parent
12ba640b3a
commit
9ac1bcbc4e
|
|
@ -43,8 +43,6 @@
|
|||
static struct sockaddr_in servAddr; /* our server's address */
|
||||
static struct sockaddr_in cliaddr; /* the client's address */
|
||||
|
||||
void sig_handler(const int sig);
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
/* Loc short for "location" */
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ int main(int argc, char** argv)
|
|||
verifySz = ret;
|
||||
ret = 0;
|
||||
|
||||
if (signSz == ret && XMEMCMP(plain, in, (size_t)ret)) {
|
||||
if (verifySz != (int)inSz || XMEMCMP(plain, in, inSz) != 0) {
|
||||
ret = SIG_VERIFY_E;
|
||||
}
|
||||
|
||||
|
|
@ -242,9 +242,7 @@ prog_end:
|
|||
wc_FreeRng(&rng);
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
(void)verifySz;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
#else
|
||||
(void)kRsaKey;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue