41 Commits

Author SHA1 Message Date
Dongjianwei001 8a5d51b503 Fixed missing validation and memory issues
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/1612

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-06-30 09:40:43 +08:00
dny df6b1a292c fix: harden app command security handling
Harden newly added app command paths and keep command-line behavior aligned with supported functionality.

- restrict enc output files and SM key-store files to owner-only permissions

- fail closed for explicitly configured CA files and enforce s_client host identity checks

- keep TLS app mode TLS-only and require client certificates when server verification is enabled

- validate SM key UUID inputs and preserve IPv4 split allocation bases during SAN parsing

- apply stdin size limits, cast ctype inputs safely, and honor errdecode -hex parsing

- reject unsupported GMAC/AES-WRAP/prime -safe command paths and update documentation

- apply pkcs12 algorithm options and add focused SDV coverage for the fixed paths

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/1463

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-05-20 20:29:58 +08:00
xxlu bb98e1267e Fix: Resolve double free and HITLS_CFG_SetNoClientCertSupport annotation issues
-The SetHmacMdAttr function's internal exception branch and calling function exception branch both release ctx,
 which can lead to the double free problem
-The value of the HITLS_CFG_SetNoClientCertSupport function is isSupportNoClientCert, which defaults to true.
 In the default scenario, the client does not set a certificate, and the server verification passes. However,
 the comments do not match the actual function

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/1406

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-05-20 20:28:08 +08:00
Dongjianwei001 51f41da579 Sync the code of openhitls-03
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-04-01 18:46:46 +08:00
jchx 11f227258b Standardize the naming of external structures
Co-authored-by: jchx<chenqi180@huawei.com>

# message auto-generated for no-merge-commit merge:
!1147 merge 03 into openhitls-0.3

Standardize the naming of external structures

Created-by: jchx
Commit-by: jchx
Merged-by: liwei3013
Description: <!--  感谢您提交 Pull Request!以下是一些提示:

1) 如果您是第一次提交,请阅读我们的贡献者指南:https://gitcode.com/openHiTLS/openhitls/wiki/FAQ-社区需求贡献流程.md

-->

**此 PR 的作用 / 为什么需要它**:

**自检清单**:

- [ ] **测试**:代码是否已有UT/ST测试用例覆盖,新增测试用例是否随本PR一并上库
- [ ] **接口**:是否涉及对外接口变更,变更已通过接口评审
- [ ] **文档**:是否涉及文档修改

<!-- **给审查者的特别说明**: -->
<!-- + - [ ] 是否导致无法前向兼容 -->
<!-- + - [ ] 是否涉及依赖的三方库变更 -->

See merge request: openHiTLS/openhitls!1147

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:42 +08:00
jchx 00c96f1776 update release notes
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:40 +08:00
jchx a675318af7 update feature of doc
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:39 +08:00
hs6246 d23649f345 fix:Remove some redundant commands.
Co-authored-by: hs6246<zhengzeyang@huawei.com>

# message auto-generated for no-merge-commit merge:
!918 merge fix into main

fix:Remove some redundant commands.

Created-by: hs6246
Commit-by: hs6246
Merged-by: liwei3013
Description: fix:Remove some redundant commands.

See merge request: openHiTLS/openhitls!918

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:33 +08:00
cnxf cb55114cdf feat(app): add prime command line with prime number generation and testing
- Implement prime number generation and primality testing
- Support decimal and hexadecimal input/output formats
- Add safe prime generation option
- Include 15 comprehensive test cases with cross-platform support
- Add command-line interface with options: -generate, -bits, -safe, -hex, -checks

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/856

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:33 +08:00
Ooohui f0ea0015ec Modify the command user guide
Co-authored-by: Ooohui<zhanghui160@huawei.com>

# message auto-generated for no-merge-commit merge:
!745 merge main1 into main

Modify the command user guide

Created-by: Ooohui
Commit-by: Ooohui
Merged-by: liwei3013
Description: Modify the command user guide

