From 94c80d6f35c6033d39ec2e58631079257c8f86c5 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Jun 23 2015 21:17:31 +0000 Subject: Fix checking for errors when fetching SCEP chain When walking the chain of certificates from a server, check the response code of the current GetCAChain request, not the previous GetCACert request. Spotted by static analysis. --- diff --git a/src/scep.c b/src/scep.c index c16c478..658cb15 100644 --- a/src/scep.c +++ b/src/scep.c @@ -791,7 +791,7 @@ main(int argc, const char **argv) } break; } - if (response_code != 200) { + if (response_code2 != 200) { if (verbose > 0) { fprintf(stderr, "Response code " "is not 200, done.\n");