PR: 2840
[openssl.git] / crypto / evp / evp_test.c
index e723265acebefcec5d200b38ce708907a0a1bf2d..55c7cdfdccf2b75e8c82336f120b4d9b6e8138a3 100644 (file)
@@ -220,18 +220,18 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
            test1_exit(7);
            }
 
-       if(outl+outl2 != cn)
+       if(outl+outl2 != pn)
            {
            fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
-                   outl+outl2,cn);
+                   outl+outl2,pn);
            test1_exit(8);
            }
 
-       if(memcmp(out,plaintext,cn))
+       if(memcmp(out,plaintext,pn))
            {
            fprintf(stderr,"Plaintext mismatch\n");
-           hexdump(stderr,"Got",out,cn);
-           hexdump(stderr,"Expected",plaintext,cn);
+           hexdump(stderr,"Got",out,pn);
+           hexdump(stderr,"Expected",plaintext,pn);
            test1_exit(9);
            }
        }
@@ -435,6 +435,7 @@ int main(int argc,char **argv)
            EXIT(3);
            }
        }
+       fclose(f);
 
 #ifndef OPENSSL_NO_ENGINE
     ENGINE_cleanup();