Skip to content

Commit

Permalink
Use imaevm_signhash
Browse files Browse the repository at this point in the history
sign_hash is deprecated in the new libimaevm

Resolves: rpm-software-management#3419
  • Loading branch information
ffesti committed Nov 20, 2024
1 parent 39df85d commit ae4733a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sign/rpmsignfiles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const char *key, char *keypass, uint32_t *siglenp)
unsigned char zeros[diglen];
unsigned char signature[MAX_SIGNATURE_LENGTH];
int siglen;
imaevm_ossl_access access_info = {
.type = IMAEVM_OSSL_ACCESS_TYPE_NONE,
};

/* some entries don't have a digest - we return an empty signature */
memset(zeros, 0, diglen);
Expand All @@ -53,7 +56,7 @@ const char *key, char *keypass, uint32_t *siglenp)
signature[0] = '\x03';

/* calculate file signature */
siglen = sign_hash(algo, fdigest, diglen, key, keypass, signature+1);
siglen = imaevm_signhash(algo, fdigest, diglen, key, keypass, signature+1, 0, &access_info, 0);
if (siglen < 0) {
rpmlog(RPMLOG_ERR, _("sign_hash failed\n"));
return NULL;
Expand Down

0 comments on commit ae4733a

Please sign in to comment.