Fix Wpointer-sign compiler warning

```
providers/implementations/signature/ecdsa_sig.c: scope_hint: In function 'do_ec_pct'
providers/implementations/signature/ecdsa_sig.c:594:46: warning[-Wpointer-sign]: pointer targets in passing argument 2 of 'ecdsa_digest_signverify_update' differ in signedness
providers/implementations/signature/ecdsa_sig.c:325:69: note: expected 'const unsigned char *' but argument is of type 'const char *'
```

```
providers/implementations/signature/rsa_sig.c: scope_hint: In function 'do_rsa_pct'
providers/implementations/signature/rsa_sig.c:1518:44: warning[-Wpointer-sign]: pointer targets in passing argument 2 of 'rsa_digest_signverify_update' differ in signedness
providers/implementations/signature/rsa_sig.c:910:62: note: expected 'const unsigned char *' but argument is of type 'const char *'
```

Resolves: rhbz#2178034
Signed-off-by: Clemens Lang <cllang@redhat.com>
This commit is contained in:
Clemens Lang 2023-03-16 14:08:53 +01:00
parent 6eb72dd621
commit e5f783d552
2 changed files with 7 additions and 3 deletions

View File

@ -190,7 +190,7 @@ diff -up openssl-3.0.7/providers/implementations/signature/ecdsa_sig.c.pairwise
+#ifdef FIPS_MODULE +#ifdef FIPS_MODULE
+int do_ec_pct(void *vctx, const char *mdname, void *ec) +int do_ec_pct(void *vctx, const char *mdname, void *ec)
+{ +{
+ static const char data[32]; + static const unsigned char data[32];
+ unsigned char sigbuf[256]; + unsigned char sigbuf[256];
+ size_t siglen = sizeof(sigbuf); + size_t siglen = sizeof(sigbuf);
+ +
@ -321,7 +321,7 @@ diff -up openssl-3.0.7/providers/implementations/signature/rsa_sig.c.pairwise op
+#ifdef FIPS_MODULE +#ifdef FIPS_MODULE
+int do_rsa_pct(void *vctx, const char *mdname, void *rsa) +int do_rsa_pct(void *vctx, const char *mdname, void *rsa)
+{ +{
+ static const char data[32]; + static const unsigned char data[32];
+ unsigned char *sigbuf = NULL; + unsigned char *sigbuf = NULL;
+ size_t siglen = 0; + size_t siglen = 0;
+ int ret = 0; + int ret = 0;

View File

@ -29,7 +29,7 @@ print(string.sub(hash, 0, 16))
Summary: Utilities from the general purpose cryptography library with TLS implementation Summary: Utilities from the general purpose cryptography library with TLS implementation
Name: openssl Name: openssl
Version: 3.0.7 Version: 3.0.7
Release: 7%{?dist} Release: 8%{?dist}
Epoch: 1 Epoch: 1
# We have to remove certain patented algorithms from the openssl source # We have to remove certain patented algorithms from the openssl source
# tarball with the hobble-openssl script which is included below. # tarball with the hobble-openssl script which is included below.
@ -505,6 +505,10 @@ install -m644 %{SOURCE9} \
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
%changelog %changelog
* Thu Mar 16 2023 Clemens Lang <cllang@redhat.com> - 1:3.0.7-8
- Fix Wpointer-sign compiler warning
Resolves: rhbz#2178034
* Tue Mar 14 2023 Clemens Lang <cllang@redhat.com> - 1:3.0.7-7 * Tue Mar 14 2023 Clemens Lang <cllang@redhat.com> - 1:3.0.7-7
- Add explicit FIPS indicators to key derivation functions - Add explicit FIPS indicators to key derivation functions
Resolves: rhbz#2175860 rhbz#2175864 Resolves: rhbz#2175860 rhbz#2175864