Skip to content

Conversation

@gaozhangfei
Copy link
Collaborator

if hisi_qm_v2, test_provider_v2
if hisi_qm_v3, test_provider_v3

need test/sanity_test_provider_v3.sh

zhangfeigao and others added 10 commits December 19, 2024 17:04
openssl engine -c uadk_engine
does not call uadk_init & uadk_finish, but call uadk_destroy,
which call pthread_join(poll_queue.thread_id) but the thread_id is
not initialized, causing segmentation fault in 2403.

Test: 2403
autoreconf -i
make clean
./configure --enable-engine --libdir=/usr/lib64/engines-3/ CFLAGS=-Wall
make; make install

openssl engine -c uadk_engine

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
The following 3 AES algorithms are added:
AES-128-GCM AES-192-GCM AES-256-GCM

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
The ecc algorithm initialization and resource release
processes are the same. Therefore, the functions uadk_prov_sm2_init()
and uadk_prov_sm2_uninit() functions are moved from uadk_prov_sm2.c to
uadk_prov_pkey.c and change the functions name.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
The key generation process may query the name of the algorithm
supported by operation_id. If callback is not implemented, task will fail.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
Support ECDH key generation.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
Support ECDH key exchange.

Test:
        openssl speed -provider uadk_provider ecdhp192
        openssl speed -provider uadk_provider ecdhp224
        openssl speed -provider uadk_provider ecdhp256
        openssl speed -provider uadk_provider ecdhp384
        openssl speed -provider uadk_provider ecdhp521

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
Test:
openssl genpkey -provider uadk_provider -algorithm X448 \
        -out a_prikey_x448.pem
openssl pkey -in a_prikey_x448.pem -text
openssl pkey -in a_prikey_x448.pem -pubout -out a_pubkey_x448.pub
openssl genpkey  -provider uadk_provider -algorithm x448 \
        -out b_prikey_x448.pem
openssl pkey -in b_prikey_x448.pem -text
openssl pkey -in b_prikey_x448.pem -pubout -out b_pubkey_x448.pub
openssl pkeyutl -derive -out ab_x448.key -inkey a_prikey_x448.pem \
        -peerkey b_pubkey_x448.pub -provider uadk_provider
openssl pkeyutl -derive -out ba_x448.key -inkey b_prikey_x448.pem \
        -peerkey a_pubkey_x448.pub -provider uadk_provider

cmp ab_x448.key ba_x448.key
xxd ab_x448.key
xxd ba_x448.key

Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
…follows

    1. Wformat, solve format dismatch
    2. Wdiffarded qualifiers, const pointer lost const qualifier
    3. Wmissing prototypes,  use static to limit scope of internal function
    4. Wunused, unused functions and variables
    5. Wswitch, add default branch and break to switch
    6. Redundant decls, duplicate declarations in macro definitions

Signed-off-by: lizhi <lizhi206@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
Cleanup variable definition and return value, make the function
clearer.

Signed-off-by: Qi Tao <taoqi10@huawei.com>
Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com>
if hisi_qm_v2, test_provider_v2
if hisi_qm_v3, test_provider_v3

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
@CaptainMiaow
Copy link
Collaborator

If the provider test needs to distinguish between v2 and v3, does the engine test also need to be performed?

@gaozhangfei
Copy link
Collaborator Author

engine 暂时可以不用,engine 通过检查运行平台是否存在该算法 能查出来
provider 因为有default provider,通过parse 算法好像很麻烦,加个v3的sanity_test, 先解决这个问题。

@gaozhangfei
Copy link
Collaborator Author

可以在v3的sanity_test只测v3增加的算法,然后v2 v3两个脚本都调用一下,简单些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants