Remove redundant strlen()'s on sha1 digest verification
- string comparison notices different length anyway, avoid going through the same data twice
This commit is contained in:
parent
60bb36b90c
commit
44ce440509
|
@ -445,7 +445,7 @@ verifySHA1Digest(rpmtd sigtd, DIGEST_CTX sha1ctx, char **msg)
|
|||
|
||||
(void) rpmDigestFinal(ctx, (void **)&SHA1, NULL, 1);
|
||||
|
||||
if (SHA1 == NULL || strlen(SHA1) != strlen(sig) || !rstreq(SHA1, sig)) {
|
||||
if (SHA1 == NULL || !rstreq(SHA1, sig)) {
|
||||
rasprintf(msg, "%s %s Expected(%s) != (%s)\n", title,
|
||||
rpmSigString(res), sig, SHA1 ? SHA1 : "(nil)");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue