Skip to content

Commit e97ff62

Browse files
null0linksmuellerDD
authored andcommitted
Allow RSA keygen Generated Data Tests in openssl3 backend
Do not require auxiality primes when performing RSA keygen GDTs in openssl3 backend. Signed-off-by: Karol Brzuskiewicz <[email protected]> Signed-off-by: Stephan Mueller <[email protected]>
1 parent 846c76a commit e97ff62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backends/backend_openssl3.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,8 @@ static int openssl_rsa_keygen_internal(uint32_t modulus, struct buffer *ebuf,
28152815
CKNULL(e, -ENOMEM);
28162816

28172817
bld = OSSL_PARAM_BLD_new();
2818-
if (xpbuf && xp1buf && xp2buf) {
2818+
if (xpbuf && xp1buf && xp2buf &&
2819+
xpbuf->buf && xp1buf->buf && xp2buf->buf) {
28192820
CKNULL_LOG(xpbuf->len, -EFAULT,
28202821
"xP must be provided by ACVP server\n");
28212822
CKNULL_LOG(xp1buf->len, -EFAULT,
@@ -2835,7 +2836,8 @@ static int openssl_rsa_keygen_internal(uint32_t modulus, struct buffer *ebuf,
28352836
OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_RSA_TEST_XP1, xp1);
28362837
OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_RSA_TEST_XP2, xp2);
28372838
}
2838-
if (xqbuf && xq1buf && xq2buf) {
2839+
if (xqbuf && xq1buf && xq2buf &&
2840+
xqbuf->buf && xq1buf->buf && xq2buf->buf) {
28392841
CKNULL_LOG(xqbuf->len, -EFAULT,
28402842
"xQ must be provided by ACVP server\n");
28412843
CKNULL_LOG(xq1buf->len, -EFAULT,

0 commit comments

Comments
 (0)