rpmfiFDigestHex() instead of manual hex conversion
- showQueryPackage() and python rpmfi_Digest() at least..
This commit is contained in:
parent
29bdb49f16
commit
b9c69d1bab
|
@ -195,12 +195,9 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
|
|||
|
||||
if (qva->qva_flags & QUERY_FOR_DUMPFILES) {
|
||||
char *add, *fdigest;
|
||||
size_t diglen = 0;
|
||||
const unsigned char *digest = rpmfiFDigest(fi, NULL, &diglen);
|
||||
fdigest = pgpHexStr(digest, diglen);
|
||||
|
||||
fdigest = rpmfiFDigestHex(fi, NULL);
|
||||
rasprintf(&add, "%s %d %d %s 0%o ",
|
||||
fn, (int)fsize, fmtime, fdigest, fmode);
|
||||
fn, (int)fsize, fmtime, fdigest ? fdigest : "", fmode);
|
||||
rstrcat(&buf, add);
|
||||
free(add);
|
||||
free(fdigest);
|
||||
|
|
|
@ -96,12 +96,10 @@ static PyObject *
|
|||
rpmfi_Digest(rpmfiObject * s)
|
||||
{
|
||||
const unsigned char *digest;
|
||||
size_t diglen = 0;
|
||||
|
||||
digest = rpmfiFDigest(s->fi, NULL, &diglen);
|
||||
digest = rpmfiFDigestHex(s->fi, NULL);
|
||||
if (digest) {
|
||||
char *dig = pgpHexStr(digest, diglen);
|
||||
return Py_BuildValue("s", dig);
|
||||
return Py_BuildValue("s", digest);
|
||||
} else {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue