add node-based BSL list helpers and migrate shared-list readers off curr-mutating macros
precompute DN UTF-8 during parse and reuse cached values in X.509 compare/verify
clean up app UIO ownership handling and expand PKI/TLS regression coverage
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Refine several safe copy paths to avoid GCC stringop-overflow false positives
and update the x86_64 build options to use -O3.
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Co-authored-by: hanzhiyang<hanzhiyang4@h-partners.com>
# message auto-generated for no-merge-commit merge:
!961 merge main into main
fix:Code optimization and refactoring
Created-by: hanzhiyang
Commit-by: hanzhiyang
Merged-by: liwei3013
Description: <!-- Thanks for sending a pull request! Here are some tips for you:
1) If this is your first time, please read our contributor guidelines: https://gitcode.com/openHiTLS/openhitls/wiki/FAQ-社区需求贡献流程.md
-->
**What does this PR do / why do we need it**:
**Self-checklist**:(**请自检,在[ ]内打上x**)
+ - [ ] **测试**:PR中的代码是否已有UT/ST测试用例进行充分的覆盖,新增测试用例是否随本PR一并上库或已经上库
+ - [ ] **接口**:是否涉及对外接口变更,相应变更已得到接口评审组织的通过,API对应的注释信息已经刷新正确
+ - [ ] **文档**:是否涉及官网文档修改,如果涉及请及时提交资料到Doc仓
<!-- **Special notes for your reviewers**: -->
<!-- + - [ ] 是否导致无法前向兼容 -->
<!-- + - [ ] 是否涉及依赖的三方库变更 -->
See merge request: openHiTLS/openhitls!961
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Co-authored-by: Tom<yanxu52@huawei.com>
# message auto-generated for no-merge-commit merge:
!690 merge main into main
fix: macro problems in test_suite_sdv_x509
Created-by: m0_69551548
Commit-by: Tom
Merged-by: liwei3013
Description: fix: macro problems in test_suite_sdv_x509
See merge request: openHiTLS/openhitls!690
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
**Core Platform Support:**
- Add Darwin/macOS platform detection and conditional compilation
- Implement platform-specific library extensions (.dylib for macOS, .so for Linux)
- Enhanced dynamic library loading with cross-platform error handling
- Platform-optimized time functions (clock_gettime_nsec_np for macOS)
- Add App module support for Darwin/macOS
**Threading & Synchronization:**
- BSL: Migrate from simple integer flags to proper pthread_once_t implementation
- Add BSL_SAL_OnceControl type with platform-specific implementations
- Implement thread-safe one-time initialization across platforms
- Fix memory initialization patterns for thread-once controls
**Build System Improvements:**
- Remove GNU ld-specific flags for test-framework use c function pointer replace or `stub_utils.h` to hook target function
- Boundcheck components will linked as static library for tests, reduce tests dynamic library deps
- Update CMake configurations for Darwin support
**Test Framework Enhancements:**
- Replace jmp_buf with sigjmp_buf for better signal handling
- Update time handling to avoid platform-specific gmtime issues
- Improve entropy test stability across platforms
- Add proper RAND initialization/deinitialization
**Entropy & Cryptographic Updates:**
- Temporarily disable CPU jitter entropy on macOS (pending validation)
- Add cross-platform entropy source management
- Update DRBG configuration for improved compatibility
- Enhance hardware entropy detection and handling
**Network & I/O:**
- Extend POSIX network functions to support both Linux and Darwin
- Add file accessibility checks before dynamic loading
- Improve error handling for symbol resolution across platforms
- Update socket and I/O operations for cross-platform compatibility
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/677
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Major Features:
- Multi-compiler/linker configuration system with toolchain support
- Auto-manage Secure C (libboundscheck) dependency
- Dynamic provider library names for CMVP modes (ISO19790, SM)
- macOS/Darwin platform support with unified POSIX abstractions
- Cross-platform build improvements and optimizations
Build System:
- Add toolchain management for cross-compilation
- Support nested 'common' format in compile config
- with _EXTRA/_REMOVE/_OVERRIDE in common flags, we can add remove by
per compiler
- Unify toolchain naming convention (arch-vendor-os-abi-compiler)
Platform Support:
- Unify Linux and Darwin sources under POSIX
- Add Darwin support for SAL and build flags
- Add Darwin support for REC wrapper functions (WIP)
- Cross-platform ops count macros for benchmarking
- Platform-specific library extension detection (.dylib vs .so)
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/652
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Co-authored-by: 离标量<xuzhengyi1@h-partners.com>
# message auto-generated for no-merge-commit merge:
merge FIX_BUG into main
demo test access control error correction
Created-by: libiaoliang
Commit-by: 离标量
Merged-by: liwei3013
Description: demo test access control error correction
See merge request: openHiTLS/openhitls!538
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Co-authored-by: Ooohui<zhanghui160@huawei.com>
# message auto-generated for no-merge-commit merge:
merge main into main
Fix the macros in default provider
Created-by: Ooohui
Commit-by: Ooohui
Merged-by: liwei3013
Description: Fix the macros in default provider
See merge request: openHiTLS/openhitls!532
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
Co-authored-by: Ooohui<zhanghui160@huawei.com>
# message auto-generated for no-merge-commit merge:
!960 merge openhitls-0.2 into openhitls-0.2
feat: Support curve nistp192 and setting/getting generic extension
Created-by: Ooohui
Commit-by: Ooohui
Merged-by: liwei3013
Description: <!-- Thanks for sending a pull request! Here are some tips for you:
1) If this is your first time, please read our contributor guidelines: https://gitcode.com/openHiTLS/openhitls/wiki/FAQ-社区需求贡献流程.md
-->
**What does this PR do / why do we need it**:
**Self-checklist**:(**请自检,在[ ]内打上x**)
+ - [ ] **测试**:PR中的代码是否已有UT/ST测试用例进行充分的覆盖,新增测试用例是否随本PR一并上库或已经上库
+ - [ ] **接口**:是否涉及对外接口变更,相应变更已得到接口评审组织的通过,API对应的注释信息已经刷新正确
+ - [ ] **文档**:是否涉及官网文档修改,如果涉及请及时提交资料到Doc仓
<!-- **Special notes for your reviewers**: -->
<!-- + - [ ] 是否导致无法前向兼容 -->
<!-- + - [ ] 是否涉及依赖的三方库变更 -->
See merge request: openHiTLS/openhitls!960
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
This change adds the -Wl,-no-undefined option to the
linker flags to ensure that all symbols are defined
at link time. This helps catch missing symbols early,
prevents runtime errors due to unresolved symbols,
and improves build reliability by failing the build
if any undefined references remain.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/402
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
# message auto-generated for no-merge-commit merge:
merge main into main
fix the Secure_C compile path
Created-by: jchx
Commit-by: jchx
Merged-by: liwei3013
Description: fix the Secure_C compile path
See merge request: openHiTLS/openhitls!249