X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fevp_test.c;h=55c7cdfdccf2b75e8c82336f120b4d9b6e8138a3;hp=b8c9235d3e3f5328ae8f668491ea7c74dda2a495;hb=ea1d84358b491a21580ef74e3f0d9db0d44c5442;hpb=f7ccba3edf9f1f02d7bd3b019d7bc96f25a95718 diff --git a/crypto/evp/evp_test.c b/crypto/evp/evp_test.c index b8c9235d3e..55c7cdfdcc 100644 --- a/crypto/evp/evp_test.c +++ b/crypto/evp/evp_test.c @@ -153,8 +153,8 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, if(kn != c->key_len) { - fprintf(stderr,"Key length doesn't match, got %d expected %d\n",kn, - c->key_len); + fprintf(stderr,"Key length doesn't match, got %d expected %lu\n",kn, + (unsigned long)c->key_len); test1_exit(5); } EVP_CIPHER_CTX_init(&ctx); @@ -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();