!8 Fix warnings introduced by aes-perf patch

From: @xia_qirong
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
This commit is contained in:
openeuler-ci-bot 2020-09-21 14:28:49 +08:00 committed by Gitee
commit 4f5dee8874
2 changed files with 15 additions and 32 deletions

View File

@ -1,25 +1,3 @@
pagure Logo
rpms / libgcrypt
Source
Issues
Pull Requests 1
Stats
Overview
Files
Commits
Branches
Forks
Releases
Monitoring status:
Bugzilla Assignee:
Fedora:
tmraz
EPEL:
tmraz
Files
master
libgcrypt-1.8.5-aes-perf.patch
diff -up libgcrypt-1.8.5/cipher/arcfour.c.aes-perf libgcrypt-1.8.5/cipher/arcfour.c
--- libgcrypt-1.8.5/cipher/arcfour.c.aes-perf 2017-11-23 19:16:58.000000000 +0100
+++ libgcrypt-1.8.5/cipher/arcfour.c 2020-04-22 18:29:41.662862382 +0200
@ -1238,7 +1216,7 @@ diff -up libgcrypt-1.8.5/cipher/cipher-cmac.c.aes-perf libgcrypt-1.8.5/cipher/ci
diff -up libgcrypt-1.8.5/cipher/cipher-ctr.c.aes-perf libgcrypt-1.8.5/cipher/cipher-ctr.c
--- libgcrypt-1.8.5/cipher/cipher-ctr.c.aes-perf 2017-11-23 19:16:58.000000000 +0100
+++ libgcrypt-1.8.5/cipher/cipher-ctr.c 2020-04-22 18:29:41.667862287 +0200
@@ -81,24 +81,38 @@ _gcry_cipher_ctr_encrypt (gcry_cipher_hd
@@ -81,24 +81,34 @@ _gcry_cipher_ctr_encrypt (gcry_cipher_hd
{
unsigned char tmp[MAX_BLOCKSIZE];
@ -1287,10 +1265,6 @@ diff -up libgcrypt-1.8.5/cipher/cipher-ctr.c.aes-perf libgcrypt-1.8.5/cipher/cip
+ {
+ n = inbuflen;
+ buf_xor(outbuf, inbuf, tmp, inbuflen);
+
+ inbuflen -= n;
+ outbuf += n;
+ inbuf += n;
+ }
/* Save the unused bytes of the counter. */
@ -2126,7 +2100,7 @@ diff -up libgcrypt-1.8.5/cipher/rfc2268.c.aes-perf libgcrypt-1.8.5/cipher/rfc226
diff -up libgcrypt-1.8.5/cipher/rijndael-aesni.c.aes-perf libgcrypt-1.8.5/cipher/rijndael-aesni.c
--- libgcrypt-1.8.5/cipher/rijndael-aesni.c.aes-perf 2017-11-23 19:16:58.000000000 +0100
+++ libgcrypt-1.8.5/cipher/rijndael-aesni.c 2020-04-22 18:29:41.671862210 +0200
+++ libgcrypt-1.8.5/cipher/rijndael-aesni.c 2020-04-28 11:22:26.025519954 +0200
@@ -327,8 +327,8 @@ _gcry_aes_aesni_do_setkey (RIJNDAEL_cont
@ -2266,7 +2240,12 @@ diff -up libgcrypt-1.8.5/cipher/rijndael-aesni.c.aes-perf libgcrypt-1.8.5/cipher
_gcry_aes_aesni_ocb_auth (gcry_cipher_hd_t c, const void *abuf_arg,
size_t nblocks)
{
@@ -1813,4 +1831,303 @@ _gcry_aes_aesni_ocb_auth (gcry_cipher_hd
@@ -1810,7 +1828,306 @@ _gcry_aes_aesni_ocb_auth (gcry_cipher_hd
aesni_cleanup ();
aesni_cleanup_2_6 ();
+
+ return 0;
}
@ -2409,8 +2388,6 @@ diff -up libgcrypt-1.8.5/cipher/rijndael-aesni.c.aes-perf libgcrypt-1.8.5/cipher
+
+ aesni_cleanup ();
+ aesni_cleanup_2_6 ();
+
+ return 0;
+}
+
+

View File

@ -4,7 +4,7 @@
Name: libgcrypt
Version: 1.8.6
Release: 2
Release: 3
Summary: A general-purpose cryptography library
License: LGPLv2+
URL: https://www.gnupg.org/
@ -136,6 +136,12 @@ install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/gcrypt/random.conf
%{_infodir}/gcrypt.info*
%changelog
* Sat Sep 19 2020 xiaqirong <xiaqirong1@huawei.com> - 1.8.6-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix warnings instroduced by aes-perf patch
* Sun Aug 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.8.6-2
- Type:bugfix
- ID:NA