Skip to content

Commit

Permalink
Fix jcat_context_verify_blob() to use self verify for checksums
Browse files Browse the repository at this point in the history
This is the same behaviour as used in jcat_context_verify_item() but forgotten
somehow. We can only use jcat_engine_pubkey_verify() on pubkeys.

Fixes #47
  • Loading branch information
hughsie committed Jan 14, 2021
1 parent 9143b6f commit 98f747f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libjcat/jcat-context.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ jcat_context_verify_blob (JcatContext *self,
if (engine == NULL)
return NULL;
blob_signature = jcat_blob_get_data (blob);
if (jcat_engine_get_method (engine) == JCAT_BLOB_METHOD_CHECKSUM)
return jcat_engine_self_verify (engine, data, blob_signature, flags, error);
return jcat_engine_pubkey_verify (engine, data, blob_signature, flags, error);
}

Expand Down

0 comments on commit 98f747f

Please sign in to comment.