for (v = 0; v < 3; v++)
for (v = 0; v < 6; v++)
int main(int argc, char *argv[])    {    int err=0;    int v;    RSA *key;    unsigned char ptext[256];    unsigned char ctext[256];    static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";    unsigned char ctext_ex[256];    int plen;    int clen = 0;    int num;    CRYPTO_malloc_debug_init();    CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);    RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */    plen = sizeof(ptext_ex) - 1;    for (v = 0; v < 3; v++)	{	key = RSA_new();	switch (v) {    case 0:	clen = key1(key, ctext_ex);	break;    case 1:	clen = key2(key, ctext_ex);	break;    case 2:	clen = key3(key, ctext_ex);	break;	}	num = RSA_public_encrypt(plen, ptext_ex, ctext, key,				 RSA_PKCS1_PADDING);	if (num != clen)	    {	    printf("PKCS#1 v1.5 encryption failed!\n");	    err=1;	    goto oaep;	    }  	num = RSA_private_decrypt(num, ctext, ptext, key,				  RSA_PKCS1_PADDING);	if (num != plen || memcmp(ptext, ptext_ex, num) != 0)	    {	    printf("PKCS#1 v1.5 decryption failed!\n");	    err=1;	    }	else	    printf("PKCS #1 v1.5 encryption/decryption ok\n");    oaep:	ERR_clear_error();	num = RSA_public_encrypt(plen, ptext_ex, ctext, key,				 RSA_PKCS1_OAEP_PADDING);	if (num == -1 && pad_unknown())	    {	    printf("No OAEP support\n");	    goto next;	    }	if (num != clen)	    {	    printf("OAEP encryption failed!\n");	    err=1;	    goto next;	    }  	num = RSA_private_decrypt(num, ctext, ptext, key,				  RSA_PKCS1_OAEP_PADDING);	if (num != plen || memcmp(ptext, ptext_ex, num) != 0)	    {	    printf("OAEP decryption (encrypted data) failed!\n");	    err=1;	    }	else if (memcmp(ctext, ctext_ex, num) == 0)	    {	    printf("OAEP test vector %d passed!\n", v);	    goto next;	    }    	/* Different ciphertexts (rsa_oaep.c without -DPKCS_TESTVECT).	   Try decrypting ctext_ex */	num = RSA_private_decrypt(clen, ctext_ex, ptext, key,				  RSA_PKCS1_OAEP_PADDING);	if (num != plen || memcmp(ptext, ptext_ex, num) != 0)	    {	    printf("OAEP decryption (test vector data) failed!\n");	    err=1;	    }	else	    printf("OAEP encryption/decryption ok\n");    next:	RSA_free(key);	}    CRYPTO_cleanup_all_ex_data();    ERR_remove_state(0);    CRYPTO_mem_leaks_fp(stderr);#ifdef OPENSSL_SYS_NETWARE    if (err) printf("ERROR: %d\n", err);#endif    return err;    }