See merge request: openHiTLS/openhitls!745

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:28 +08:00
Ooohui cc9e95efab Add the command usage guide.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/740

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:28 +08:00
baoyi84930 0cc2ee706a doc: update Hybrid Post-Quantum Key Exchange related documents
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/654

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 19:50:26 +08:00
离标量 be48649e15 add openhitls command-line documentation
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/435

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 17:49:25 +08:00
baoyi84930 f4e8e88511 fix: fix spelling erros
Co-authored-by: baoyi84930<zhangcheng170@huawei.com>

# message auto-generated for no-merge-commit merge:
!983 merge dev into openhitls-0.2

fix: fix spelling erros

Created-by: baoyi84930
Commit-by: baoyi84930
Merged-by: liwei3013
Description: <!--  感谢您提交 Pull Request!以下是一些提示:

1) 如果您是第一次提交,请阅读我们的贡献者指南:https://gitcode.com/openHiTLS/openhitls/wiki/FAQ-社区需求贡献流程.md

-->

**此 PR 的作用 / 为什么需要它**:

**自检清单**:

- [ ] **测试**:代码是否已有UT/ST测试用例覆盖,新增测试用例是否随本PR一并上库
- [ ] **接口**:是否涉及对外接口变更,变更已通过接口评审
- [ ] **文档**:是否涉及文档修改

<!-- **给审查者的特别说明**: -->
<!-- + - [ ] 是否导致无法前向兼容 -->
<!-- + - [ ] 是否涉及依赖的三方库变更 -->

See merge request: openHiTLS/openhitls!983

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-01-15 15:48:46 +08:00
baoyi84930 160c4a4ab3 refactor: remove libsctp
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/312

Signed-off-by: lanming <lanming@huawei.com>
2025-05-29 20:03:10 +08:00
hx294 23a5b0e4cd fix(docs): correct libboundscheck repo URL from gitcode.com to gitee.com
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/299

Signed-off-by: lanming <lanming@huawei.com>
2025-05-29 20:02:18 +08:00
JerryDevis bf6080e4e4 modifies the docs
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/269
2025-05-12 21:11:37 +08:00
Dongjianwei001 5e435c58e7 Modify the names of function parameters and enumeration values
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/239
2025-04-27 22:22:01 +08:00
JerryDevis 1a1e124717 fix the bug of provider rand
# message auto-generated for no-merge-commit merge:
merge main_bug_fix into main

fix the bug of provider rand

Created-by: JerryDevis
Commit-by: JerryDevis
Merged-by: liwei3013
Description: fix the bug of provider rand

See merge request: openHiTLS/openhitls!233
2025-04-24 20:12:24 +08:00
liwei3013 c46b0f26b9 Fix Random numbers do not support provider issues
# message auto-generated for no-merge-commit merge:
merge bugfixRondom into main

Fix Random numbers do not support provider issues

Created-by: liwei3013
Commit-by: liwei3013
Merged-by: dumb
Description: Fix Random numbers do not support provider issues

See merge request: openHiTLS/openhitls!192
2025-04-09 14:46:34 +08:00
baoyi84930 21cded22ae docs: add provider-capbilities docs
# message auto-generated for no-merge-commit merge:
merge main into main

docs: add provider-capbilities docs

Created-by: baoyi84930
Commit-by: baoyi84930
Merged-by: fly2x
Description: docs: add provider-capbilities docs

See merge request: openHiTLS/openhitls!193
2025-03-26 19:34:17 +08:00
CRAZYBULU cac3f0dd24 update: 更新文件 1_术语列表.md
Signed-off-by: CRAZYBULU <593447156@qq.com>

# message auto-generated for no-merge-commit merge:
merge main into main

update: 更新文件 1_术语列表.md

Created-by: CRAZYBULU
Commit-by: CRAZYBULU
Merged-by: fly2x
Description: update: 更新文件 1_术语列表.md,更正数字签名的释义。

