Support to display sm3 sig_hashalgo
This commit is contained in:
parent
d954bd65e7
commit
95c8bcc97d
44
Support-to-display-sm3-sig_hashalgo.patch
Normal file
44
Support-to-display-sm3-sig_hashalgo.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 9cf5b4af477347bb0f9ed51c28742c6baf62302b Mon Sep 17 00:00:00 2001
|
||||||
|
From: luhuaxin <luhuaxin1@huawei.com>
|
||||||
|
Date: Wed, 29 Jun 2022 14:33:30 +0800
|
||||||
|
Subject: [PATCH] Support to display sm3 sig_hashalgo
|
||||||
|
|
||||||
|
Signed-off-by: luhuaxin <luhuaxin1@huawei.com>
|
||||||
|
---
|
||||||
|
libkmod/libkmod-signature.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
|
||||||
|
index 4e8748c..142570b 100644
|
||||||
|
--- a/libkmod/libkmod-signature.c
|
||||||
|
+++ b/libkmod/libkmod-signature.c
|
||||||
|
@@ -56,6 +56,7 @@ enum pkey_hash_algo {
|
||||||
|
PKEY_HASH_SHA384,
|
||||||
|
PKEY_HASH_SHA512,
|
||||||
|
PKEY_HASH_SHA224,
|
||||||
|
+ PKEY_HASH_SM3,
|
||||||
|
PKEY_HASH__LAST
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -68,6 +69,7 @@ const char *const pkey_hash_algo[PKEY_HASH__LAST] = {
|
||||||
|
[PKEY_HASH_SHA384] = "sha384",
|
||||||
|
[PKEY_HASH_SHA512] = "sha512",
|
||||||
|
[PKEY_HASH_SHA224] = "sha224",
|
||||||
|
+ [PKEY_HASH_SM3] = "sm3",
|
||||||
|
};
|
||||||
|
|
||||||
|
enum pkey_id_type {
|
||||||
|
@@ -161,6 +163,10 @@ static int obj_to_hash_algo(const ASN1_OBJECT *o)
|
||||||
|
return PKEY_HASH_SHA512;
|
||||||
|
case NID_sha224:
|
||||||
|
return PKEY_HASH_SHA224;
|
||||||
|
+# ifndef OPENSSL_NO_SM3
|
||||||
|
+ case NID_sm3:
|
||||||
|
+ return PKEY_HASH_SM3;
|
||||||
|
+# endif
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: kmod
|
Name: kmod
|
||||||
Version: 29
|
Version: 29
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Kernel module management
|
Summary: Kernel module management
|
||||||
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
|
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
@ -14,6 +14,8 @@ Patch2: 0002-Module-replace-the-module-with-new-module.patch
|
|||||||
Patch3: 0003-Module-suspend-the-module-by-rmmod-r-option.patch
|
Patch3: 0003-Module-suspend-the-module-by-rmmod-r-option.patch
|
||||||
Patch4: 0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch
|
Patch4: 0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch
|
||||||
|
|
||||||
|
Patch9000: Support-to-display-sm3-sig_hashalgo.patch
|
||||||
|
|
||||||
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
|
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
|
||||||
|
|
||||||
Provides: module-init-tools = 4.0-1
|
Provides: module-init-tools = 4.0-1
|
||||||
@ -120,6 +122,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
|
|||||||
%doc TODO NEWS README
|
%doc TODO NEWS README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 29 2022 luhuaxin <luhuaxin1@huawei.com> - 29-5
|
||||||
|
- support to display sm3 sig_hashalgo
|
||||||
|
|
||||||
* Thu Feb 24 2022 Yang Yanchao <yangyanchao6@huawei.com> - 29-4
|
* Thu Feb 24 2022 Yang Yanchao <yangyanchao6@huawei.com> - 29-4
|
||||||
- add package python3-kmod.
|
- add package python3-kmod.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user