@@ -101,7 +101,7 @@ CpaCyEcFieldType qat_get_field_type(const EC_GROUP *group)
101101 return CPA_CY_EC_FIELD_TYPE_BINARY ;
102102}
103103
104- #if CPA_CY_API_VERSION_NUM_MAJOR >= 3
104+ #if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
105105int qat_get_curve (CpaCyEcFieldType fieldType )
106106{
107107 if (fieldType == CPA_CY_EC_FIELD_TYPE_PRIME )
@@ -140,7 +140,7 @@ int qat_ecdh_compute_key(unsigned char **outX, size_t *outlenX,
140140
141141 int inst_num = QAT_INVALID_INSTANCE ;
142142 BIGNUM * xP = NULL , * yP = NULL ;
143- # if CPA_CY_API_VERSION_NUM_MAJOR >= 3
143+ # if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
144144 CpaCyEcGenericPointMultiplyOpData * pOpData = NULL ;
145145# else
146146 CpaCyEcPointMultiplyOpData * opData = NULL ;
@@ -184,7 +184,7 @@ int qat_ecdh_compute_key(unsigned char **outX, size_t *outlenX,
184184 return ret ;
185185 }
186186
187- # if CPA_CY_API_VERSION_NUM_MAJOR >= 3
187+ # if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
188188 pOpData = (CpaCyEcGenericPointMultiplyOpData * )
189189 OPENSSL_zalloc (sizeof (CpaCyEcGenericPointMultiplyOpData ));
190190 if (pOpData == NULL ) {
@@ -300,7 +300,7 @@ int qat_ecdh_compute_key(unsigned char **outX, size_t *outlenX,
300300 goto err ;
301301 }
302302
303- # if CPA_CY_API_VERSION_NUM_MAJOR >= 3
303+ # if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
304304 pOpData -> pCurve -> parameters .weierstrassParameters .fieldType = qat_get_field_type (group );
305305 pOpData -> pCurve -> curveType = qat_get_curve (pOpData -> pCurve -> parameters .weierstrassParameters .fieldType );
306306
@@ -423,7 +423,7 @@ int qat_ecdh_compute_key(unsigned char **outX, size_t *outlenX,
423423 }
424424
425425 CRYPTO_QAT_LOG ("KX - %s\n" , __func__ );
426- # if CPA_CY_API_VERSION_NUM_MAJOR >= 3
426+ # if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
427427 DUMP_EC_GENERIC_POINT_MULTIPLY (qat_instance_handles [inst_num ], pOpData , pResultX , pResultY );
428428 status = cpaCyEcGenericPointMultiply (qat_instance_handles [inst_num ],
429429 qat_ecCallbackFn ,
@@ -595,7 +595,7 @@ int qat_ecdh_compute_key(unsigned char **outX, size_t *outlenX,
595595 OPENSSL_free (pResultY );
596596 }
597597
598- # if CPA_CY_API_VERSION_NUM_MAJOR >= 3
598+ # if defined( QAT20_OOT ) || defined( QAT_HW_INTREE )
599599 if (pOpData ) {
600600 QAT_CHK_CLNSE_QMFREE_NONZERO_FLATBUFF (pOpData -> k );
601601 QAT_CHK_QMFREE_FLATBUFF (pOpData -> xP );
0 commit comments