diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2021-09-30 09:51:10 +0300 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2022-07-01 10:52:14 +0200 |
commit | 26c17ab6bfddf0d075e91c3c2d32b028cd0af455 (patch) | |
tree | 05d93dfb606357063d73e78ef4f836cd41d9889a | |
parent | b058fa7b84661cb46a2d15b17a0808e31020b80d (diff) | |
download | rpm-26c17ab6bfddf0d075e91c3c2d32b028cd0af455.tar.gz |
Process MPI's from all kinds of signatures
No immediate effect but needed by the following commits.
(cherry picked from commit b5e8bc74b2b05aa557f663fe227b94d2bc64fbd8)
-rw-r--r-- | rpmio/rpmpgp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index ee5c81e24..340de5fc9 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -543,7 +543,7 @@ pgpDigAlg pgpDigAlgFree(pgpDigAlg alg) return NULL; } -static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, +static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, const uint8_t *p, const uint8_t *h, size_t hlen, pgpDigParams sigp) { @@ -556,10 +556,8 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, int mpil = pgpMpiLen(p); if (pend - p < mpil) break; - if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) { - if (sigalg->setmpi(sigalg, i, p)) - break; - } + if (sigalg->setmpi(sigalg, i, p)) + break; p += mpil; } @@ -619,7 +617,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, } p = ((uint8_t *)v) + sizeof(*v); - rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); + rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); } break; case 4: { pgpPktSigV4 v = (pgpPktSigV4)h; @@ -678,7 +676,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, if (p > hend) return 1; - rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp); + rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp); } break; default: rpmlog(RPMLOG_WARNING, _("Unsupported version of signature: V%d\n"), version); |