From 13f542c1f8fc6a8f0f1dafafb948f09c7b0e7c45 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 14 Nov 2017 10:29:34 +0100 Subject: [PATCH] Use the new OpenSSL 1.1.0 API also in the HW tests --- ykcs11/tests/ykcs11_tests.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ykcs11/tests/ykcs11_tests.c b/ykcs11/tests/ykcs11_tests.c index df17239..34054b4 100644 --- a/ykcs11/tests/ykcs11_tests.c +++ b/ykcs11/tests/ykcs11_tests.c @@ -466,6 +466,7 @@ static void test_import_and_sign_all_10_RSA() { CK_BYTE_PTR s_ptr; CK_ULONG r_len; CK_ULONG s_len; + const BIGNUM *bp, *bq, *biqmp, *bdmp1, *bdmq1; unsigned char *px; @@ -508,11 +509,13 @@ static void test_import_and_sign_all_10_RSA() { asrt(RSA_generate_key_ex(rsak, 1024, e_bn, NULL), 1, "GENERATE RSAK"); - asrt(BN_bn2bin(rsak->p, p), 64, "GET P"); - asrt(BN_bn2bin(rsak->q, q), 64, "GET Q"); - asrt(BN_bn2bin(rsak->dmp1, dp), 64, "GET DP"); - asrt(BN_bn2bin(rsak->dmq1, dp), 64, "GET DQ"); - asrt(BN_bn2bin(rsak->iqmp, qinv), 64, "GET QINV"); + RSA_get0_factors(rsak, &bp, &bq); + RSA_get0_crt_params(rsak, &bdmp1, &bdmq1, &biqmp); + asrt(BN_bn2bin(bp, p), 64, "GET P"); + asrt(BN_bn2bin(bq, q), 64, "GET Q"); + asrt(BN_bn2bin(bdmp1, dp), 64, "GET DP"); + asrt(BN_bn2bin(bdmq1, dp), 64, "GET DQ"); + asrt(BN_bn2bin(biqmp, qinv), 64, "GET QINV");