Fix DSS verification problem

Resolves: rhbz#2212937
This commit is contained in:
Dmitry Belyavskiy 2023-06-07 12:12:46 +02:00
parent 29083ac442
commit 18e9f31c42

View File

@ -150,7 +150,7 @@ index a23c383dc..ea45e7275 100644
- /* sha1 the data */
- if ((ret = ssh_digest_memory(SSH_DIGEST_SHA1, data, dlen,
- digest, sizeof(digest))) != 0)
+ if ((slen = i2d_DSA_SIG(sig, NULL)) == 0) {
+ if ((slen = i2d_DSA_SIG(dsig, NULL)) == 0) {
+ ret = SSH_ERR_LIBCRYPTO_ERROR;
goto out;
-
@ -167,7 +167,7 @@ index a23c383dc..ea45e7275 100644
- default:
+ }
+ psig = sigb;
+ if ((slen = i2d_DSA_SIG(sig, &psig)) == 0) {
+ if ((slen = i2d_DSA_SIG(dsig, &psig)) == 0) {
ret = SSH_ERR_LIBCRYPTO_ERROR;
goto out;
}