Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
7311fb64
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7311fb64
编写于
5月 29, 2023
作者:
C
code4lala
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add liblegacy into libcrypto
Signed-off-by:
N
code4lala
<
fengziteng2@huawei.com
>
上级
39466a62
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
59 addition
and
1 deletion
+59
-1
BUILD.gn
BUILD.gn
+39
-0
make_openssl_build_all_generated.sh
make_openssl_build_all_generated.sh
+20
-1
未找到文件。
BUILD.gn
浏览文件 @
7311fb64
...
...
@@ -121,6 +121,7 @@ libcrypto_build_all_generated_darwin64_x86_64_cc_sources = [
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_darwin64_arm64_cc_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S",
...
...
@@ -169,6 +170,7 @@ libcrypto_build_all_generated_linux_x86_64_sources = [
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_mingw64_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s",
...
...
@@ -202,6 +204,7 @@ libcrypto_build_all_generated_mingw64_sources = [
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_selected_platform_sources = []
...
...
@@ -341,6 +344,7 @@ crypto_config_common_cflags = [
"-DENGINESDIR=\"\"",
"-DMODULESDIR=\"\"",
"-DOPENSSLDIR=\"\"",
"-DSTATIC_LEGACY",
]
crypto_config_linux_armv4_cflags = [
...
...
@@ -392,6 +396,7 @@ crypto_config_darwin64_x86_64_cc_cflags = [
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
...
...
@@ -434,6 +439,7 @@ crypto_config_linux_x86_64_cflags = [
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
...
...
@@ -462,6 +468,7 @@ crypto_config_mingw64_cflags = [
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
...
...
@@ -645,6 +652,31 @@ libdefault_common_sources = [
"ssl/s3_cbc.c",
]
liblegacy_sources = [
"providers/implementations/ciphers/cipher_blowfish.c",
"providers/implementations/ciphers/cipher_blowfish_hw.c",
"providers/implementations/ciphers/cipher_cast5.c",
"providers/implementations/ciphers/cipher_cast5_hw.c",
"providers/implementations/ciphers/cipher_des.c",
"providers/implementations/ciphers/cipher_des_hw.c",
"providers/implementations/ciphers/cipher_desx.c",
"providers/implementations/ciphers/cipher_desx_hw.c",
"providers/implementations/ciphers/cipher_idea.c",
"providers/implementations/ciphers/cipher_idea_hw.c",
"providers/implementations/ciphers/cipher_rc2.c",
"providers/implementations/ciphers/cipher_rc2_hw.c",
"providers/implementations/ciphers/cipher_rc4.c",
"providers/implementations/ciphers/cipher_rc4_hmac_md5.c",
"providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c",
"providers/implementations/ciphers/cipher_rc4_hw.c",
"providers/implementations/ciphers/cipher_seed.c",
"providers/implementations/ciphers/cipher_seed_hw.c",
"providers/implementations/digests/md4_prov.c",
"providers/implementations/digests/mdc2_prov.c",
"providers/implementations/digests/wp_prov.c",
"providers/implementations/kdfs/pbkdf1.c",
]
ohos_source_set("crypto_source") {
subsystem_name = "thirdparty"
part_name = "openssl"
...
...
@@ -1373,8 +1405,11 @@ ohos_source_set("crypto_source") {
"crypto/x509/x_req.c",
"crypto/x509/x_x509.c",
"crypto/x509/x_x509a.c",
"engines/e_capi.c",
"engines/e_padlock.c",
"providers/baseprov.c",
"providers/defltprov.c",
"providers/legacyprov.c",
"providers/nullprov.c",
"providers/prov_running.c",
]
...
...
@@ -1383,6 +1418,7 @@ ohos_source_set("crypto_source") {
sources += libdefault_common_sources
sources += libdefault_build_all_generated_selected_platform_sources
sources += libcrypto_build_all_generated_selected_platform_sources
sources += liblegacy_sources
if (openssl_selected_platform == "linux-armv4") {
sources += [
...
...
@@ -1394,6 +1430,7 @@ ohos_source_set("crypto_source") {
"crypto/rc4/rc4_enc.c",
"crypto/rc4/rc4_skey.c",
"crypto/whrlpool/wp_block.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "linux-aarch64") {
sources += [
...
...
@@ -1406,6 +1443,7 @@ ohos_source_set("crypto_source") {
"crypto/rc4/rc4_enc.c",
"crypto/rc4/rc4_skey.c",
"crypto/whrlpool/wp_block.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
sources += [
...
...
@@ -1430,6 +1468,7 @@ ohos_source_set("crypto_source") {
"crypto/bn/asm/x86_64-gcc.c",
"crypto/bn/rsaz_exp.c",
"crypto/bn/rsaz_exp_x2.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "mingw64") {
sources += [
...
...
make_openssl_build_all_generated.sh
浏览文件 @
7311fb64
...
...
@@ -23,7 +23,26 @@ pushd ${build_all_generated_path}
rm
-rf
./openssl
cp
-r
${
openssl_source_path
}
openssl
pushd
openssl
./Configure
${
openssl_selected_platform
}
# https://github.com/openssl/openssl/issues/20112#issuecomment-1400388204
# no-shared will disable building shared libcrypto and libssl libraries.
# But the legacy provider would still be built as a shared module.
# So you would need the legacy shared module present on the installed
# system and the paths would have to be correct.
# You can use no-module to make the legacy provider built-in.
# https://github.com/openssl/openssl/issues/17679#issue-1130060263
# Is there a way to build a static version of openssl3, including the "legacy" OSSL_PROVIDER?
# https://github.com/openssl/openssl/issues/17679#issuecomment-1034949099
# Configure with no-shared no-module. The legacy provider is then part of libcrypto.a.
# You still need to "load" it via OSSL_PROVIDER_load() - but no .so file is required in that case.
# https://github.com/openssl/openssl/issues/19368#issuecomment-1274558844
# no-shared affects the building of libcrypto*.dll and libssl*.dll,
# not dynamically loadable modules (which are governed by the configuration option no-module / enable-module,
# which is enabled by default).
configure_cmd
=
"./Configure
${
openssl_selected_platform
}
no-shared no-module"
echo
$configure_cmd
$configure_cmd
make build_all_generated
-j256
>
/dev/null 2>&1
popd
# https://stackoverflow.com/questions/11325123/how-to-compare-two-directories-using-diff-while-ignoring-non-existing-files
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录