Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Mbedtls
提交
ac13d0b2
T
Third Party Mbedtls
项目概览
OpenHarmony
/
Third Party Mbedtls
大约 2 年 前同步成功
通知
0
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Mbedtls
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ac13d0b2
编写于
10月 14, 2022
作者:
L
liyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build
Signed-off-by:
N
liyufan
<
liyufan5@huawei.com
>
上级
240fbe4e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
28 deletion
+9
-28
library/psa_crypto.c
library/psa_crypto.c
+9
-28
未找到文件。
library/psa_crypto.c
浏览文件 @
ac13d0b2
...
@@ -1430,9 +1430,7 @@ psa_status_t psa_export_public_key( mbedtls_svc_key_id_t key,
...
@@ -1430,9 +1430,7 @@ psa_status_t psa_export_public_key( mbedtls_svc_key_id_t key,
goto
exit
;
goto
exit
;
}
}
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
status
=
psa_driver_wrapper_export_public_key
(
status
=
psa_driver_wrapper_export_public_key
(
&
attributes
,
slot
->
key
.
data
,
slot
->
key
.
bytes
,
&
attributes
,
slot
->
key
.
data
,
slot
->
key
.
bytes
,
data
,
data_size
,
data_length
);
data
,
data_size
,
data_length
);
...
@@ -2361,10 +2359,7 @@ static psa_status_t psa_mac_setup( psa_mac_operation_t *operation,
...
@@ -2361,10 +2359,7 @@ static psa_status_t psa_mac_setup( psa_mac_operation_t *operation,
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
goto
exit
;
goto
exit
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
status
=
psa_mac_finalize_alg_and_key_validation
(
alg
,
&
attributes
,
status
=
psa_mac_finalize_alg_and_key_validation
(
alg
,
&
attributes
,
&
operation
->
mac_size
);
&
operation
->
mac_size
);
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
...
@@ -2549,9 +2544,7 @@ static psa_status_t psa_mac_compute_internal( mbedtls_svc_key_id_t key,
...
@@ -2549,9 +2544,7 @@ static psa_status_t psa_mac_compute_internal( mbedtls_svc_key_id_t key,
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
goto
exit
;
goto
exit
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
status
=
psa_mac_finalize_alg_and_key_validation
(
alg
,
&
attributes
,
status
=
psa_mac_finalize_alg_and_key_validation
(
alg
,
&
attributes
,
&
operation_mac_size
);
&
operation_mac_size
);
...
@@ -2708,9 +2701,7 @@ static psa_status_t psa_sign_internal( mbedtls_svc_key_id_t key,
...
@@ -2708,9 +2701,7 @@ static psa_status_t psa_sign_internal( mbedtls_svc_key_id_t key,
goto
exit
;
goto
exit
;
}
}
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
if
(
input_is_message
)
if
(
input_is_message
)
{
{
...
@@ -3320,9 +3311,7 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
...
@@ -3320,9 +3311,7 @@ static psa_status_t psa_cipher_setup( psa_cipher_operation_t *operation,
operation
->
iv_required
=
1
;
operation
->
iv_required
=
1
;
operation
->
default_iv_length
=
PSA_CIPHER_IV_LENGTH
(
slot
->
attr
.
type
,
alg
);
operation
->
default_iv_length
=
PSA_CIPHER_IV_LENGTH
(
slot
->
attr
.
type
,
alg
);
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
/* Try doing the operation through a driver before using software fallback. */
/* Try doing the operation through a driver before using software fallback. */
if
(
cipher_operation
==
MBEDTLS_ENCRYPT
)
if
(
cipher_operation
==
MBEDTLS_ENCRYPT
)
...
@@ -3571,9 +3560,7 @@ psa_status_t psa_cipher_encrypt( mbedtls_svc_key_id_t key,
...
@@ -3571,9 +3560,7 @@ psa_status_t psa_cipher_encrypt( mbedtls_svc_key_id_t key,
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
goto
exit
;
goto
exit
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
default_iv_length
=
PSA_CIPHER_IV_LENGTH
(
slot
->
attr
.
type
,
alg
);
default_iv_length
=
PSA_CIPHER_IV_LENGTH
(
slot
->
attr
.
type
,
alg
);
if
(
default_iv_length
>
PSA_CIPHER_IV_MAX_SIZE
)
if
(
default_iv_length
>
PSA_CIPHER_IV_MAX_SIZE
)
...
@@ -3643,9 +3630,7 @@ psa_status_t psa_cipher_decrypt( mbedtls_svc_key_id_t key,
...
@@ -3643,9 +3630,7 @@ psa_status_t psa_cipher_decrypt( mbedtls_svc_key_id_t key,
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
goto
exit
;
goto
exit
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
if
(
alg
==
PSA_ALG_CCM_STAR_NO_TAG
&&
input_length
<
PSA_BLOCK_CIPHER_BLOCK_LENGTH
(
slot
->
attr
.
type
)
)
if
(
alg
==
PSA_ALG_CCM_STAR_NO_TAG
&&
input_length
<
PSA_BLOCK_CIPHER_BLOCK_LENGTH
(
slot
->
attr
.
type
)
)
{
{
...
@@ -3867,9 +3852,7 @@ static psa_status_t psa_aead_setup( psa_aead_operation_t *operation,
...
@@ -3867,9 +3852,7 @@ static psa_status_t psa_aead_setup( psa_aead_operation_t *operation,
if
(
status
!=
PSA_SUCCESS
)
if
(
status
!=
PSA_SUCCESS
)
goto
exit
;
goto
exit
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
if
(
is_encrypt
)
if
(
is_encrypt
)
status
=
psa_driver_wrapper_aead_encrypt_setup
(
operation
,
status
=
psa_driver_wrapper_aead_encrypt_setup
(
operation
,
...
@@ -4808,9 +4791,7 @@ static psa_status_t psa_generate_derived_key_internal(
...
@@ -4808,9 +4791,7 @@ static psa_status_t psa_generate_derived_key_internal(
#endif
/* MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES */
#endif
/* MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES */
slot
->
attr
.
bits
=
(
psa_key_bits_t
)
bits
;
slot
->
attr
.
bits
=
(
psa_key_bits_t
)
bits
;
attributes
=
{
attributes
.
core
=
slot
->
attr
;
.
core
=
slot
->
attr
};
if
(
psa_key_lifetime_is_external
(
attributes
.
core
.
lifetime
)
)
if
(
psa_key_lifetime_is_external
(
attributes
.
core
.
lifetime
)
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录