ENGINE_cleanup(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); ERR_free_strings(); CRYPTO_mem_leaks_fp(stderr);
int main(int argc,char **argv)    {    const char *szTestFile;    FILE *f;    if(argc != 2)	{	fprintf(stderr,"%s <test file>\n",argv[0]);	exit(1);	}    szTestFile=argv[1];    f=fopen(szTestFile,"r");    if(!f)	{	perror(szTestFile);	exit(2);	}    OpenSSL_add_all_ciphers();    OpenSSL_add_all_digests();    ENGINE_load_builtin_engines();    for( ; ; )	{	char line[4096];	char *p;	char *cipher;	unsigned char *iv,*key,*plaintext,*ciphertext;	int kn,in,pn,cn;	if(!fgets((char *)line,sizeof line,f))	    break;	if(line[0] == '#' || line[0] == '\n')	    continue;	p=line;	cipher=sstrsep(&p,":");		key=ustrsep(&p,":");	iv=ustrsep(&p,":");	plaintext=ustrsep(&p,":");	ciphertext=ustrsep(&p,"\n");	kn=convert(key);	in=convert(iv);	pn=convert(plaintext);	cn=convert(ciphertext);	if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn)	   && !test_digest(cipher,plaintext,pn,ciphertext,cn))	    {	    fprintf(stderr,"Can't find %s\n",cipher);	    exit(3);	    }	}    return 0;    }