!2 [sync] PR-1: 初始化uadk engine仓库
From: @openeuler-sync-bot Reviewed-by: @hao-fang Signed-off-by: @hao-fang
This commit is contained in:
commit
4760490ef7
55
0001-digest-delete-some-duplicate-code.patch
Normal file
55
0001-digest-delete-some-duplicate-code.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From eba09f6a2eb20bf431822718fa752a68b6d682c5 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Ye <yekai13@huawei.com>
|
||||
Date: Thu, 9 Dec 2021 11:17:40 +0800
|
||||
Subject: [PATCH] digest: delete some duplicate code
|
||||
|
||||
digest task not need to allocate session twice for one stream.
|
||||
init->update->final as one stream.
|
||||
|
||||
Signed-off-by: Kai Ye <yekai13@huawei.com>
|
||||
---
|
||||
src/uadk_digest.c | 14 +++++---------
|
||||
1 file changed, 5 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/uadk_digest.c b/src/uadk_digest.c
|
||||
index 9fdec91..db33d16 100644
|
||||
--- a/src/uadk_digest.c
|
||||
+++ b/src/uadk_digest.c
|
||||
@@ -607,10 +607,6 @@ static int uadk_e_digest_final(EVP_MD_CTX *ctx, unsigned char *digest)
|
||||
int ret = 1;
|
||||
struct async_op op;
|
||||
|
||||
- priv->sess = wd_digest_alloc_sess(&priv->setup);
|
||||
- if (unlikely(!priv->sess))
|
||||
- return 0;
|
||||
-
|
||||
priv->req.in = priv->data;
|
||||
priv->req.out = digest;
|
||||
priv->req.in_bytes = priv->tail;
|
||||
@@ -639,11 +635,6 @@ static int uadk_e_digest_final(EVP_MD_CTX *ctx, unsigned char *digest)
|
||||
goto clear;
|
||||
}
|
||||
|
||||
- if (priv->sess) {
|
||||
- wd_digest_free_sess(priv->sess);
|
||||
- priv->sess = 0;
|
||||
- }
|
||||
-
|
||||
return 1;
|
||||
|
||||
sync_err:
|
||||
@@ -665,6 +656,11 @@ static int uadk_e_digest_cleanup(EVP_MD_CTX *ctx)
|
||||
if (!priv || priv->copy)
|
||||
return 1;
|
||||
|
||||
+ if (priv->sess) {
|
||||
+ wd_digest_free_sess(priv->sess);
|
||||
+ priv->sess = 0;
|
||||
+ }
|
||||
+
|
||||
if (priv && priv->data)
|
||||
OPENSSL_free(priv->data);
|
||||
|
||||
--
|
||||
2.24.4
|
||||
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# uadk_engine
|
||||
|
||||
#### Description
|
||||
Openssl engine of UADK
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
||||
# uadk_engine
|
||||
|
||||
#### 介绍
|
||||
Openssl engine of UADK
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
BIN
uadk_engine-1.0.0.tar.gz
Normal file
BIN
uadk_engine-1.0.0.tar.gz
Normal file
Binary file not shown.
73
uadk_engine.spec
Normal file
73
uadk_engine.spec
Normal file
@ -0,0 +1,73 @@
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: uadk_engine
|
||||
Summary: UADK Accelerator Engine
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
License: Apache-2.0
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
ExclusiveOS: linux
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Prefix: /usr/local/lib/engines-1.1
|
||||
Conflicts: %{name} < %{version}-%{release}
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
BuildRequires: libwd >= 2.3.21
|
||||
BuildRequires: openssl-devel sed autoconf automake libtool
|
||||
Requires: openssl
|
||||
ExclusiveArch: aarch64
|
||||
|
||||
Patch0001: 0001-digest-delete-some-duplicate-code.patch
|
||||
|
||||
%description
|
||||
This package contains the UADK Accelerator Engine
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name} -p1
|
||||
|
||||
%build
|
||||
autoreconf -i
|
||||
chmod +x configure
|
||||
./configure --enable-kae
|
||||
make
|
||||
|
||||
%install
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
|
||||
install -b -m755 src/.libs/uadk_engine.so.%{version} ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(755,root,root)
|
||||
/usr/local/lib/engines-1.1/uadk_engine.so.%{version}
|
||||
|
||||
%pre
|
||||
if [ "$1" = "2" ] ; then #2: update
|
||||
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
|
||||
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%post
|
||||
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so
|
||||
ln -sf $RPM_INSTALL_PREFIX/uadk_engine.so.%{version} $RPM_INSTALL_PREFIX/uadk_engine.so.0
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
if [ "$1" = "0" ] ; then #0: uninstall
|
||||
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so > /dev/null 2>&1 || true
|
||||
rm -rf $RPM_INSTALL_PREFIX/uadk_engine.so.0 > /dev/null 2>&1 || true
|
||||
rm -f /var/log/uadk_engine.log > /dev/null 2>&1 || true
|
||||
rm -f /var/log/uadk_engine.log.old > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-2
|
||||
- Delete digest duplicate code
|
||||
|
||||
* Fri Dec 10 2021 linwenkai <linwenkai6@hisilicon.com> 1.0.0-1
|
||||
- First Spec Version Include uadk_engine Code
|
||||
Loading…
x
Reference in New Issue
Block a user