Commit Graph

14 Commits

Author SHA1 Message Date
Dongjianwei001 51f41da579 Sync the code of openhitls-03
Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-04-01 18:46:46 +08:00
tlhc 3ba30169c2 feat: Add cross-platform support for Darwin/macOS
**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>
2026-03-30 19:50:28 +08:00
tlhc b67050ce74 feat: build system improvements and cross-platform support (macOS)
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>
2026-03-30 19:50:26 +08:00
离标量 1cf5a5970a New command line added
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/415

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2026-03-30 17:49:24 +08:00
baoyi84930 1935e50e60 feat:certificate verification error code refactoring
Co-authored-by: baoyi84930<zhangcheng170@huawei.com>

# message auto-generated for no-merge-commit merge:
merge x509 into openhitls-0.2

feat:certificate verification error code refactoring

Created-by: baoyi84930
Commit-by: baoyi84930
Merged-by: liwei3013
Description: feat:certificate verification error code refactoring

See merge request: openHiTLS/openhitls!631

Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>
2025-09-26 15:30:12 +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
Ooohui e6d83c9f8a Add miniaturization functions and tests
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/197
2025-04-19 18:31:57 +08:00
Cheng Zhang 12b33b432f feat: load group refactor, add libctx, attr, sigalg
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/156
2025-03-01 11:28:40 +08:00
bala 17bf4391a0 Fix: Reconstruct the CERT_Pair structure, match it in the form of a hash table, and match the certificate according to the keyType.
Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/153
2025-02-27 14:35:36 +08:00
Liu-Ermeng d5659ee417 refactor the testcase building
# message auto-generated for no-merge-commit merge:
merge main into main

refactor the testcase building

Created-by: dumb
Author-id: 822999
MR-id: 4358793
Commit-by: Liu-Ermeng
Merged-by: liwei3013
E2E-issues: 
Description: refactor the testcase building

See merge request: openHiTLS/openhitls!57
2024-11-23 11:03:46 +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
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