Skip to content

Commit

Permalink
Undo commit 'Remove (hopefully) legacy code from signature check'.
Browse files Browse the repository at this point in the history
Apparently this was checking the PKCS encoding leading bytes and I
was covering up a bug by removing this.
  • Loading branch information
Daniel Wyatt authored and Daniel Wyatt committed May 17, 2017
1 parent c8de8ce commit b3561e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ rsa_verify(pgp_hash_alg_t type,
return 0;
}

if (hashbuf_from_sig[0] != 0 || hashbuf_from_sig[1] != 1) {
return 0;
}

switch (type) {
case PGP_HASH_MD5:
prefix = prefix_md5;
Expand Down

0 comments on commit b3561e0

Please sign in to comment.