See merge request: openHiTLS/openhitls!174
2025-03-10 08:39:56 +08:00
Ooohui c6a32bc29c Add configuration guide documents
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/144
2025-02-06 09:14:23 +08:00
libiaoliang b5735a4d0a fix:Rename drbg interface
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/141
2025-01-11 18:15:28 +08:00
离标量 8a941e9580 provider document
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/92
2024-12-06 17:00:59 +08:00
usern4me 306d8445a2 fix some spelling mistakes
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/120
2024-12-25 19:00:29 +08:00
Ooohui a74d93c274 Standardize the goto and return statement.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/109
2024-12-21 09:31:57 +08:00
jchx 4e4b06b588 Add auth module of Privacy Pass Issuance Protocols based on RFC9578 & RFC9577
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/99
2024-12-18 09:26:37 +08:00
Ooohui 834b2fd1a9 Fix compilation bugs, refactor sal_string and pki module
1. Delete the check for system in configure.py and hitls_config_check.h.
2. Rewrite string related functions.
3. Unified PKI module naming.

Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/106
2024-12-17 11:17:39 +08:00
jchx 3dd16e095e Adding RSABSSA blind signatures based on RFC9474.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/37
2024-12-07 12:32:36 +08:00
离标量 99b717ca9b provider document
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/92
2024-12-07 10:26:13 +08:00
zhengzeyang b13ca326fd fix some bugs.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/93
2024-12-07 10:09:30 +08:00
离标量 09434e64dc provider document
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/92
2024-12-07 09:48:03 +08:00
kcxm 505cf0c6be fix tls docs and the interface definition error
# message auto-generated for no-merge-commit merge:
merge main into main

fix tls docs and the interface definition error

Created-by: kcxm
Author-id: 1439258
MR-id: 4363897
Commit-by: kcxm
Merged-by: liwei3013
E2E-issues: 
Description: fix tls docs and the interface definition error

See merge request: openHiTLS/openhitls!80
2024-11-26 21:12:11 +08:00
liwei3013 c4c3796d99 remove crypt param
# message auto-generated for no-merge-commit merge:
merge param into main

remove crypt param

Created-by: liwei3013
Author-id: 852200
MR-id: 4359728
Commit-by: liwei3013
Merged-by: dumb
E2E-issues: 
Description: remove crypt param 

See merge request: openHiTLS/openhitls!68
2024-11-25 20:30:02 +08:00
离标量 58f1ba5bae Revise--default-provider-implementation
# message auto-generated for no-merge-commit merge:
merge Revise--default-provider-implementation into main

Revise:-default-provider-implementation

Created-by: libiaoliang
Author-id: 1430863
MR-id: 4358683
Commit-by: 离标量
Merged-by: liwei3013
E2E-issues: 
Description: cipher注释修改-cmd移到外部-ctrl接口整改-失败分支错误码覆盖-小错误
用例整改
mem和thread整改
RSA盐值整改

See merge request: openHiTLS/openhitls!56
2024-11-22 22:05:58 +08:00
liwei3013 ddc2875d56 add bsl param
# message auto-generated for no-merge-commit merge:
merge param into main

add bsl param

Created-by: liwei3013
Author-id: 852200
MR-id: 4358460
Commit-by: liwei3013
Merged-by: dumb
E2E-issues: 
Description: add bsl param

See merge request: openHiTLS/openhitls!51
2024-11-22 18:54:40 +08:00
baoyi84930 1683201bd9 Branch merge
# message auto-generated for no-merge-commit merge:
merge baoyi_main into main

Branch merge

Created-by: baoyi84930
Author-id: 1168581
MR-id: 4353327
Commit-by: baoyi84930
Merged-by: liwei3013
E2E-issues: 
Description: 分支合并

See merge request: openHiTLS/openhitls!38
2024-11-20 15:43:39 +08:00
Ooohui 3fc1db8078 Rename x509 module
# message auto-generated for no-merge-commit merge:
merge fix into main

Rename x509 module

Created-by: Ooohui
Author-id: 1430981
MR-id: 4344426
Commit-by: Ooohui
Merged-by: dumb
E2E-issues: 
Description: Rename x509 module

See merge request: openHiTLS/openhitls!34
2024-11-18 19:13:26 +08:00
离标量 c5981b1758 add openHiTLS Provider
# message auto-generated for no-merge-commit merge:
merge git-master into main

add openHiTLS Provider

Created-by: libiaoliang
Author-id: 1430863
MR-id: 4270888
Commit-by: 离标量
Merged-by: liwei3013
E2E-issues: 
Description: add openHiTLS Provider

See merge request: openHiTLS/openhitls!25
2024-11-12 23:09:46 +08:00
fly2x be2fc52601 openhitls repo init 2024-10-16 20:50:29 +08:00