未验证 提交 c70632d1 编写于 作者: Y yuanyuhang 提交者: Gitee

huks测试代码整改

Signed-off-by: Nyuanyuhang <yuanyuhang1@huawei.com>
上级 2bafb263
......@@ -1184,37 +1184,6 @@ export function SecurityHuksImportJsunit() {
done();
});
it('HUKS_Basic_Capability_Import_Reformed_0800', 0, async function (done) {
const srcKeyAlies = 'HUKS_Basic_Capability_Import_0800';
let HuksOptions = {
properties: new Array(
HuksCipherAES.HuksKeyAlgAES,
HuksCipherAES.HuksKeyPurposeENCRYPT,
HuksCipherAES.HuksKeyAESSize512,
HuksCipherAES.HuksKeyAESPADDINGNONE,
HuksCipherAES.HuksKeyAESBLOCKMODE,
HuksCipherAES.HuksKeyAESDIGESTNONE
),
inData: aes512Key,
};
if (useSoftware) {
try {
await huks.generateKeyItem(srcKeyAlies, HuksOptions)
.then(data => {
console.info(`promise: generateKeyItem success, data = ${JSON.stringify(data)}`);
})
.catch(err => {
console.error(`callback: generateKeyItem failed, code: ${err.code}, msg: ${err.message}`);
expect(err.code == 401).assertTrue();
})
} catch (err) {
console.error(`callback: generateKeyItem invalid, code: ${err.code}, msg: ${err.message}`);
expect(null).assertFail();
}
}
done();
});
it('HUKS_Basic_Capability_Import_Reformed_0900', 0, async function (done) {
const srcKeyAlies = 'HUKS_Basic_Capability_Import_0900';
let HuksOptions = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册