Skip to content

Commit

Permalink
Fix testapp issue with RSA8k.
Browse files Browse the repository at this point in the history
Signed-off-by: Ponnam Srinivas <ponnamx.srinivas@intel.com>
  • Loading branch information
ponnamsx authored and Yogaraj-Alamenda committed Aug 14, 2023
1 parent 22abd48 commit e7c3e13
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/tests_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,12 @@ static int run_rsa(void *args)
break;
}
const unsigned char *R = rsa_keys[testnum].data;
rsa_key = d2i_PrivateKey(EVP_PKEY_RSA, NULL, &R, rsa_keys[testnum].length);
if (size == 8192) {
rsa_key=EVP_PKEY_new();
EVP_PKEY_assign_RSA(rsa_key, key);
} else {
rsa_key = d2i_PrivateKey(EVP_PKEY_RSA, NULL, &R, rsa_keys[testnum].length);
}

/*
* For functional tests we need to run verify anyway,
Expand Down Expand Up @@ -3257,6 +3262,7 @@ static int run_rsa(void *args)
OPENSSL_free(ptext);
if (ctext)
OPENSSL_free(ctext);
RSA_free(key);
#endif
if (sig)
OPENSSL_free(sig);
Expand All @@ -3266,7 +3272,6 @@ static int run_rsa(void *args)
OPENSSL_free(HashData);
if (expectedPtext)
OPENSSL_free(expectedPtext);
RSA_free(key);
return ret;
}

Expand Down

0 comments on commit e7c3e13

Please sign in to comment.