<p>The point of that commit is that those digests are already in the desired binary format inside the file objects, so there's no need to do it again. AFAICS the problem is that it's still passing digest and diglen to sign_hash() when it should pass fdigest instead:</p>
<pre><code>--- a/sign/rpmsignfiles.c
+++ b/sign/rpmsignfiles.c
@@ -50,7 +50,7 @@ const char *key, char *keypass, uint32_t *siglenp)
signature[0] = '\x03';
/* calculate file signature */
- siglen = sign_hash(algo, digest, diglen, key, keypass, signature+1);
+ siglen = sign_hash(algo, fdigest, diglen, key, keypass, signature+1);
if (siglen < 0) {
rpmlog(RPMLOG_ERR, _("sign_hash failed\n"));
return NULL;
</code></pre>
<p>If you can try the above "patch", great, but even better would be a full reproducer procedure, starting from scratch (key creation and all) so we can try creating a proper testcase to avoid future regressions. I know I managed to set <em>something</em> up at some point in time, but I never was convinced I was doing the right thing and here we are...</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/issues/723?email_source=notifications&email_token=ADLPZU37U5HID5CDUPTTEL3PYYVIXA5CNFSM4HRH3MHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW35CCY#issuecomment-498585867">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZUYQK2QOMSKBHFNMU23PYYVIXANCNFSM4HRH3MHA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZU6MFXK556AQE4UOV5DPYYVIXA5CNFSM4HRH3MHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW35CCY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/issues/723?email_source=notifications\u0026email_token=ADLPZU37U5HID5CDUPTTEL3PYYVIXA5CNFSM4HRH3MHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW35CCY#issuecomment-498585867",
"url": "https://github.com/rpm-software-management/rpm/issues/723?email_source=notifications\u0026email_token=ADLPZU37U5HID5CDUPTTEL3PYYVIXA5CNFSM4HRH3MHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW35CCY#issuecomment-498585867",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>