提交 daef663c 编写于 作者: H h00416433 提交者: public tcshversion

TicketNo:DTS2020051901498

Description:openssl support to build by arm
Team:OTHERS
Feature or Bugfix:Bugfix
Binary Source:No
PrivateCode(Yes/No):No

Change-Id: Iedde66caa66b2baa5c1a4508240849da0e434efd
Reviewed-on: http://mgit-tm.rnd.huawei.com/8910856Reviewed-by: Ndongjinguang 00268009 <dongjinguang@huawei.com>
Reviewed-by: Nhouyuezhou 00386575 <hou@huawei.com>
Tested-by: Npublic jenkins <public_jenkins@notesmail.huawei.com>
Reviewed-by: Nlinyibin 00246405 <linyibin@huawei.com>
上级 cf46376e
...@@ -30,6 +30,16 @@ config("crypto_config") { ...@@ -30,6 +30,16 @@ config("crypto_config") {
] ]
} }
config("crypto_config_public") {
include_dirs = [
"./include",
]
if (target_cpu == "arm") {
cflags = ["-DCPU_ARM32"]
}
}
harmonyos_source_set("crypto_source") { harmonyos_source_set("crypto_source") {
sources = [ sources = [
"crypto/aes/aes_cbc.c", "crypto/aes/aes_cbc.c",
...@@ -639,7 +649,9 @@ harmonyos_source_set("crypto_source") { ...@@ -639,7 +649,9 @@ harmonyos_source_set("crypto_source") {
configs = [ configs = [
":crypto_config", ":crypto_config",
":crypto_config_public",
] ]
remove_configs = ["//build/config/coverage:default_coverage"] remove_configs = ["//build/config/coverage:default_coverage"]
} }
...@@ -647,6 +659,9 @@ harmonyos_static_library("libcrypto_static") { ...@@ -647,6 +659,9 @@ harmonyos_static_library("libcrypto_static") {
deps = [ deps = [
":crypto_source" ":crypto_source"
] ]
public_configs = [
":crypto_config_public",
]
complete_static_lib = true complete_static_lib = true
remove_configs = ["//build/config/coverage:default_coverage"] remove_configs = ["//build/config/coverage:default_coverage"]
} }
......
...@@ -21,8 +21,13 @@ ...@@ -21,8 +21,13 @@
/* Should we define BN_DIV2W here? */ /* Should we define BN_DIV2W here? */
/* Only one for the following should be defined */ /* Only one for the following should be defined */
#if defined(CPU_ARM32)
#undef SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT
#define THIRTY_TWO_BIT
#else
#define SIXTY_FOUR_BIT_LONG #define SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT #undef SIXTY_FOUR_BIT
#undef THIRTY_TWO_BIT #undef THIRTY_TWO_BIT
#endif
#endif #endif
...@@ -202,12 +202,20 @@ extern "C" { ...@@ -202,12 +202,20 @@ extern "C" {
* The following are cipher-specific, but are part of the public API. * The following are cipher-specific, but are part of the public API.
*/ */
#if !defined(OPENSSL_SYS_UEFI) #if !defined(OPENSSL_SYS_UEFI)
#if defined(CPU_ARM32)
# define BN_LLONG
/* Only one for the following should be defined */
# undef SIXTY_FOUR_BIT_LONG
# undef SIXTY_FOUR_BIT
# define THIRTY_TWO_BIT
#else
# undef BN_LLONG # undef BN_LLONG
/* Only one for the following should be defined */ /* Only one for the following should be defined */
# define SIXTY_FOUR_BIT_LONG # define SIXTY_FOUR_BIT_LONG
# undef SIXTY_FOUR_BIT # undef SIXTY_FOUR_BIT
# undef THIRTY_TWO_BIT # undef THIRTY_TWO_BIT
#endif #endif
#endif
#define RC4_INT unsigned char #define RC4_INT unsigned char
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册